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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/js/integrate.min.js')
-rw-r--r--src/main/webapp/js/integrate.min.js310
1 files changed, 156 insertions, 154 deletions
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index d00ef133..a9c65e2c 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -145,7 +145,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.5.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/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.5.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/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2009,15 +2009,15 @@ Editor.printImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5
Editor.refreshImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE3LjY1IDYuMzVDMTYuMiA0LjkgMTQuMjEgNCAxMiA0Yy00LjQyIDAtNy45OSAzLjU4LTcuOTkgOHMzLjU3IDggNy45OSA4YzMuNzMgMCA2Ljg0LTIuNTUgNy43My02aC0yLjA4Yy0uODIgMi4zMy0zLjA0IDQtNS42NSA0LTMuMzEgMC02LTIuNjktNi02czIuNjktNiA2LTZjMS42NiAwIDMuMTQuNjkgNC4yMiAxLjc4TDEzIDExaDdWNGwtMi4zNSAyLjM1eiIvPjwvc3ZnPg==";
Editor.backImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTcuNTEgMy44N0wxNS43MyAyLjEgNS44NCAxMmw5LjkgOS45IDEuNzctMS43N0w5LjM4IDEybDguMTMtOC4xM3oiLz48L3N2Zz4=";Editor.closeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTIgMkM2LjQ3IDIgMiA2LjQ3IDIgMTJzNC40NyAxMCAxMCAxMCAxMC00LjQ3IDEwLTEwUzE3LjUzIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTMuNTktMTNMMTIgMTAuNTkgOC40MSA3IDcgOC40MSAxMC41OSAxMiA3IDE1LjU5IDguNDEgMTcgMTIgMTMuNDEgMTUuNTkgMTcgMTcgMTUuNTkgMTMuNDEgMTIgMTcgOC40MXoiLz48L3N2Zz4=";
Editor.closeBlackImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjZweCI+PGVsbGlwc2UgY3g9IjEyIiBjeT0iMTIiIHJ4PSI5IiByeT0iOSIgc3Ryb2tlPSJub25lIiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE0LjU5IDhMMTIgMTAuNTkgOS40MSA4IDggOS40MSAxMC41OSAxMiA4IDE0LjU5IDkuNDEgMTYgMTIgMTMuNDEgMTQuNTkgMTYgMTYgMTQuNTkgMTMuNDEgMTIgMTYgOS40MSAxNC41OSA4ek0xMiAyQzYuNDcgMiAyIDYuNDcgMiAxMnM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTBTMTcuNTMgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=";
-Editor.minusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTEwIDI1LjV2LTNoMjh2M1oiLz48L3N2Zz4=";Editor.plusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==";Editor.addBoxImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTIyLjUgMzRoM3YtOC41SDM0di0zaC04LjVWMTRoLTN2OC41SDE0djNoOC41Wk05IDQycS0xLjIgMC0yLjEtLjlRNiA0MC4yIDYgMzlWOXEwLTEuMi45LTIuMVE3LjggNiA5IDZoMzBxMS4yIDAgMi4xLjkuOS45LjkgMi4xdjMwcTAgMS4yLS45IDIuMS0uOS45LTIuMS45Wm0wLTNoMzBWOUg5djMwWk05IDl2MzBWOVoiLz48L3N2Zz4=";
-Editor.shapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTMwIDMwWm0tMTQgNC45cS41LjEuOTc1LjFIMThxLjMgMCAuNTI1LS4wMjUuMjI1LS4wMjUuNDc1LS4wMjVWNDFoMjJWMTloLTYuMDVxLjA1LS4yNS4wNS0uNXYtMS41MjVxMC0uNDc1LS4xLS45NzVINDFxMS4yNSAwIDIuMTI1Ljg3NVQ0NCAxOXYyMnEwIDEuMjUtLjg3NSAyLjEyNVQ0MSA0NEgxOXEtMS4yNSAwLTIuMTI1LS44NzVUMTYgNDFabTItMi45cS01Ljg1IDAtOS45MjUtNC4wNzVRNCAyMy44NSA0IDE4cTAtNS44NSA0LjA3NS05LjkyNVExMi4xNSA0IDE4IDRxNS44NSAwIDkuOTI1IDQuMDc1UTMyIDEyLjE1IDMyIDE4cTAgNS44NS00LjA3NSA5LjkyNVEyMy44NSAzMiAxOCAzMlptMC0zcTQuNTUgMCA3Ljc3NS0zLjIyNVEyOSAyMi41NSAyOSAxOHEwLTQuNTUtMy4yMjUtNy43NzVRMjIuNTUgNyAxOCA3cS00LjU1IDAtNy43NzUgMy4yMjVRNyAxMy40NSA3IDE4cTAgNC41NSAzLjIyNSA3Ljc3NVExMy40NSAyOSAxOCAyOVptMC0xMVoiLz48L3N2Zz4=";
+Editor.minusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTEwIDI1LjV2LTNoMjh2M1oiLz48L3N2Zz4=";Editor.plusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==";Editor.addBoxImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTExIDE3aDJ2LTRoNHYtMmgtNFY3aC0ydjRIN3YyaDRabS02IDRxLS44MjUgMC0xLjQxMy0uNTg3UTMgMTkuODI1IDMgMTlWNXEwLS44MjUuNTg3LTEuNDEzUTQuMTc1IDMgNSAzaDE0cS44MjUgMCAxLjQxMy41ODdRMjEgNC4xNzUgMjEgNXYxNHEwIC44MjUtLjU4NyAxLjQxM1ExOS44MjUgMjEgMTkgMjFabTAtMmgxNFY1SDV2MTRaTTUgNXYxNFY1WiIvPjwvc3ZnPg==";
+Editor.shapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTE1IDE1Wm0tNyAyLjk1cS4yNS4wMjUuNDg4LjAzOFE4LjcyNSAxOCA5IDE4dC41MTItLjAxMnEuMjM4LS4wMTMuNDg4LS4wMzhWMjBoMTBWMTBoLTIuMDVxLjAyNS0uMjUuMDM4LS40ODhRMTggOS4yNzUgMTggOXQtLjAxMi0uNTEyUTE3Ljk3NSA4LjI1IDE3Ljk1IDhIMjBxLjgyNSAwIDEuNDEzLjU4N1EyMiA5LjE3NSAyMiAxMHYxMHEwIC44MjUtLjU4NyAxLjQxM1EyMC44MjUgMjIgMjAgMjJIMTBxLS44MjUgMC0xLjQxMi0uNTg3UTggMjAuODI1IDggMjBaTTkgMTZxLTIuOTI1IDAtNC45NjMtMi4wMzhRMiAxMS45MjUgMiA5dDIuMDM3LTQuOTYzUTYuMDc1IDIgOSAycTIuOTI1IDAgNC45NjMgMi4wMzdRMTYgNi4wNzUgMTYgOXEwIDIuOTI1LTIuMDM3IDQuOTYyUTExLjkyNSAxNiA5IDE2Wm0wLTJxMi4wNzUgMCAzLjUzOC0xLjQ2M1ExNCAxMS4wNzUgMTQgOXQtMS40NjItMy41MzdRMTEuMDc1IDQgOSA0IDYuOTI1IDQgNS40NjMgNS40NjMgNCA2LjkyNSA0IDl0MS40NjMgMy41MzdRNi45MjUgMTQgOSAxNFptMC01WiIvPjwvc3ZnPg==";
Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==";
Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==";
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
-Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
+Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTE1IDIxLTYtMi4xLTQuNjUgMS44cS0uNS4yLS45MjUtLjExM1EzIDIwLjI3NSAzIDE5Ljc1di0xNHEwLS4zMjUuMTg4LS41NzUuMTg3LS4yNS41MTItLjM3NUw5IDNsNiAyLjEgNC42NS0xLjhxLjUtLjIuOTI1LjExMi40MjUuMzEzLjQyNS44Mzh2MTRxMCAuMzI1LS4xODguNTc1LS4xODcuMjUtLjUxMi4zNzVabS0xLTIuNDVWNi44NWwtNC0xLjR2MTEuN1ptMiAwIDMtMVY1LjdsLTMgMS4xNVpNNSAxOC4zbDMtMS4xNVY1LjQ1bC0zIDFaTTE2IDYuODV2MTEuN1ptLTgtMS40djExLjdaIi8+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.compareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=";
-Editor.expandMoreImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTI0IDMwLjc1LTEyLTEyIDIuMTUtMi4xNUwyNCAyNi41bDkuODUtOS44NUwzNiAxOC44WiIvPjwvc3ZnPg==";Editor.expandLessImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTE0LjE1IDMwLjc1IDEyIDI4LjZsMTItMTIgMTIgMTEuOTUtMi4xNSAyLjE1TDI0IDIwLjg1WiIvPjwvc3ZnPg==";Editor.gearImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE5LjQgNDQtMS02LjNxLS45NS0uMzUtMi0uOTV0LTEuODUtMS4yNWwtNS45IDIuN0w0IDMwbDUuNC0zLjk1cS0uMS0uNDUtLjEyNS0xLjAyNVE5LjI1IDI0LjQ1IDkuMjUgMjRxMC0uNDUuMDI1LTEuMDI1VDkuNCAyMS45NUw0IDE4bDQuNjUtOC4yIDUuOSAyLjdxLjgtLjY1IDEuODUtMS4yNXQyLS45bDEtNi4zNWg5LjJsMSA2LjNxLjk1LjM1IDIuMDI1LjkyNVEzMi43IDExLjggMzMuNDUgMTIuNWw1LjktMi43TDQ0IDE4bC01LjQgMy44NXEuMS41LjEyNSAxLjA3NS4wMjUuNTc1LjAyNSAxLjA3NXQtLjAyNSAxLjA1cS0uMDI1LjU1LS4xMjUgMS4wNUw0NCAzMGwtNC42NSA4LjItNS45LTIuN3EtLjguNjUtMS44MjUgMS4yNzUtMS4wMjUuNjI1LTIuMDI1LjkyNWwtMSA2LjNaTTI0IDMwLjVxMi43IDAgNC42LTEuOSAxLjktMS45IDEuOS00LjYgMC0yLjctMS45LTQuNi0xLjktMS45LTQuNi0xLjktMi43IDAtNC42IDEuOS0xLjkgMS45LTEuOSA0LjYgMCAyLjcgMS45IDQuNiAxLjkgMS45IDQuNiAxLjlabTAtM3EtMS40NSAwLTIuNDc1LTEuMDI1UTIwLjUgMjUuNDUgMjAuNSAyNHEwLTEuNDUgMS4wMjUtMi40NzVRMjIuNTUgMjAuNSAyNCAyMC41cTEuNDUgMCAyLjQ3NSAxLjAyNVEyNy41IDIyLjU1IDI3LjUgMjRxMCAxLjQ1LTEuMDI1IDIuNDc1UTI1LjQ1IDI3LjUgMjQgMjcuNVptMC0zLjVabS0yLjIgMTdoNC40bC43LTUuNnExLjY1LS40IDMuMTI1LTEuMjVUMzIuNyAzMi4xbDUuMyAyLjMgMi0zLjYtNC43LTMuNDVxLjItLjg1LjMyNS0xLjY3NS4xMjUtLjgyNS4xMjUtMS42NzUgMC0uODUtLjEtMS42NzUtLjEtLjgyNS0uMzUtMS42NzVMNDAgMTcuMmwtMi0zLjYtNS4zIDIuM3EtMS4xNS0xLjMtMi42LTIuMTc1LTEuNDUtLjg3NS0zLjItMS4xMjVMMjYuMiA3aC00LjRsLS43IDUuNnEtMS43LjM1LTMuMTc1IDEuMi0xLjQ3NS44NS0yLjYyNSAyLjFMMTAgMTMuNmwtMiAzLjYgNC43IDMuNDVxLS4yLjg1LS4zMjUgMS42NzUtLjEyNS44MjUtLjEyNSAxLjY3NSAwIC44NS4xMjUgMS42NzUuMTI1LjgyNS4zMjUgMS42NzVMOCAzMC44bDIgMy42IDUuMy0yLjNxMS4yIDEuMiAyLjY3NSAyLjA1UTE5LjQ1IDM1IDIxLjEgMzUuNFoiLz48L3N2Zz4=";
-Editor.extensionImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTE3LjggNDJIOXEtMS4yIDAtMi4xLS45UTYgNDAuMiA2IDM5di04LjhxMi4yLS4yNSAzLjc3NS0xLjcyNVExMS4zNSAyNyAxMS4zNSAyNC44NXQtMS41NzUtMy42MjVROC4yIDE5Ljc1IDYgMTkuNXYtOC44cTAtMS4yLjktMi4xLjktLjkgMi4xLS45aDguODVxLjU1LTIgMS45NzUtMy4zNVQyMy4yNSAzcTIgMCAzLjQyNSAxLjM1UTI4LjEgNS43IDI4LjY1IDcuN2g4LjY1cTEuMiAwIDIuMS45LjkuOS45IDIuMXY4LjY1cTIgLjU1IDMuMjc1IDIuMDc1IDEuMjc1IDEuNTI1IDEuMjc1IDMuNTI1dC0xLjI3NSAzLjM1UTQyLjMgMjkuNjUgNDAuMyAzMC4yVjM5cTAgMS4yLS45IDIuMS0uOS45LTIuMS45aC04LjhxLS4yNS0yLjQtMS43NzUtMy44NzVUMjMuMTUgMzYuNjVxLTIuMDUgMC0zLjU3NSAxLjQ3NVExOC4wNSAzOS42IDE3LjggNDJaTTkgMzloNi41cTEuMjUtMy4wNSAzLjUtNC4yIDIuMjUtMS4xNSA0LjE1LTEuMTUgMS45IDAgNC4xNSAxLjE1IDIuMjUgMS4xNSAzLjUgNC4yaDYuNVYyNy4yNWgyLjI1cTEgMCAxLjY1LS42NS42NS0uNjUuNjUtMS42NSAwLTEtLjY1LTEuNjUtLjY1LS42NS0xLjY1LS42NUgzNy4zVjEwLjdIMjUuNTVWOC4zcTAtMS0uNjUtMS42NVEyNC4yNSA2IDIzLjI1IDZxLTEgMC0xLjY1LjY1LS42NS42NS0uNjUgMS42NXYyLjRIOXY2LjVxMi40LjkgMy44NzUgM3QxLjQ3NSA0LjY1cTAgMi41NS0xLjQ3NSA0LjY1UTExLjQgMzEuNiA5IDMyLjVabTE2LjQ1LTE2LjVaIi8+PC9zdmc+";
+Editor.expandMoreImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTEyIDE1LjM3NS02LTYgMS40LTEuNCA0LjYgNC42IDQuNi00LjYgMS40IDEuNFoiLz48L3N2Zz4=";Editor.expandLessImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTcuNCAxNS4zNzUtMS40LTEuNCA2LTYgNiA2LTEuNCAxLjQtNC42LTQuNloiLz48L3N2Zz4=";Editor.gearImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTkuMjUgMjItLjQtMy4ycS0uMzI1LS4xMjUtLjYxMi0uMy0uMjg4LS4xNzUtLjU2My0uMzc1TDQuNyAxOS4zNzVsLTIuNzUtNC43NSAyLjU3NS0xLjk1UTQuNSAxMi41IDQuNSAxMi4zMzd2LS42NzVxMC0uMTYyLjAyNS0uMzM3TDEuOTUgOS4zNzVsMi43NS00Ljc1IDIuOTc1IDEuMjVxLjI3NS0uMi41NzUtLjM3NS4zLS4xNzUuNi0uM2wuNC0zLjJoNS41bC40IDMuMnEuMzI1LjEyNS42MTMuMy4yODcuMTc1LjU2Mi4zNzVsMi45NzUtMS4yNSAyLjc1IDQuNzUtMi41NzUgMS45NXEuMDI1LjE3NS4wMjUuMzM3di42NzVxMCAuMTYzLS4wNS4zMzhsMi41NzUgMS45NS0yLjc1IDQuNzUtMi45NS0xLjI1cS0uMjc1LjItLjU3NS4zNzUtLjMuMTc1LS42LjNsLS40IDMuMlptMi44LTYuNXExLjQ1IDAgMi40NzUtMS4wMjVRMTUuNTUgMTMuNDUgMTUuNTUgMTJxMC0xLjQ1LTEuMDI1LTIuNDc1UTEzLjUgOC41IDEyLjA1IDguNXEtMS40NzUgMC0yLjQ4OCAxLjAyNVE4LjU1IDEwLjU1IDguNTUgMTJxMCAxLjQ1IDEuMDEyIDIuNDc1UTEwLjU3NSAxNS41IDEyLjA1IDE1LjVabTAtMnEtLjYyNSAwLTEuMDYyLS40MzgtLjQzOC0uNDM3LS40MzgtMS4wNjJ0LjQzOC0xLjA2MnEuNDM3LS40MzggMS4wNjItLjQzOHQxLjA2My40MzhxLjQzNy40MzcuNDM3IDEuMDYydC0uNDM3IDEuMDYycS0uNDM4LjQzOC0xLjA2My40MzhaTTEyIDEyWm0tMSA4aDEuOTc1bC4zNS0yLjY1cS43NzUtLjIgMS40MzgtLjU4OC42NjItLjM4NyAxLjIxMi0uOTM3bDIuNDc1IDEuMDI1Ljk3NS0xLjctMi4xNS0xLjYyNXEuMTI1LS4zNS4xNzUtLjczOC4wNS0uMzg3LjA1LS43ODd0LS4wNS0uNzg4cS0uMDUtLjM4Ny0uMTc1LS43MzdsMi4xNS0xLjYyNS0uOTc1LTEuNy0yLjQ3NSAxLjA1cS0uNTUtLjU3NS0xLjIxMi0uOTYzLS42NjMtLjM4Ny0xLjQzOC0uNTg3TDEzIDRoLTEuOTc1bC0uMzUgMi42NXEtLjc3NS4yLTEuNDM3LjU4Ny0uNjYzLjM4OC0xLjIxMy45MzhMNS41NSA3LjE1bC0uOTc1IDEuNyAyLjE1IDEuNnEtLjEyNS4zNzUtLjE3NS43NS0uMDUuMzc1LS4wNS44IDAgLjQuMDUuNzc1dC4xNzUuNzVsLTIuMTUgMS42MjUuOTc1IDEuNyAyLjQ3NS0xLjA1cS41NS41NzUgMS4yMTMuOTYyLjY2Mi4zODggMS40MzcuNTg4WiIvPjwvc3ZnPg==";
+Editor.extensionImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTguOCAyMUg1cS0uODI1IDAtMS40MTMtLjU4N1EzIDE5LjgyNSAzIDE5di0zLjhxMS4yIDAgMi4xLS43NjIuOS0uNzYzLjktMS45MzggMC0xLjE3NS0uOS0xLjkzOFE0LjIgOS44IDMgOS44VjZxMC0uODI1LjU4Ny0xLjQxMlE0LjE3NSA0IDUgNGg0cTAtMS4wNS43MjUtMS43NzVRMTAuNDUgMS41IDExLjUgMS41cTEuMDUgMCAxLjc3NS43MjVRMTQgMi45NSAxNCA0aDRxLjgyNSAwIDEuNDEzLjU4OFEyMCA1LjE3NSAyMCA2djRxMS4wNSAwIDEuNzc1LjcyNS43MjUuNzI1LjcyNSAxLjc3NSAwIDEuMDUtLjcyNSAxLjc3NVEyMS4wNSAxNSAyMCAxNXY0cTAgLjgyNS0uNTg3IDEuNDEzUTE4LjgyNSAyMSAxOCAyMWgtMy44cTAtMS4yNS0uNzg3LTIuMTI1UTEyLjYyNSAxOCAxMS41IDE4dC0xLjkxMi44NzVROC44IDE5Ljc1IDguOCAyMVpNNSAxOWgyLjEyNXEuNi0xLjY1IDEuOTI1LTIuMzI1UTEwLjM3NSAxNiAxMS41IDE2cTEuMTI1IDAgMi40NS42NzUgMS4zMjUuNjc1IDEuOTI1IDIuMzI1SDE4di02aDJxLjIgMCAuMzUtLjE1LjE1LS4xNS4xNS0uMzUgMC0uMi0uMTUtLjM1UTIwLjIgMTIgMjAgMTJoLTJWNmgtNlY0cTAtLjItLjE1LS4zNS0uMTUtLjE1LS4zNS0uMTUtLjIgMC0uMzUuMTVRMTEgMy44IDExIDR2Mkg1djIuMnExLjM1LjUgMi4xNzUgMS42NzVROCAxMS4wNSA4IDEyLjVxMCAxLjQyNS0uODI1IDIuNlQ1IDE2LjhabTcuNzUtNy43NVoiLz48L3N2Zz4=";
Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;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=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(a){return Editor.darkMode};Editor.isPngDataUrl=function(a){return null!=a&&"data:image/png;"==a.substring(0,15)};
@@ -2267,9 +2267,9 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};
EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";a.style.display="inline-flex";a.style.alignItems="center";mxEvent.addListener(a,"click",mxUtils.bind(this,function(b){var f=mxEvent.getSource(b);if("A"!=f.nodeName){var e=f.getAttribute("data-action");if("statusFunction"==e&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=e)f=this.actions.get(e),null!=f&&f.funct();else{e=f.getAttribute("data-title");var g=
f.getAttribute("data-message");null!=e&&null!=g?this.showError(e,g):(f=f.getAttribute("data-link"),null!=f&&this.editor.graph.openLink(f))}mxEvent.consume(b)}}));return a};
-EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&null!=a&&0<a.length&&(this.statusContainer.innerText="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a));a=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=a)for(var b=0;b<a.length;b++)(function(f){mxUtils.setOpacity(f,0);mxUtils.setPrefixedStyle(f.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(f.style,"transition","all 0.2s ease");
-window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,100);mxUtils.setPrefixedStyle(f.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","scaleX(0)");mxUtils.setOpacity(f,0);window.setTimeout(mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(a[b])};
-EditorUi.prototype.createStatusDiv=function(a){var b=document.createElement("div");b.setAttribute("title",a);b.innerHTML=a;return b};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
+EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=Graph.sanitizeHtml(a);0==this.statusContainer.getElementsByTagName("div").length&&null!=a&&0<a.length&&(this.statusContainer.innerText="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a));a=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=a)for(var b=0;b<a.length;b++)(function(f){mxUtils.setOpacity(f,0);mxUtils.setPrefixedStyle(f.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(f.style,
+"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,100);mxUtils.setPrefixedStyle(f.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","scaleX(0)");mxUtils.setOpacity(f,0);window.setTimeout(mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(a[b])};
+EditorUi.prototype.createStatusDiv=function(a){var b=document.createElement("div");b.setAttribute("title",a);b.innerHTML=Graph.sanitizeHtml(a);return b};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
EditorUi.prototype.addSplitHandler=function(a,b,f,e){function g(x){if(null!=h){var B=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));e(Math.max(0,n+(b?B.x-h.x:h.y-B.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function d(x){g(x);h=n=null}var h=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){h=new mxPoint(mxEvent.getClientX(x),
mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var B=null!=m?m-f:0;m=r();e(B);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,d)})};
@@ -2285,9 +2285,9 @@ EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFr
EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==b&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(e){e.text().then(mxUtils.bind(this,function(g){try{var d=this.parseHtmlData(g),h="text/plain"!=d.getAttribute("data-type")?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);try{var n=h.lastIndexOf("%3E");
0<=n&&n<h.length-3&&(h=h.substring(0,n+3))}catch(r){}try{var u=d.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(h);this.isCompatibleString(m)&&(h=m)}catch(r){}}catch(r){}a(this.isCompatibleString(h)?h:null)}))["catch"](function(g){a(null)})}))["catch"](function(e){a(null)});else if(null!=f&&0<f.length&&"text"==b&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(e){e.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
else a(null)}))["catch"](function(f){a(null)})};
-EditorUi.prototype.parseHtmlData=function(a){var b=null;if(null!=a&&0<a.length){var f="<meta "==a.substring(0,6);b=document.createElement("div");b.innerHTML=(f?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
-b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(a=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,a==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,a),asHtml=!1));f=f&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=f&&null==f.nextSibling&&f.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==f.nodeName?(a=f.getAttribute("src"),
-null!=a&&(Editor.isPngDataUrl(a)&&(f=Editor.extractGraphModelFromPng(a),null!=f&&0<f.length&&(a=f)),mxUtils.setTextContent(b,a),asHtml=!1)):(f=b.getElementsByTagName("img"),1==f.length&&(f=f[0],a=f.getAttribute("src"),null!=a&&f.parentNode==b&&1==b.children.length&&(Editor.isPngDataUrl(a)&&(f=Editor.extractGraphModelFromPng(a),null!=f&&0<f.length&&(a=f)),mxUtils.setTextContent(b,a),asHtml=!1)));asHtml&&Graph.removePasteFormatting(b)}asHtml||b.setAttribute("data-type","text/plain");return b};
+EditorUi.prototype.parseHtmlData=function(a){var b=null;if(null!=a&&0<a.length){var f="<meta "==a.substring(0,6);b=document.createElement("div");b.innerHTML=(f?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==b.firstChild.nodeName&&
+"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(a=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,a==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,a),asHtml=!1));f=f&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=f&&null==f.nextSibling&&f.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==f.nodeName?(a=f.getAttribute("src"),null!=a&&(Editor.isPngDataUrl(a)&&
+(f=Editor.extractGraphModelFromPng(a),null!=f&&0<f.length&&(a=f)),mxUtils.setTextContent(b,a),asHtml=!1)):(f=b.getElementsByTagName("img"),1==f.length&&(f=f[0],a=f.getAttribute("src"),null!=a&&f.parentNode==b&&1==b.children.length&&(Editor.isPngDataUrl(a)&&(f=Editor.extractGraphModelFromPng(a),null!=f&&0<f.length&&(a=f)),mxUtils.setTextContent(b,a),asHtml=!1)));asHtml&&Graph.removePasteFormatting(b)}asHtml||b.setAttribute("data-type","text/plain");return b};
EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,f=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?f=a.getData("Text"):(f=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,0<=mxUtils.indexOf(a.types,"text/plain")&&(null==f||0==f.length)&&(f=a.getData("text/plain"))),null!=f&&(f=Graph.zapGremlins(mxUtils.trim(f)),a=this.extractGraphModelFromHtml(f),null!=a&&(f=a))));null!=f&&this.isCompatibleString(f)&&
(b=f);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(b){this.save(b)}),null,mxUtils.bind(this,function(b){if(null!=b&&0<b.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
@@ -2543,14 +2543,14 @@ h=n=u=m=null}}else if(O=V.getState(),null!=O&&this.isCellEditable(O.cell)){J=nul
null!=O.visibleTargetState)L=this.view.getEdgeStyle(O),J="crosshair",L!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(V=mxUtils.findNearestSegment(O,V.getGraphX(),V.getGraphY()),V<U.length-1&&0<=V&&(J=0==Math.round(U[V].x-U[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){U=mxShape.prototype.svgStrokeTolerance/2;L=new mxRectangle(V.getGraphX(),V.getGraphY());L.grow(U);if(this.isTableCell(O.cell)&&(V=this.model.getParent(O.cell),U=this.model.getParent(V),!this.isCellSelected(U)))if(mxUtils.intersects(L,
new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(U,0)!=V||mxUtils.intersects(L,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))J="row-resize";else if(mxUtils.intersects(L,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(V,0)!=O.cell||mxUtils.intersects(L,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))J="col-resize";for(V=O;null==J&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(U=this.getActualStartSize(V.cell),
aa=this.view.scale,(0<U.x||0<U.width)&&mxUtils.intersects(L,new mxRectangle(V.x+(U.x-U.width-1)*aa+(0==U.x?V.width*aa:0),V.y,1,V.height))?J="col-resize":(0<U.y||0<U.height)&&mxUtils.intersects(L,new mxRectangle(V.x,V.y+(U.y-U.height-1)*aa+(0==U.y?V.height:0),V.width,1))&&(J="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=J&&O.setCursor(J)}}}),mouseUp:mxUtils.bind(this,function(L,V){m=h=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(L){var V=
-mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&(V=1!=L.style.html?mxUtils.htmlEntities(V,!1):L.view.graph.sanitizeHtml(V));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(L,V){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],O=this.graph.pageFormat,U=this.graph.pageScale,J=O.width*U;O=O.height*U;U=this.graph.view.translate;for(var aa=this.graph.view.scale,ja=
-this.graph.getPageLayout(),na=0;na<ja.width;na++)V.push(new mxRectangle(((ja.x+na)*J+U.x)*aa,(ja.y*O+U.y)*aa,J*aa,O*aa));for(na=1;na<ja.height;na++)V.push(new mxRectangle((ja.x*J+U.x)*aa,((ja.y+na)*O+U.y)*aa,J*aa,O*aa));L=V.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,V){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 B=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=B.apply(this,arguments),O=new mxDictionary,U=[],J=0;J<V.length;J++){var aa=this.graph.isTableCell(L)&&this.graph.isTableCell(V[J])&&this.graph.isCellSelected(V[J])?this.graph.model.getParent(V[J]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[J])&&this.graph.isCellSelected(V[J])?V[J]:this.graph.getCompositeParent(V[J]);
-null==aa||O.get(aa)||(O.put(aa,!0),U.push(aa))}return U};var C=this.graphHandler.start;this.graphHandler.start=function(L,V,O,U){var J=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?J=!0:L=this.graph.model.getParent(L));J||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));C.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
-arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var H=(new Date).getTime(),E=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;N.apply(this,arguments);L!=this.currentState?(H=(new Date).getTime(),E=0):E=(new Date).getTime()-H};var Q=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<E||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(L){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var R=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(L){return R.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
-mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};var ba=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ba=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=ba)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};
+mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&(V=1!=L.style.html?mxUtils.htmlEntities(V,!1):Graph.sanitizeHtml(V));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(L,V){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],O=this.graph.pageFormat,U=this.graph.pageScale,J=O.width*U;O=O.height*U;U=this.graph.view.translate;for(var aa=this.graph.view.scale,ja=this.graph.getPageLayout(),
+na=0;na<ja.width;na++)V.push(new mxRectangle(((ja.x+na)*J+U.x)*aa,(ja.y*O+U.y)*aa,J*aa,O*aa));for(na=1;na<ja.height;na++)V.push(new mxRectangle((ja.x*J+U.x)*aa,((ja.y+na)*O+U.y)*aa,J*aa,O*aa));L=V.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,V){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 B=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=B.apply(this,arguments),O=new mxDictionary,U=[],J=0;J<V.length;J++){var aa=this.graph.isTableCell(L)&&this.graph.isTableCell(V[J])&&this.graph.isCellSelected(V[J])?this.graph.model.getParent(V[J]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[J])&&this.graph.isCellSelected(V[J])?V[J]:this.graph.getCompositeParent(V[J]);null==aa||O.get(aa)||
+(O.put(aa,!0),U.push(aa))}return U};var C=this.graphHandler.start;this.graphHandler.start=function(L,V,O,U){var J=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?J=!0:L=this.graph.model.getParent(L));J||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));C.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};
+var F=new mxRubberband(this);this.getRubberband=function(){return F};var H=(new Date).getTime(),E=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;N.apply(this,arguments);L!=this.currentState?(H=(new Date).getTime(),E=0):E=(new Date).getTime()-H};var Q=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<E||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(L){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var R=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(L){return R.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&
+mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};var ba=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ba=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=ba)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};
var T=this.click;this.click=function(L){var V=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!V||L.isConsumed())return T.apply(this,arguments);var O=V?L.sourceState.cell:L.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var P=this.tooltipHandler.show;this.tooltipHandler.show=
function(){P.apply(this,arguments);if(null!=this.div)for(var L=this.div.getElementsByTagName("a"),V=0;V<L.length;V++)null!=L[V].getAttribute("href")&&null==L[V].getAttribute("target")&&L[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};this.getCursorForMouseEvent=function(L){var V=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(V?L.sourceState.cell:L.getCell())};var Y=this.getCursorForCell;
this.getCursorForCell=function(L){if(!this.isEnabled()||this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return Y.apply(this,arguments)};this.selectRegion=function(L,V){var O=mxEvent.isAltDown(V)?L:null;L=this.getCells(L.x,L.y,L.width,L.height,null,null,O,function(U){return"1"==mxUtils.getValue(U.style,"locked","0")},!0);if(this.isToggleEvent(V))for(O=0;O<L.length;O++)this.selectCellForEvent(L[O],V);else this.selectCellsForEvent(L,
@@ -2852,17 +2852,17 @@ mxCellEditor.prototype.startEditing=function(t,z){t=this.graph.getStartEditingCe
mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var N=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(t){function z(G,K){K.originalNode=G;G=G.firstChild;for(var W=K.firstChild;null!=G&&null!=W;)z(G,W),G=G.nextSibling,W=W.nextSibling;return K}function A(G,K){if(null!=G)if(K.originalNode!=G)D(G);else for(G=G.firstChild,K=K.firstChild;null!=G;){var W=G.nextSibling;null==K?D(G):(A(G,K),K=K.nextSibling);G=W}}function D(G){for(var K=
G.firstChild;null!=K;){var W=K.nextSibling;D(K);K=W}1==G.nodeType&&("BR"===G.nodeName||null!=G.firstChild)||3==G.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(G)).length?(3==G.nodeType&&mxUtils.setTextContent(G,mxUtils.getTextContent(G).replace(/\n|\r/g,"")),1==G.nodeType&&(G.removeAttribute("style"),G.removeAttribute("class"),G.removeAttribute("width"),G.removeAttribute("cellpadding"),G.removeAttribute("cellspacing"),G.removeAttribute("border"))):G.parentNode.removeChild(G)}N.apply(this,arguments);
7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(G){var K=z(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,K):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell);
-if(null!=t){var z=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=this.graph.sanitizeHtml(z?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";ca=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY,
+if(null!=t){var z=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=Graph.sanitizeHtml(z?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";ca=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY,
mxConstants.DEFAULT_FONTFAMILY);var D=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),G=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,K=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,
0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ca*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ca)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=G?"bold":"normal";this.textarea.style.fontStyle=K?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=D;this.textarea.style.padding=
-"0px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=this.graph.sanitizeHtml(z?
+"0px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=Graph.sanitizeHtml(z?
ha.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ha,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ca=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ca*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ca)+"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!=ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var Q=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,z){if(null!=this.textarea)if(t=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
null!=t){var A=t.view.scale;this.bounds=mxRectangle.fromRectangle(t);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*A;this.bounds.height=60*A;var D=null!=t.text?t.text.margin:null;null==D&&(D=mxUtils.getAlignmentAsPoint(mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=D.x*this.bounds.width;this.bounds.y+=D.y*this.bounds.height}this.textarea.style.width=
Math.round((this.bounds.width-4)/A)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/A)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/A)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*A);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/A)+(this.textarea.offsetWidth-
this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*A);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("+A+","+A+")")}else this.textarea.style.height="",this.textarea.style.overflow="",Q.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(t,z){if("0"==mxUtils.getValue(t.style,
-"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var A=this.graph.getEditingValue(t.cell,z);"1"==mxUtils.getValue(t.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));return A=this.graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(t){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);
-return z="1"==mxUtils.getValue(t.style,"nl2Br","1")?z.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var S=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var R=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();
+"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var A=this.graph.getEditingValue(t.cell,z);"1"==mxUtils.getValue(t.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));return A=Graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(t){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=Graph.sanitizeHtml(this.textarea.innerHTML,!0);return z=
+"1"==mxUtils.getValue(t.style,"nl2Br","1")?z.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var S=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var R=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();
try{R.apply(this,arguments),""==z&&this.graph.isCellDeletable(t.cell)&&0==this.graph.model.getChildCount(t.cell)&&this.graph.isTransparentState(t)&&this.graph.removeCells([t.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!=
mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getBorderColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style,
mxConstants.STYLE_STROKECOLOR,null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getMinimumSize=function(t){var z=this.graph.getView().scale;return new mxRectangle(0,0,null==t.text?30:t.text.size*z+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(t,z){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(z.getEvent)};mxGraphView.prototype.formatUnitText=function(t){return t?
@@ -3108,8 +3108,9 @@ for(f=0;f<u.length;f++)this.addSvgRule(a,u[f],h,n[b],u,f,e)}}}}catch(m){}return
StyleFormatPanel.prototype.addSvgRule=function(a,b,f,e,g,d,h){var n=this.editorUi,u=n.editor.graph;h.test(b.selectorText)&&(h=mxUtils.bind(this,function(m,r,x){var B=mxUtils.trim(m.style[r]);""!=B&&"url("!=B.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=B;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[d].style[r]=C;C="";for(var F=0;F<g.length;F++)C+=g[F].cssText+" ";e.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),h(b,"fill",mxResources.get("fill")),h(b,"stroke",mxResources.get("line")),h(b,"stop-color",
mxResources.get("gradient")))};
-StyleFormatPanel.prototype.addEditOps=function(a){if(0<this.editorUi.getSelectionState().cells.length){var b=document.createElement("select");b.style.width="210px";b.style.textAlign="center";b.style.borderRadius="4px";b.style.marginBottom="2px";for(var f="edit editShape editImage editStyle editData editLink editTooltip editConnectionPoints editGeometry".split(" "),e=0;e<f.length;e++){var g=this.editorUi.actions.get(f[e]);if(null==g||g.enabled){var d=document.createElement("option");d.setAttribute("value",
-f[e]);var h=mxResources.get(f[e]);mxUtils.write(d,h+"...");null!=g&&null!=g.shortcut&&(h+=" ("+g.shortcut+")");d.setAttribute("title",h);b.appendChild(d)}}1<b.children.length&&(a.appendChild(b),mxEvent.addListener(b,"change",mxUtils.bind(this,function(n){n=this.editorUi.actions.get(b.value);b.value="edit";null!=n&&n.funct()})))}return a};
+StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(0<b.cells.length){var f=document.createElement("select");f.style.width="210px";f.style.textAlign="center";f.style.borderRadius="4px";f.style.marginBottom="2px";for(var e="edit editShape editImage editStyle editData editLink editTooltip editConnectionPoints editGeometry".split(" "),g=0;g<e.length;g++){var d=this.editorUi.actions.get(e[g]);if(null==d||d.enabled){var h=document.createElement("option");h.setAttribute("value",
+e[g]);var n=mxResources.get(e[g]);mxUtils.write(h,n+("edit"==e[g]?"":"..."));null!=d&&null!=d.shortcut&&(n+=" ("+d.shortcut+")");h.setAttribute("title",n);f.appendChild(h)}}1<f.children.length&&(a.appendChild(f),mxEvent.addListener(f,"change",mxUtils.bind(this,function(u){u=this.editorUi.actions.get(f.value);f.value="edit";null!=u&&u.funct()})),b.image&&0<b.cells.length&&(b=this.editorUi.editor.graph,b=b.view.getState(b.getSelectionCell()),null!=b&&null!=mxUtils.getValue(b.style,mxConstants.STYLE_IMAGE,
+null)&&(b=mxUtils.button(mxResources.get("crop")+"...",mxUtils.bind(this,function(u){this.editorUi.actions.get("crop").funct()})),b.setAttribute("title",mxResources.get("editImage")),f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px",b.style.marginBottom="2px",a.appendChild(b))))}return a};
StyleFormatPanel.prototype.addFill=function(a){function b(){h.innerHTML="";C=1;for(var H=0;H<Editor.fillStyles.length;H++){var E=document.createElement("option");E.setAttribute("value",Editor.fillStyles[H].val);mxUtils.write(E,Editor.fillStyles[H].dispName);h.appendChild(E)}}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height=
"22px";d.style.padding="0px";d.style.marginTop="-3px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.boxSizing="border-box";var h=d.cloneNode(!1);mxEvent.addListener(d,"click",function(H){mxEvent.consume(H)});mxEvent.addListener(h,"click",function(H){mxEvent.consume(H)});var n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(H){d.style.display=null==H||H==mxConstants.NONE?"none":""},function(H){e.updateCellStyles({gradientColor:H},
e.getSelectionCells())},e.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,e.shapeForegroundColor,e.shapeBackgroundColor)),u="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,m=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(H){e.setCellStyles(u,H,g.cells)}),e.getDefaultColor(g.style,u,e.shapeBackgroundColor,e.shapeForegroundColor));m.style.fontWeight="bold";var r=mxUtils.getValue(g.style,u,null);n.style.display=
@@ -3511,8 +3512,8 @@ function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var B=null,C=d.getLinkTitle(m);
r.geometry.x=B.x;r.geometry.y=B.y;d.setAttributeForCell(r,"linkTarget",x);d.setLinkForCell(r,m);d.cellSizeUpdated(r,!0);d.getModel().beginUpdate();try{r=d.addCell(r),d.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{d.getModel().endUpdate()}d.setSelectionCell(r);d.scrollCellToVisible(d.getSelectionCell())}},!0)})).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var m=d.getSelectedElement(),r=d.getParentByName(m,
"A",d.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var B=m.getElementsByTagName("a"),C=0;C<B.length&&null==r;C++)B[C].textContent==m.textContent&&(r=B[C]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(H){d.cellEditor.restoreSelection(F);null!=H&&d.insertLink(H)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=
h;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate();try{for(var r=0;r<m.length;r++){var x=m[r];d.getModel().isVertex(x)&&(0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());
-m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()),x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var C=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(F.childNodes);
-d.cellLabelChanged(state.cell,C);d.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(C=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(C)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),
+m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()),x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var C=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=Graph.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(F.childNodes);
+d.cellLabelChanged(state.cell,C);d.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(C=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),
r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(e,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(m.container,
375,80,!0,!0);m.init()});this.addAction("resetView",function(){d.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(m){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,e.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,e.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=d.isSelectionEmpty()?
d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),r=d.view.translate,x=d.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;m.height/=x;null!=d.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height)));0==m.width||0==m.height?(d.zoomTo(1),e.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),d.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",
@@ -3603,16 +3604,16 @@ backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];null!=m&&e.fireEvent(new m
(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,d,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var f=this.editorUi.editor.graph;b=f.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",f.getSelectionCells()))};
Menus.prototype.addMenuItem=function(a,b,f,e,g,d){var h=this.editorUi.actions.get(b);return null!=h&&(a.showDisabled||h.isEnabled())&&h.visible?(b=a.addItem(d||h.label,null,function(n){h.funct(e,n)},f,g,h.isEnabled()),h.toggleAction&&h.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,h),b):null};
Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){a=a.firstChild.nextSibling.nextSibling;var f=document.createElement("span");f.style.color="gray";mxUtils.write(f,b.shortcut);a.appendChild(f)}};Menus.prototype.addMenuItems=function(a,b,f,e,g){for(var d=0;d<b.length;d++)"-"==b[d]?a.addSeparator(f):this.addMenuItem(a,b[d],f,e,null!=g?g[d]:null)};
-Menus.prototype.createPopupMenu=function(a,b,f){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,b,f);this.addPopupMenuEditItems(a,b,f);this.addPopupMenuStyleItems(a,b,f);this.addPopupMenuArrangeItems(a,b,f);this.addPopupMenuCellItems(a,b,f);this.addPopupMenuSelectionItems(a,b,f)};Menus.prototype.addPopupMenuHistoryItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,f)};
-Menus.prototype.addPopupMenuEditItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,f):(this.isShowCellEditItems()&&this.addMenuItems(a,["delete","-"],null,f),this.addMenuItems(a,["cut","copy","duplicate","-","lockUnlock"],null,f))};Menus.prototype.isShowStyleItems=function(){return!0};
-Menus.prototype.addPopupMenuStyleItems=function(a,b,f){this.isShowStyleItems()&&(1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,f):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,f))};Menus.prototype.isShowArrangeItems=function(){return!0};
-Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){if(this.isShowArrangeItems()){var e=this.editorUi.editor.graph;0<e.getEditableCells(e.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),1==e.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,f));1<e.getSelectionCount()?this.addMenuItems(a,["-","group"],null,f):1==e.getSelectionCount()&&!e.getModel().isEdge(b)&&!e.isSwimlane(b)&&0<e.getModel().getChildCount(b)&&e.isCellEditable(b)&&
-this.addMenuItems(a,["-","ungroup"],null,f)}};
-Menus.prototype.addPopupMenuCellItems=function(a,b,f){var e=this.editorUi.editor.graph,g=e.view.getState(b);a.addSeparator();if(null!=g){var d=!1;this.isShowStyleItems()&&1==e.getSelectionCount()&&e.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=e.selectionCellsHandler.getHandler(b);var h=!1;g instanceof
-mxEdgeHandler&&null!=g.bends&&2<g.bends.length&&(d=g.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(f))),0<d&&d<g.bends.length-1&&(null==g.bends[d]||null==g.bends[d].node||""==g.bends[d].node.style.opacity)&&(h=this.editorUi.actions.get("removeWaypoint"),h.handler=g,h.index=d,h=!0));a.addSeparator();this.isShowCellEditItems()&&this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[h?"removeWaypoint":"addWaypoint"],null,f);g=e.getModel().getGeometry(b);d=null!=
-g&&null!=g.points&&0<g.points.length}1==e.getSelectionCount()&&this.isShowCellEditItems()&&(d||e.getModel().isVertex(b)&&0<e.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==e.getSelectionCount()&&e.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};Menus.prototype.isShowCellEditItems=function(){return!0};
-Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,e){if(this.isShowCellEditItems()){var g=this.editorUi.editor.graph,d=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],e,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(d.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",e,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",e,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||
-g.isContainer(b))&&this.addMenuItem(a,"editConnectionPoints",e,f)}};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
+Menus.prototype.createPopupMenu=function(a,b,f){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,b,f);this.addPopupMenuEditItems(a,b,f);this.isShowStyleItems()&&this.addPopupMenuStyleItems(a,b,f);this.isShowArrangeItems()&&this.addPopupMenuArrangeItems(a,b,f);this.addPopupMenuCellItems(a,b,f);this.addPopupMenuSelectionItems(a,b,f)};Menus.prototype.addPopupMenuHistoryItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,f)};
+Menus.prototype.addPopupMenuEditItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,f):(this.isShowCellEditItems()&&this.addMenuItems(a,["delete","-"],null,f),this.addMenuItems(a,["cut","copy","duplicate","lockUnlock"],null,f))};Menus.prototype.isShowStyleItems=function(){return!0};
+Menus.prototype.addPopupMenuStyleItems=function(a,b,f){1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,f):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,f)};Menus.prototype.isShowArrangeItems=function(){return!0};
+Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){var e=this.editorUi.editor.graph;(1<e.getSelectionCount()||0<e.getSelectionCount()&&!e.getModel().isEdge(b)&&!e.isSwimlane(b)&&0<e.getModel().getChildCount(b)&&e.isCellEditable(b))&&this.addMenuItems(a,["group","ungroup"],null,f);0<e.getEditableCells(e.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),this.isShowCellEditItems()&&1==e.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,
+f))};
+Menus.prototype.addPopupMenuCellItems=function(a,b,f){var e=this.editorUi.editor.graph,g=e.view.getState(b);a.addSeparator();if(null!=g){var d=!1;this.isShowStyleItems()&&1==e.getSelectionCount()&&e.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=e.selectionCellsHandler.getHandler(b);var h=!1;g instanceof mxEdgeHandler&&
+null!=g.bends&&2<g.bends.length&&(d=g.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(f))),0<d&&d<g.bends.length-1&&(null==g.bends[d]||null==g.bends[d].node||""==g.bends[d].node.style.opacity)&&(h=this.editorUi.actions.get("removeWaypoint"),h.handler=g,h.index=d,h=!0));a.addSeparator();this.isShowCellEditItems()&&this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[h?"removeWaypoint":"addWaypoint"],null,f);g=e.getModel().getGeometry(b);d=null!=g&&null!=g.points&&
+0<g.points.length}1==e.getSelectionCount()&&this.isShowCellEditItems()&&(d||e.getModel().isVertex(b)&&0<e.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);this.isShowCellEditItems()&&1==e.getSelectionCount()&&e.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};Menus.prototype.isShowCellEditItems=function(){return!0};
+Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],e,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(d.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",e,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",e,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||g.isContainer(b))&&this.addMenuItem(a,
+"editConnectionPoints",e,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),f=this.defaultMenuItems,e=0;e<f.length;e++)mxUtils.bind(this,function(g){var d=b.addMenu(mxResources.get(f[e]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,d)})(this.get(f[e]));return b};
Menus.prototype.menuCreated=function(a,b,f){null!=b&&(f=null!=f?f:"geItem",a.addListener("stateChanged",function(){(b.enabled=a.enabled)?(b.className=f,8==document.documentMode&&(b.style.color="")):(b.className=f+" mxDisabled",8==document.documentMode&&(b.style.color="#c3c3c3"))}))};function Menubar(a,b){this.editorUi=a;this.container=b}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
Menubar.prototype.addMenu=function(a,b,f,e){var g=document.createElement("a");g.className="geItem";mxUtils.write(g,a);this.addMenuHandler(g,b,e);null!=f?this.container.insertBefore(g,f):this.container.appendChild(g);return g};
@@ -11091,8 +11092,8 @@ C=[];for(var L=0;L<H.length;L++)C.push(H[L]);0<C.length&&z(C[G]);m.innerText="";
k.className="geBtn";F=null!=F?mxUtils.button(mxResources.get("ignore"),F):null;null!=F&&(F.className="geBtn");b.editor.cancelFirst?(e.appendChild(k),null!=F&&e.appendChild(F),e.appendChild(A),e.appendChild(v)):(e.appendChild(v),e.appendChild(A),null!=F&&e.appendChild(F),e.appendChild(k));J.appendChild(e);J.appendChild(g);this.container=J},FindWindow=function(b,f,k,d,u,v){function A(V,l,x,K){if("object"===typeof l.value&&null!=l.value.attributes){l=l.value.attributes;for(var O=0;O<l.length;O++)if("label"!=
l[O].nodeName){var R=mxUtils.trim(l[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(K&&0<=R.indexOf(x)||!K&&R.substring(0,x.length)===x)||null!=V&&V.test(R))return!0}}return!1}function F(){e&&C.value?(M.removeAttribute("disabled"),P.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));C.value&&G.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function I(V,l,x){L.innerText="";var K=D.model.getDescendants(D.model.getRoot()),
O=G.value.toLowerCase(),R=U.checked?new RegExp(O):null,Q=null;n=null;N!=O&&(N=O,c=null,g=!1);var S=null==c;if(0<O.length){if(g){g=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}V=(W+1)%b.pages.length;c=null;do g=!1,K=b.pages[V],D=b.createTemporaryGraph(D.getStylesheet()),b.updatePageRoot(K),D.model.setRoot(K.root),V=(V+1)%b.pages.length;while(!I(!0,l,x)&&V!=W);c&&(c=null,x?b.editor.graph.model.execute(new SelectPage(b,K)):b.selectPage(K));g=!1;D=b.editor.graph;return I(!0,
-l,x)}for(X=0;X<K.length;X++){W=D.view.getState(K[X]);l&&null!=R&&(S=S||W==c);if(null!=W&&null!=W.cell.value&&(S||null==Q)&&(D.model.isVertex(W.cell)||D.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(t.innerHTML=D.sanitizeHtml(D.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([t])):label=D.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Y=0;l&&v&&null!=R&&W==c&&(label=label.substr(q),Y=q);var Z=""==C.value,fa=Z;if(null==R&&(fa&&
-0<=label.indexOf(O)||!fa&&label.substring(0,O.length)===O||Z&&A(R,W.cell,O,fa))||null!=R&&(R.test(label)||Z&&A(R,W.cell,O,fa)))if(v&&(null!=R?(Z=label.match(R),null!=Z&&0<Z.length&&(n=Z[0].toLowerCase(),q=Y+Z.index+n.length)):(n=O,q=n.length)),S){Q=W;break}else null==Q&&(Q=W)}S=S||W==c}}if(null!=Q){if(X==K.length&&m.checked)return c=null,g=!0,I(!0,l,x);c=Q;D.scrollCellToVisible(c.cell);D.isEnabled()&&!D.isCellLocked(c.cell)?x||D.getSelectionCell()==c.cell&&1==D.getSelectionCount()||D.setSelectionCell(c.cell):
+l,x)}for(X=0;X<K.length;X++){W=D.view.getState(K[X]);l&&null!=R&&(S=S||W==c);if(null!=W&&null!=W.cell.value&&(S||null==Q)&&(D.model.isVertex(W.cell)||D.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(t.innerHTML=Graph.sanitizeHtml(D.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([t])):label=D.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Y=0;l&&v&&null!=R&&W==c&&(label=label.substr(q),Y=q);var Z=""==C.value,fa=Z;if(null==
+R&&(fa&&0<=label.indexOf(O)||!fa&&label.substring(0,O.length)===O||Z&&A(R,W.cell,O,fa))||null!=R&&(R.test(label)||Z&&A(R,W.cell,O,fa)))if(v&&(null!=R?(Z=label.match(R),null!=Z&&0<Z.length&&(n=Z[0].toLowerCase(),q=Y+Z.index+n.length)):(n=O,q=n.length)),S){Q=W;break}else null==Q&&(Q=W)}S=S||W==c}}if(null!=Q){if(X==K.length&&m.checked)return c=null,g=!0,I(!0,l,x);c=Q;D.scrollCellToVisible(c.cell);D.isEnabled()&&!D.isCellLocked(c.cell)?x||D.getSelectionCell()==c.cell&&1==D.getSelectionCount()||D.setSelectionCell(c.cell):
D.highlightCell(c.cell)}else{if(!V&&m.checked)return g=!0,I(!0,l,x);D.isEnabled()&&!x&&D.clearSelection()}e=null!=Q;v&&!V&&F();return 0==O.length||null!=Q}var J=b.actions.get("findReplace"),D=b.editor.graph,N=null,c=null,e=!1,g=!1,n=null,q=0,p=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var B=v?"260px":"200px",G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("find"));G.setAttribute("type",
"text");G.style.marginTop="4px";G.style.marginBottom="6px";G.style.width=B;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";y.appendChild(G);mxUtils.br(y);if(v){var C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("replaceWith"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=B;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";y.appendChild(C);mxUtils.br(y);mxEvent.addListener(C,
"input",F)}var U=document.createElement("input");U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";y.appendChild(U);B=document.createElement("label");B.setAttribute("for","geFindWinRegExChck");y.appendChild(B);mxUtils.write(B,mxResources.get("regularExpression"));y.appendChild(B);B=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");B.style.position="relative";B.style.marginLeft="6px";B.style.top="-1px";y.appendChild(B);mxUtils.br(y);
@@ -11493,7 +11494,7 @@ Z.fadeIn.delay));null!=Z.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(thi
1);this.setCellsVisible(ca,!0)}null!=Z.hide&&(Q(),ca=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ca),0),this.setCellsVisible(ca,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&(Q(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(Q(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));ca=[];null!=
Z.select&&this.isEnabled()&&(ca=this.getCellsForAction(Z.select),this.setSelectionCells(ca));null!=Z.highlight&&(ca=this.getCellsForAction(Z.highlight),this.highlightCells(ca,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));null!=Z.scroll&&(ca=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<ca.length&&this.scrollCellToVisible(ca[0]);if(null!=Z.tags){ca=[];null!=Z.tags.hidden&&(ca=ca.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var aa=
this.getAllTags(),ba=0;ba<aa.length;ba++)0>mxUtils.indexOf(Z.tags.visible,aa[ba])&&0>mxUtils.indexOf(ca,aa[ba])&&ca.push(aa[ba]);this.setHiddenTags(ca);this.refresh()}0<fa.length&&(O++,this.executeAnimations(fa,W,Y?1:Z.steps,Y?0:Z.delay));0==O?X():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=x&&x()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,x){var K=this.getLinkForCell(x);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(x,this.updateCustomLink(l,
-K));if(this.isHtmlLabel(x)){var O=document.createElement("div");O.innerHTML=this.sanitizeHtml(this.getLabel(x));for(var R=O.getElementsByTagName("a"),Q=!1,S=0;S<R.length;S++)K=R[S].getAttribute("href"),null!=K&&"data:action/json,"==K.substring(0,17)&&(R[S].setAttribute("href",this.updateCustomLink(l,K)),Q=!0);Q&&this.labelChanged(x,O.innerHTML)}};Graph.prototype.updateCustomLink=function(l,x){if("data:action/json,"==x.substring(0,17))try{var K=JSON.parse(x.substring(17));null!=K.actions&&(this.updateCustomLinkActions(l,
+K));if(this.isHtmlLabel(x)){var O=document.createElement("div");O.innerHTML=Graph.sanitizeHtml(this.getLabel(x));for(var R=O.getElementsByTagName("a"),Q=!1,S=0;S<R.length;S++)K=R[S].getAttribute("href"),null!=K&&"data:action/json,"==K.substring(0,17)&&(R[S].setAttribute("href",this.updateCustomLink(l,K)),Q=!0);Q&&this.labelChanged(x,O.innerHTML)}};Graph.prototype.updateCustomLink=function(l,x){if("data:action/json,"==x.substring(0,17))try{var K=JSON.parse(x.substring(17));null!=K.actions&&(this.updateCustomLinkActions(l,
K.actions),x="data:action/json,"+JSON.stringify(K))}catch(O){}return x};Graph.prototype.updateCustomLinkActions=function(l,x){for(var K=0;K<x.length;K++){var O=x[K],R;for(R in O)this.updateCustomLinkAction(l,O[R],"cells"),this.updateCustomLinkAction(l,O[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,x,K){if(null!=x&&null!=x[K]){for(var O=[],R=0;R<x[K].length;R++)if("*"==x[K][R])O.push(x[K][R]);else{var Q=l[x[K][R]];null!=Q?""!=Q&&O.push(Q):O.push(x[K][R])}x[K]=O}};Graph.prototype.getCellsForAction=
function(l,x){x=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,x));if(null!=l.excludeCells){for(var K=[],O=0;O<x.length;O++)0>l.excludeCells.indexOf(x[O].id)&&K.push(x[O]);x=K}return x};Graph.prototype.getCellsById=function(l){var x=[];if(null!=l)for(var K=0;K<l.length;K++)if("*"==l[K]){var O=this.model.getRoot();x=x.concat(this.model.filterDescendants(function(Q){return Q!=O},O))}else{var R=this.model.getCell(l[K]);null!=R&&x.push(R)}return x};var L=Graph.prototype.isCellVisible;
Graph.prototype.isCellVisible=function(l){return L.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(l){var x=mxUtils.indexOf(this.hiddenTags,l);0>x?this.hiddenTags.push(l):0<=x&&this.hiddenTags.splice(x,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||
@@ -11548,7 +11549,7 @@ function(){l.hideDialog();O(!1)}),ba.className="geBtn",x.appendChild(ba));ba=mxU
(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var T=document.createElement("canvas"),V=new Image;V.onload=function(){try{T.getContext("2d").drawImage(V,0,0);var l=T.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(x){}};
V.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.5.2";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.5.3";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,
boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,n,q,p,y){p=null!=p?p:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?
@@ -11748,7 +11749,7 @@ this.editor.graph;if(null!=c&&0<c.length){G.model.beginUpdate();try{var C=mxUtil
this.currentPage,t))}}else if(0<m.length){p=[];var z=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[m[0].getAttribute("id")]=this.pages[0].getId(),U=Editor.parseDiagramNode(m[0]),n=!1,z=1);for(;z<m.length;z++){var H=m[z].getAttribute("id");m[z].removeAttribute("id");var L=this.updatePageRoot(new DiagramPage(m[z]));c[H]=m[z].getAttribute("id");var E=this.pages.length;null==L.getName()&&L.setName(mxResources.get("pageWithNumber",[E+1]));G.model.execute(new ChangePage(this,L,L,E,
!0));p.push(L)}this.updatePageLinks(c,p)}}if(null!=U&&"mxGraphModel"===U.nodeName){B=G.importGraphModel(U,e,g,n);if(null!=B)for(z=0;z<B.length;z++)this.updatePageLinksForCell(c,B[z]);var M=G.parseBackgroundImage(U.getAttribute("backgroundImage"));if(null!=M&&null!=M.originalSrc){this.updateBackgroundPageLink(c,M);var P=new ChangePageSetup(this,null,M);P.ignoreColor=!0;G.model.execute(P)}}y&&this.insertHandler(B,null,null,G.defaultVertexStyle,G.defaultEdgeStyle,!1,!0)}finally{G.model.endUpdate()}}}catch(T){if(q)throw T;
this.handleError(T)}return B};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
-function(c,e){var g=document.createElement("div"),n=this.editor.graph,q=n.getLinkForCell(e);null!=q&&n.setLinkForCell(e,this.updatePageLink(c,q));if(n.isHtmlLabel(e)){g.innerHTML=n.sanitizeHtml(n.getLabel(e));for(var p=g.getElementsByTagName("a"),y=!1,B=0;B<p.length;B++)q=p[B].getAttribute("href"),null!=q&&(p[B].setAttribute("href",this.updatePageLink(c,q)),y=!0);y&&n.labelChanged(e,g.innerHTML)}for(B=0;B<n.model.getChildCount(e);B++)this.updatePageLinksForCell(c,n.model.getChildAt(e,B))};EditorUi.prototype.updatePageLink=
+function(c,e){var g=document.createElement("div"),n=this.editor.graph,q=n.getLinkForCell(e);null!=q&&n.setLinkForCell(e,this.updatePageLink(c,q));if(n.isHtmlLabel(e)){g.innerHTML=Graph.sanitizeHtml(n.getLabel(e));for(var p=g.getElementsByTagName("a"),y=!1,B=0;B<p.length;B++)q=p[B].getAttribute("href"),null!=q&&(p[B].setAttribute("href",this.updatePageLink(c,q)),y=!0);y&&n.labelChanged(e,g.innerHTML)}for(B=0;B<n.model.getChildCount(e);B++)this.updatePageLinksForCell(c,n.model.getChildAt(e,B))};EditorUi.prototype.updatePageLink=
function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var n=JSON.parse(e.substring(17));if(null!=n.actions){for(var q=0;q<n.actions.length;q++){var p=n.actions[q];if(null!=p.open&&Graph.isPageLink(p.open)){var y=p.open.substring(p.open.indexOf(",")+1);g=c[y];null!=g?p.open="data:page/id,"+g:null==this.getPageById(y)&&delete p.open}}e="data:action/json,"+JSON.stringify(n)}}catch(B){}return e};
EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,n,q){n=null!=n?n:c.name;g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var y=this.isRemoteVisioFormat(n);try{var B="UNKNOWN-VISIO",G=n.lastIndexOf(".");if(0<=G&&G<n.length)B=n.substring(G+1).toUpperCase();else{var C=n.lastIndexOf("/");0<=
C&&C<n.length&&(n=n.substring(C+1))}EditorUi.logEvent({category:B+"-MS-IMPORT-FILE",action:"filename_"+n,label:y?"remote":"local"})}catch(m){}if(y)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{y=new FormData;y.append("file1",c,n);var U=new XMLHttpRequest;U.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));U.responseType="blob";this.addRemoteServiceSecurityCheck(U);
@@ -11804,59 +11805,60 @@ arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e
null!=M[P][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(M[P][EditorUi.DIFF_REMOVE],E)){e.refreshBackgroundImage();break}}}));var p=e.getBackgroundImageObject;e.getBackgroundImageObject=function(E,M){var P=p.apply(this,arguments);if(null!=P&&null!=P.originalSrc)if(!M)P={src:P.originalSrc};else if(M&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var T=this.stylesheet,V=this.shapeForegroundColor,l=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";
this.shapeForegroundColor="#000000";P=c.createImageForPageLink(P.originalSrc);this.shapeBackgroundColor=l;this.shapeForegroundColor=V;this.stylesheet=T}return P};var y=this.clearDefaultStyle;this.clearDefaultStyle=function(){y.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl=
"https://app.diagrams.net/";var B=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(E){E=null!=E?E:"";"1"==urlParams.dev&&(E+=(0<E.length?"&":"?")+"dev=1");return B.apply(this,arguments)};var G=e.addClickHandler;e.addClickHandler=function(E,M,P){var T=M;M=function(V,l){if(null==l){var x=mxEvent.getSource(V);"a"==x.nodeName.toLowerCase()&&(l=x.getAttribute("href"))}null!=l&&e.isCustomLink(l)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&e.customLinkClicked(l)&&mxEvent.consume(V);
-null!=T&&T(V,l)};G.call(this,E,M,P)};u.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(E,M,P){c.editor.graph.isSelectionEmpty()?(C.apply(this,arguments),c.menus.addMenuItems(E,["-","copyAsImage"],null,P)):(this.isShowCellEditItems()&&this.addMenuItems(E,["delete","-"],null,P),this.addMenuItems(E,"cut copy copyAsImage duplicate - lockUnlock".split(" "),
-null,P))};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var U=e.getExportVariables;e.getExportVariables=
-function(){var E=U.apply(this,arguments),M=c.getCurrentFile();null!=M&&(E.filename=M.getTitle());E.pagecount=null!=c.pages?c.pages.length:1;E.page=null!=c.currentPage?c.currentPage.getName():"";E.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return E};var m=e.getGlobalVariable;e.getGlobalVariable=function(E){var M=c.getCurrentFile();return"filename"==E&&null!=M?M.getTitle():"page"==E&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==E?null!=c.currentPage&&
-null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==E?null!=c.pages?c.pages.length:1:m.apply(this,arguments)};var t=e.labelLinkClicked;e.labelLinkClicked=function(E,M,P){var T=M.getAttribute("href");if(null==T||!e.isCustomLink(T)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))t.apply(this,arguments);else{if(!e.isEnabled()||null!=E&&e.isCellLocked(E.cell))e.customLinkClicked(T),e.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var E=c.defaultFilename,
-M=c.getCurrentFile();null!=M&&(E=null!=M.getTitle()?M.getTitle():E);return E};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,
-!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",
-mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(E){var M=e.cellEditor.text2,P=null;null!=M&&(mxEvent.addListener(M,"dragleave",function(T){null!=P&&(P.parentNode.removeChild(P),P=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(T){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=this.highlightElement(M));
-T.stopPropagation();T.preventDefault()})),mxEvent.addListener(M,"drop",mxUtils.bind(this,function(T){null!=P&&(P.parentNode.removeChild(P),P=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(l,x,K,O,R,Q){e.insertImage(l,R,Q)},function(){},function(l){return"image/"==l.type.substring(0,6)},function(l){for(var x=0;x<l.length;x++)l[x]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(l){var x=Math.max(1,l.width);l=Math.max(1,l.height);var K=this.maxImageSize;K=Math.min(1,Math.min(K/Math.max(1,x)),K/Math.max(1,l));e.insertImage(decodeURIComponent(V),x*K,l*K)})):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()})))}));this.isSettingsEnabled()&&(z=this.editor.graph.view,z.setUnit(mxSettings.getUnit()),z.addListener("unitChanged",function(E,M){mxSettings.setUnit(M.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,
-z.unit),this.refresh());if("1"==urlParams.styledev){z=document.getElementById("geFooter");null!=z&&(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)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,M){0<this.editor.graph.getSelectionCount()?(E=this.editor.graph.getSelectionCell(),E=this.editor.graph.getModel().getStyle(E),this.styleInput.value=E||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(E){return mxEvent.getSource(E)==this.styleInput?
-!0:H.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var L=null;mxEvent.addListener(e.container,"dragleave",function(E){e.isEnabled()&&(null!=L&&(L.parentNode.removeChild(L),L=null),E.stopPropagation(),E.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(E){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=this.highlightElement(e.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();E.stopPropagation();E.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(E){null!=L&&(L.parentNode.removeChild(L),L=null);if(e.isEnabled()){var M=mxUtils.convertPoint(e.container,mxEvent.getClientX(E),mxEvent.getClientY(E)),P=E.dataTransfer.files,T=e.view.translate,V=e.view.scale,l=M.x/V-T.x,x=M.y/V-T.y;if(0<P.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(E)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
-this.fileLoaded(null),this.openFiles(P,!0)):(mxEvent.isAltDown(E)&&(x=l=null),this.importFiles(P,l,x,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(E),null,null,mxEvent.isShiftDown(E),E));else{mxEvent.isAltDown(E)&&(x=l=0);var K=0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")?E.dataTransfer.getData("text/uri-list"):null;M=this.extractGraphModelFromEvent(E,null!=this.pages);if(null!=M)e.setSelectionCells(this.importXml(M,l,x,!0));else if(0<=mxUtils.indexOf(E.dataTransfer.types,
-"text/html")){var O=E.dataTransfer.getData("text/html");M=document.createElement("div");M.innerHTML=e.sanitizeHtml(O);var R=null;P=M.getElementsByTagName("img");null!=P&&1==P.length?(O=P[0].getAttribute("src"),null==O&&(O=P[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)||(R=!0)):(P=M.getElementsByTagName("a"),null!=P&&1==P.length?O=P[0].getAttribute("href"):(M=M.getElementsByTagName("pre"),null!=M&&1==M.length&&(O=mxUtils.getTextContent(M[0]))));var Q=!0,S=mxUtils.bind(this,
-function(){e.setSelectionCells(this.insertTextAt(O,l,x,!0,R,null,Q,mxEvent.isControlDown(E)))});R&&null!=O&&O.length>this.resampleThreshold?this.confirmImageResize(function(W){Q=W;S()},mxEvent.isControlDown(E)):S()}else null!=K&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(K)?this.loadImage(decodeURIComponent(K),mxUtils.bind(this,function(W){var X=Math.max(1,W.width);W=Math.max(1,W.height);var Y=this.maxImageSize;Y=Math.min(1,Math.min(Y/Math.max(1,X)),Y/Math.max(1,W));e.setSelectionCell(e.insertVertex(null,
-null,"",l,x,X*Y,W*Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+K+";"))}),mxUtils.bind(this,function(W){e.setSelectionCells(this.insertTextAt(K,l,x,!0))})):0<=mxUtils.indexOf(E.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(E.dataTransfer.getData("text/plain"),l,x,!0))}}E.stopPropagation();E.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
-z=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",z);this.addListener("sketchModeChanged",z);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));e.addListener("enabledChanged",mxUtils.bind(this,function(){e.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);
-else{var E=parseInt(this.div.offsetLeft),M=parseInt(this.div.offsetWidth),P=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),V=parseInt(this.div.offsetHeight),l=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(E,P-M))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,l-V))+"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("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme)z=Editor.currentTheme,Editor.currentTheme="",this.doSetCurrentTheme(z,0,mxUtils.bind(this,function(){"1"==urlParams.embedInline&&this.initializeInlineEmbedMode()}));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(z=!1,window.matchMedia&&this.isAutoDarkMode()?z=window.matchMedia("(prefers-color-scheme: dark)").matches:
-this.isSettingsEnabled()&&!0===mxSettings.settings.darkMode&&(z=!0),(z||"dark"==uiTheme||"1"==urlParams.dark)&&this.setDarkMode(!0));if(window.matchMedia)try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(E){this.isAutoDarkMode()&&this.setDarkMode(E.matches)}))}catch(E){}else this.isSettingsEnabled()&&!0===mxSettings.settings.darkMode&&(z=!0);this.installSettings();"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};EditorUi.prototype.initializeInlineEmbedMode=
-function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,g=this.sketchPickerMenuElt,n=this.editor.graph;g.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 q=document.createElement("div");q.style.position="absolute";q.style.width=
-"10px";q.style.height="10px";q.style.borderRadius="5px";q.style.border="1px solid gray";q.style.background="#ffffff";q.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(q);this.bottomResizer=q;var p=null,y=null,B=null,G=null;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(C){G=parseInt(this.diagramContainer.style.height);y=mxEvent.getClientY(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));q=q.cloneNode(!1);q.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(q);
-this.rightResizer=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(C){B=parseInt(this.diagramContainer.style.width);p=mxEvent.getClientX(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var U=!1;null!=p&&(this.diagramContainer.style.width=Math.max(20,B+mxEvent.getClientX(C)-p)+"px",U=!0);null!=y&&(this.diagramContainer.style.height=Math.max(20,G+mxEvent.getClientY(C)-y)+"px",U=!0);U&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(C){null==p&&null==y||mxEvent.consume(C);y=p=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";e.style.visibility="hidden";c.style.visibility="hidden";g.style.display="none";
-this.addListener("editInlineStart",mxUtils.bind(this,function(C){this.inlineSizeChanged();this.fitWindows()}));this.addListener("darkModeChanged",mxUtils.bind(this,function(C){this.inlineSizeChanged()}));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";e.style.visibility="hidden";
-c.style.visibility="hidden";g.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,n=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){n=!0;break}if(!n){var p=g.items;for(index in p){var y=
-p[index];if("file"===y.kind){if(c.isEditing())this.importFiles([y.getAsFile()],0,0,this.maxImageSize,function(G,C,U,m,t,z){c.insertImage(G,t,z)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var C=0;C<G.length;C++)G[C]()});else{var B=this.editor.graph.getInsertPoint();this.importFiles([y.getAsFile()],B.x,B.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(G){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML=
-"&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow=
-"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var y=mxEvent.getSource(p);null==e.container||!e.isEnabled()||e.isMouseDown||
-e.isEditing()||null!=this.dialog||"INPUT"==y.nodeName||"TEXTAREA"==y.nodeName||224!=p.keyCode&&(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||n||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",p=e.container.scrollLeft,y=e.container.scrollTop,e.container.appendChild(g),n=!0,g.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=p,e.container.scrollTop=y)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
-function(p){var y=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=y&&17!=y&&91!=y&&93!=y||(n=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),
-this.copyCells(g,!0),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(p){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=p.clipboardData&&this.pasteCells(p,g,!0,!0),!mxEvent.isConsumed(p))){var y=e.container.scrollLeft,B=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){e.container.scrollLeft=y;e.container.scrollTop=B;this.pasteCells(p,g,!1,!0)}),0)}}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=
-function(p){return mxEvent.getSource(p)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){c=null!=c?c:Editor.currentTheme;return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,e,g){function n(G){return"simple"==G||0==e&&"sketch"==G}e=null!=e?e:100;var q=Editor.currentTheme,
-p=n(q)&&this.isDefaultTheme(c)||this.isDefaultTheme(q)&&n(c),y=p&&"sketch"!=c&&"sketch"!=q;if(p&&!this.themeSwitching){Editor.currentTheme=c;this.themeSwitching=!0;var B=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+e+"ms");0==e&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){n(q)&&this.isDefaultTheme(c)?(null!=this.sidebarFooterContainer&&(this.sidebarFooterContainer.style.display=
-"block"),this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):this.isDefaultTheme(q)&&n(c)&&(null!=this.sidebarFooterContainer&&(this.sidebarFooterContainer.style.display="none"),this.menubarContainer.style.display="none",this.toolbarContainer.style.display=
-"none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(c);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(B);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",
-null);delete this.themeSwitching;null!=g&&g()}),e)}),e)}),e)}),0)}return y};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var e=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||e||(this.statusContainer.style.display="none")}));
-var g=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;e=null!=n&&null!=n.getAttribute("class");if(!e&&null!=n){n=n.getAttribute("title");var q=this.getCurrentFile();q=null!=q?q.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(q)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(q))+
-'..."src="'+Editor.tailSpin+'"></div>',e=!0)}this.statusContainer.style.display="none";n=32>=c.clientWidth;c.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||e)this.statusContainer.style.display="inline-flex",e=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",g);
-g()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,
-this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createPickerMenuForTheme(c);this.createMainMenuForTheme(c);this.createMenubarForTheme(c);this.createFooterMenuForTheme(c);this.sidebarContainer.style.display="";if("simple"==c||"sketch"==c)this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=
-"",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="63px",this.sidebarContainer.style.width="100%";null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};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(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.setVisible(!1)};EditorUi.prototype.destroyWindows=
-function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(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.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 e=this.editor.graph;e.defaultEdgeLength=Graph.prototype.defaultEdgeLength;e.defaultGridEnabled=
-Graph.prototype.defaultGridEnabled;e.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);"simple"==c||"sketch"==c?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" 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="#C0C0C0" stroke-width="2" fill="none"/>').src,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),e.defaultEdgeLength=120,null==urlParams.grid&&(e.defaultGridEnabled=!1),null==urlParams.pv&&(e.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};
-EditorUi.prototype.switchCssForTheme=function(c){"simple"==c||"sketch"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(c){"simple"==
-c||"sketch"==c?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
-EditorUi.prototype.createMainMenuForTheme=function(c){"simple"!=c&&"sketch"!=c||null!=this.sketchMainMenuElt||(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
-Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(c){if(("simple"==c||"sketch"==c)&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className=
+null!=T&&T(V,l)};G.call(this,E,M,P)};u.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(E,M,P){if(c.editor.graph.isSelectionEmpty())C.apply(this,arguments),c.menus.addMenuItems(E,["-","copyAsImage"],null,P);else if(this.isShowCellEditItems()?this.addMenuItems(E,["delete","-"],null,P):this.addPopupMenuArrangeItems(E,M,P),this.addMenuItems(E,
+"- cut copy copyAsImage duplicate lockUnlock".split(" "),null,P),!this.isShowCellEditItems()&&1==e.getSelectionCount()&&e.isCellEditable(M)&&e.getModel().isVertex(M)){var T=e.view.getState(M);null!=T&&null!=mxUtils.getValue(T.style,mxConstants.STYLE_IMAGE,null)&&(E.addSeparator(),this.addMenuItem(E,"crop",null,P))}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;
+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var U=e.getExportVariables;e.getExportVariables=function(){var E=U.apply(this,arguments),M=c.getCurrentFile();null!=M&&(E.filename=M.getTitle());E.pagecount=null!=c.pages?c.pages.length:1;E.page=null!=c.currentPage?c.currentPage.getName():"";E.pagenumber=
+null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return E};var m=e.getGlobalVariable;e.getGlobalVariable=function(E){var M=c.getCurrentFile();return"filename"==E&&null!=M?M.getTitle():"page"==E&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==E?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==E?null!=c.pages?c.pages.length:1:m.apply(this,arguments)};var t=e.labelLinkClicked;e.labelLinkClicked=function(E,M,P){var T=M.getAttribute("href");
+if(null==T||!e.isCustomLink(T)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))t.apply(this,arguments);else{if(!e.isEnabled()||null!=E&&e.isCellLocked(E.cell))e.customLinkClicked(T),e.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var E=c.defaultFilename,M=c.getCurrentFile();null!=M&&(E=null!=M.getTitle()?M.getTitle():E);return E};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||
+this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),
+this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(E){var M=e.cellEditor.text2,
+P=null;null!=M&&(mxEvent.addListener(M,"dragleave",function(T){null!=P&&(P.parentNode.removeChild(P),P=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(T){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=this.highlightElement(M));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(M,"drop",mxUtils.bind(this,function(T){null!=P&&(P.parentNode.removeChild(P),P=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,
+0,0,this.maxImageSize,function(l,x,K,O,R,Q){e.insertImage(l,R,Q)},function(){},function(l){return"image/"==l.type.substring(0,6)},function(l){for(var x=0;x<l.length;x++)l[x]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var V=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(l){var x=Math.max(1,l.width);l=Math.max(1,l.height);var K=this.maxImageSize;K=Math.min(1,
+Math.min(K/Math.max(1,x)),K/Math.max(1,l));e.insertImage(decodeURIComponent(V),x*K,l*K)})):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()})))}));this.isSettingsEnabled()&&(z=
+this.editor.graph.view,z.setUnit(mxSettings.getUnit()),z.addListener("unitChanged",function(E,M){mxSettings.setUnit(M.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,z.unit),this.refresh());if("1"==urlParams.styledev){z=document.getElementById("geFooter");null!=z&&(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)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(E,M){0<this.editor.graph.getSelectionCount()?(E=this.editor.graph.getSelectionCell(),E=this.editor.graph.getModel().getStyle(E),this.styleInput.value=E||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(E){return mxEvent.getSource(E)==this.styleInput?!0:H.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var L=null;mxEvent.addListener(e.container,"dragleave",function(E){e.isEnabled()&&(null!=L&&(L.parentNode.removeChild(L),L=null),E.stopPropagation(),E.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(E){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();E.stopPropagation();E.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,
+function(E){null!=L&&(L.parentNode.removeChild(L),L=null);if(e.isEnabled()){var M=mxUtils.convertPoint(e.container,mxEvent.getClientX(E),mxEvent.getClientY(E)),P=E.dataTransfer.files,T=e.view.translate,V=e.view.scale,l=M.x/V-T.x,x=M.y/V-T.y;if(0<P.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(E)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(P,!0)):(mxEvent.isAltDown(E)&&(x=l=null),this.importFiles(P,l,x,this.maxImageSize,null,null,null,
+null,mxEvent.isControlDown(E),null,null,mxEvent.isShiftDown(E),E));else{mxEvent.isAltDown(E)&&(x=l=0);var K=0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")?E.dataTransfer.getData("text/uri-list"):null;M=this.extractGraphModelFromEvent(E,null!=this.pages);if(null!=M)e.setSelectionCells(this.importXml(M,l,x,!0));else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/html")){var O=E.dataTransfer.getData("text/html");M=document.createElement("div");M.innerHTML=Graph.sanitizeHtml(O);var R=null;
+P=M.getElementsByTagName("img");null!=P&&1==P.length?(O=P[0].getAttribute("src"),null==O&&(O=P[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)||(R=!0)):(P=M.getElementsByTagName("a"),null!=P&&1==P.length?O=P[0].getAttribute("href"):(M=M.getElementsByTagName("pre"),null!=M&&1==M.length&&(O=mxUtils.getTextContent(M[0]))));var Q=!0,S=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(O,l,x,!0,R,null,Q,mxEvent.isControlDown(E)))});R&&null!=O&&O.length>this.resampleThreshold?
+this.confirmImageResize(function(W){Q=W;S()},mxEvent.isControlDown(E)):S()}else null!=K&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(K)?this.loadImage(decodeURIComponent(K),mxUtils.bind(this,function(W){var X=Math.max(1,W.width);W=Math.max(1,W.height);var Y=this.maxImageSize;Y=Math.min(1,Math.min(Y/Math.max(1,X)),Y/Math.max(1,W));e.setSelectionCell(e.insertVertex(null,null,"",l,x,X*Y,W*Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+K+";"))}),mxUtils.bind(this,function(W){e.setSelectionCells(this.insertTextAt(K,l,x,!0))})):0<=mxUtils.indexOf(E.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(E.dataTransfer.getData("text/plain"),l,x,!0))}}E.stopPropagation();E.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();z=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",
+z);this.addListener("sketchModeChanged",z);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));e.addListener("enabledChanged",mxUtils.bind(this,function(){e.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var E=parseInt(this.div.offsetLeft),M=parseInt(this.div.offsetWidth),P=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),
+V=parseInt(this.div.offsetHeight),l=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(E,P-M))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,l-V))+"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("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme)z=
+Editor.currentTheme,Editor.currentTheme="",this.doSetCurrentTheme(z,0,mxUtils.bind(this,function(){"1"==urlParams.embedInline&&this.initializeInlineEmbedMode()}));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(z=!1,window.matchMedia&&this.isAutoDarkMode()?z=window.matchMedia("(prefers-color-scheme: dark)").matches:this.isSettingsEnabled()&&!0===mxSettings.settings.darkMode&&(z=!0),(z||"dark"==uiTheme||"1"==urlParams.dark)&&
+this.setDarkMode(!0));if(window.matchMedia)try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(E){this.isAutoDarkMode()&&this.setDarkMode(E.matches)}))}catch(E){}else this.isSettingsEnabled()&&!0===mxSettings.settings.darkMode&&(z=!0);this.installSettings();"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,g=this.sketchPickerMenuElt,
+n=this.editor.graph;g.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 q=document.createElement("div");q.style.position="absolute";q.style.width="10px";q.style.height="10px";q.style.borderRadius="5px";q.style.border="1px solid gray";q.style.background=
+"#ffffff";q.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(q);this.bottomResizer=q;var p=null,y=null,B=null,G=null;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(C){G=parseInt(this.diagramContainer.style.height);y=mxEvent.getClientY(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));q=q.cloneNode(!1);q.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(q);this.rightResizer=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(C){B=parseInt(this.diagramContainer.style.width);
+p=mxEvent.getClientX(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var U=!1;null!=p&&(this.diagramContainer.style.width=Math.max(20,B+mxEvent.getClientX(C)-p)+"px",U=!0);null!=y&&(this.diagramContainer.style.height=Math.max(20,G+mxEvent.getClientY(C)-y)+"px",U=!0);U&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
+"*"),this.inlineSizeChanged(),this.refresh())}),function(C){null==p&&null==y||mxEvent.consume(C);y=p=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";e.style.visibility="hidden";c.style.visibility="hidden";g.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(C){this.inlineSizeChanged();
+this.fitWindows()}));this.addListener("darkModeChanged",mxUtils.bind(this,function(C){this.inlineSizeChanged()}));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";e.style.visibility="hidden";c.style.visibility="hidden";g.style.display="none"}));this.windowResized=mxUtils.bind(this,
+function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,n=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){n=!0;break}if(!n){var p=g.items;for(index in p){var y=p[index];if("file"===y.kind){if(c.isEditing())this.importFiles([y.getAsFile()],0,0,this.maxImageSize,
+function(G,C,U,m,t,z){c.insertImage(G,t,z)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var C=0;C<G.length;C++)G[C]()});else{var B=this.editor.graph.getInsertPoint();this.importFiles([y.getAsFile()],B.x,B.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(G){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,
+g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize=
+"none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var y=mxEvent.getSource(p);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==y.nodeName||"TEXTAREA"==y.nodeName||224!=p.keyCode&&
+(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||n||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",p=e.container.scrollLeft,y=e.container.scrollTop,e.container.appendChild(g),n=!0,g.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=p,e.container.scrollTop=y)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var y=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=y&&
+17!=y&&91!=y&&93!=y||(n=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(g,
+"paste",mxUtils.bind(this,function(p){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=p.clipboardData&&this.pasteCells(p,g,!0,!0),!mxEvent.isConsumed(p))){var y=e.container.scrollLeft,B=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){e.container.scrollLeft=y;e.container.scrollTop=B;this.pasteCells(p,g,!1,!0)}),0)}}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==g?!0:q.apply(this,
+arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){c=null!=c?c:Editor.currentTheme;return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,e,g){function n(G){return"simple"==G||0==e&&"sketch"==G}e=null!=e?e:100;var q=Editor.currentTheme,p=n(q)&&this.isDefaultTheme(c)||this.isDefaultTheme(q)&&
+n(c),y=p&&"sketch"!=c&&"sketch"!=q;if(p&&!this.themeSwitching){Editor.currentTheme=c;this.themeSwitching=!0;var B=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+e+"ms");0==e&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){n(q)&&this.isDefaultTheme(c)?(null!=this.sidebarFooterContainer&&(this.sidebarFooterContainer.style.display="block"),this.menubarContainer.style.display=
+"block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):this.isDefaultTheme(q)&&n(c)&&(null!=this.sidebarFooterContainer&&(this.sidebarFooterContainer.style.display="none"),this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
+"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(c);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(B);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;
+null!=g&&g()}),e)}),e)}),e)}),0)}return y};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var e=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||e||(this.statusContainer.style.display="none")}));var g=mxUtils.bind(this,function(){if("sketch"==
+Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;e=null!=n&&null!=n.getAttribute("class");if(!e&&null!=n){n=n.getAttribute("title");var q=this.getCurrentFile();q=null!=q?q.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(q)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(q))+'..."src="'+Editor.tailSpin+'"></div>',
+e=!0)}this.statusContainer.style.display="none";n=32>=c.clientWidth;c.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||e)this.statusContainer.style.display="inline-flex",e=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",g);g()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&
+null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));
+this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createPickerMenuForTheme(c);this.createMainMenuForTheme(c);this.createMenubarForTheme(c);this.createFooterMenuForTheme(c);this.sidebarContainer.style.display="";if("simple"==c||"sketch"==c)this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex=
+"",this.formatContainer.style.border="none",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="63px",this.sidebarContainer.style.width="100%";null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};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(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=
+this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(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.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 e=this.editor.graph;e.defaultEdgeLength=Graph.prototype.defaultEdgeLength;e.defaultGridEnabled=Graph.prototype.defaultGridEnabled;
+e.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);"simple"==c||"sketch"==c?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" 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="#C0C0C0" stroke-width="2" fill="none"/>').src,
+Editor.fitWindowBorders=new mxRectangle(60,30,30,30),e.defaultEdgeLength=120,null==urlParams.grid&&(e.defaultGridEnabled=!1),null==urlParams.pv&&(e.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(c){"simple"==c||"sketch"==c?null==this.sketchStyleElt&&
+(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(c){"simple"==c||"sketch"==c?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),
+this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=
+function(c){"simple"!=c&&"sketch"!=c||null!=this.sketchMainMenuElt||(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),
+this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(c){if(("simple"==c||"sketch"==c)&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className=
"geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";c=this.sketchFooterMenuElt;var e=this.createPageMenuTab(!1,!0);e.className="geToolbarButton";e.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";
c.appendChild(e);var g=mxUtils.bind(this,function(){e.innerText="";if(null!=this.currentPage){mxUtils.write(e,this.currentPage.getName());var q=null!=this.pages?this.pages.length:1,p=this.getPageIndex(this.currentPage);p=null!=p?p+1:1;var y=this.currentPage.getId();e.setAttribute("title",this.currentPage.getName()+" ("+p+"/"+q+")"+(null!=y?" ["+y+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",
g);g();g=mxUtils.bind(this,function(){e.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",g);this.editor.addListener("pagesPatched",g);g();c.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));g=this.createMenu("viewZoom");g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";
@@ -11937,7 +11939,7 @@ U=!1;try{var m=C.lastIndexOf("%3E");0<=m&&m<C.length-3&&(C=C.substring(0,m+3))}c
this.pasteXml(C,n,U,c)}catch(H){console.log("Miro import error:",H)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",t):t()}else this.pasteXml(C,n,U,c);try{mxEvent.consume(c)}catch(H){}}else if(!g){var z=this.editor.graph;z.lastPasteXml=null;z.pasteCounter=0}}catch(H){this.handleError(H)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(n){null!=
e&&(e.parentNode.removeChild(e),e=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(n){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<
n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(n);if(null==q){var p=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?q=p.getData("Text"):(q=null,q=0<=mxUtils.indexOf(p.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):
-0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=q&&0<q.length?(p=document.createElement("div"),p.innerHTML=this.editor.graph.sanitizeHtml(q),p=p.getElementsByTagName("img"),0<p.length&&(q=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(q=p.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),
+0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=q&&0<q.length?(p=document.createElement("div"),p.innerHTML=Graph.sanitizeHtml(q),p=p.getElementsByTagName("img"),0<p.length&&(q=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(q=p.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),
mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(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(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+
"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var n=document.body;var q=document.documentElement;var p=(n.clientWidth||q.clientWidth)-3;n=Math.max(n.clientHeight||0,q.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,p=c.clientWidth,n=c.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+
2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=e+"px";q.style.left=g+"px";q.style.width=Math.max(0,p-3)+"px";q.style.height=Math.max(0,n-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),
@@ -11994,62 +11996,62 @@ this.editor.fireEvent(new mxEventObject("statusChanged"))):null!=this.menubar&&(
this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():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",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),n=[],q=[],p=[],y={};if(0<g.length){var B=
{},G=this.editor.graph,C=null,U=null,m=null,t=null,z=null,H=null,L=null,E="whiteSpace=wrap;html=1;",M=null,P=null,T="",V="auto",l="auto",x=!1,K=null,O=null,R=40,Q=40,S=100,W=0,X=mxUtils.bind(this,function(){null!=e?e(oa):(G.setSelectionCells(oa),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=G.getFreeInsertPoint(),Z=Y.x,fa=Y.y;Y=fa;var ca=null,aa="auto";P=null;for(var ba=[],ea=null,Ba=null,
-pa=0;pa<g.length&&"#"==g[pa].charAt(0);){c=g[pa].replace(/\r$/,"");for(pa++;pa<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[pa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[pa].substring(1)),pa++;if("#"!=c.charAt(1)){var ya=c.indexOf(":");if(0<ya){var la=mxUtils.trim(c.substring(1,ya)),ha=mxUtils.trim(c.substring(ya+1));"label"==la?ca=G.sanitizeHtml(ha):"labelname"==la&&0<ha.length&&"-"!=ha?z=ha:"labels"==la&&0<ha.length&&"-"!=ha?L=JSON.parse(ha):"style"==la?U=ha:"parentstyle"==la?E=ha:"unknownStyle"==
-la&&"-"!=ha?H=ha:"stylename"==la&&0<ha.length&&"-"!=ha?t=ha:"styles"==la&&0<ha.length&&"-"!=ha?m=JSON.parse(ha):"vars"==la&&0<ha.length&&"-"!=ha?C=JSON.parse(ha):"identity"==la&&0<ha.length&&"-"!=ha?M=ha:"parent"==la&&0<ha.length&&"-"!=ha?P=ha:"namespace"==la&&0<ha.length&&"-"!=ha?T=ha:"width"==la?V=ha:"height"==la?l=ha:"collapsed"==la&&"-"!=ha?x="true"==ha:"left"==la&&0<ha.length?K=ha:"top"==la&&0<ha.length?O=ha:"ignore"==la?Ba=ha.split(","):"connect"==la?ba.push(JSON.parse(ha)):"link"==la?ea=ha:
-"padding"==la?W=parseFloat(ha):"edgespacing"==la?R=parseFloat(ha):"nodespacing"==la?Q=parseFloat(ha):"levelspacing"==la?S=parseFloat(ha):"layout"==la&&(aa=ha)}}}if(null==g[pa])throw Error(mxResources.get("invalidOrMissingFile"));var Ta=this.editor.csvToArray(g[pa].replace(/\r$/,""));ya=c=null;la=[];for(ha=0;ha<Ta.length;ha++)M==Ta[ha]&&(c=ha),P==Ta[ha]&&(ya=ha),la.push(mxUtils.trim(Ta[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ca&&(ca="%"+la[0]+"%");if(null!=ba)for(var Ea=
-0;Ea<ba.length;Ea++)null==B[ba[Ea].to]&&(B[ba[Ea].to]={});M=[];for(ha=pa+1;ha<g.length;ha++){var Ga=this.editor.csvToArray(g[ha].replace(/\r$/,""));if(null==Ga){var Ka=40<g[ha].length?g[ha].substring(0,40)+"...":g[ha];throw Error(Ka+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<Ga.length&&M.push(Ga)}G.model.beginUpdate();try{for(ha=0;ha<M.length;ha++){Ga=M[ha];var ua=null,Ca=null!=c?T+Ga[c]:null;g=!1;null!=Ca&&(ua=G.model.getCell(Ca),g=null==ua||0<=mxUtils.indexOf(n,ua));var ta=new mxCell(ca,
-new mxGeometry(Z,Y,0,0),U||"whiteSpace=wrap;html=1;");ta.collapsed=x;ta.vertex=!0;ta.id=Ca;null==ua||g||G.model.setCollapsed(ua,x);for(var sa=0;sa<Ga.length;sa++)G.setAttributeForCell(ta,la[sa],Ga[sa]),null==ua||g||G.setAttributeForCell(ua,la[sa],Ga[sa]);if(null!=z&&null!=L){var Ma=L[ta.getAttribute(z)];null!=Ma&&(G.labelChanged(ta,Ma),null==ua||g||G.cellLabelChanged(ua,Ma))}if(null!=t&&null!=m){var Ia=m[ta.getAttribute(t)];null!=Ia&&(ta.style=Ia)}G.setAttributeForCell(ta,"placeholders","1");ta.style=
-G.replacePlaceholders(ta,ta.style,C);null==ua||g?G.fireEvent(new mxEventObject("cellsInserted","cells",[ta])):(G.model.setStyle(ua,ta.style),0>mxUtils.indexOf(p,ua)&&p.push(ua),G.fireEvent(new mxEventObject("cellsInserted","cells",[ua])));g=null!=ua;ua=ta;if(!g)for(Ea=0;Ea<ba.length;Ea++)B[ba[Ea].to][ua.getAttribute(ba[Ea].to)]=ua;null!=ea&&"link"!=ea&&(G.setLinkForCell(ua,ua.getAttribute(ea)),G.setAttributeForCell(ua,ea,null));var ka=this.editor.graph.getPreferredSizeForCell(ua);P=null!=ya?G.model.getCell(T+
-Ga[ya]):null;if(ua.vertex){Ka=null!=P?0:Z;pa=null!=P?0:fa;null!=K&&null!=ua.getAttribute(K)&&(ua.geometry.x=Ka+parseFloat(ua.getAttribute(K)));null!=O&&null!=ua.getAttribute(O)&&(ua.geometry.y=pa+parseFloat(ua.getAttribute(O)));var wa="@"==V.charAt(0)?ua.getAttribute(V.substring(1)):null;ua.geometry.width=null!=wa&&"auto"!=wa?parseFloat(ua.getAttribute(V.substring(1))):"auto"==V||"auto"==wa?ka.width+W:parseFloat(V);var ra="@"==l.charAt(0)?ua.getAttribute(l.substring(1)):null;ua.geometry.height=null!=
-ra&&"auto"!=ra?parseFloat(ra):"auto"==l||"auto"==ra?ka.height+W:parseFloat(l);Y+=ua.geometry.height+Q}g?(null==y[Ca]&&(y[Ca]=[]),y[Ca].push(ua)):(n.push(ua),null!=P?(P.style=G.replacePlaceholders(P,E,C),G.addCell(ua,P),q.push(P)):p.push(G.addCell(ua)))}for(ha=0;ha<q.length;ha++)wa="@"==V.charAt(0)?q[ha].getAttribute(V.substring(1)):null,ra="@"==l.charAt(0)?q[ha].getAttribute(l.substring(1)):null,"auto"!=V&&"auto"!=wa||"auto"!=l&&"auto"!=ra||G.updateGroupBounds([q[ha]],W,!0);var na=p.slice(),oa=p.slice();
-for(Ea=0;Ea<ba.length;Ea++){var za=ba[Ea];for(ha=0;ha<n.length;ha++){ua=n[ha];var da=mxUtils.bind(this,function(Ja,Ra,La){var Pa=Ra.getAttribute(La.from);if(null!=Pa&&""!=Pa){Pa=Pa.split(",");for(var Ua=0;Ua<Pa.length;Ua++){var Va=B[La.to][Pa[Ua]];if(null==Va&&null!=H){Va=new mxCell(Pa[Ua],new mxGeometry(Z,fa,0,0),H);Va.style=G.replacePlaceholders(Ra,Va.style,C);var Fa=this.editor.graph.getPreferredSizeForCell(Va);Va.geometry.width=Fa.width+W;Va.geometry.height=Fa.height+W;B[La.to][Pa[Ua]]=Va;Va.vertex=
-!0;Va.id=Pa[Ua];p.push(G.addCell(Va))}if(null!=Va){Fa=La.label;null!=La.fromlabel&&(Fa=(Ra.getAttribute(La.fromlabel)||"")+(Fa||""));null!=La.sourcelabel&&(Fa=G.replacePlaceholders(Ra,La.sourcelabel,C)+(Fa||""));null!=La.tolabel&&(Fa=(Fa||"")+(Va.getAttribute(La.tolabel)||""));null!=La.targetlabel&&(Fa=(Fa||"")+G.replacePlaceholders(Va,La.targetlabel,C));var Sa="target"==La.placeholders==!La.invert?Va:Ja;Sa=null!=La.style?G.replacePlaceholders(Sa,La.style,C):G.createCurrentEdgeStyle();Fa=G.insertEdge(null,
-null,Fa||"",La.invert?Va:Ja,La.invert?Ja:Va,Sa);if(null!=La.labels)for(Sa=0;Sa<La.labels.length;Sa++){var Oa=La.labels[Sa],Xa=new mxCell(Oa.label||Sa,new mxGeometry(null!=Oa.x?Oa.x:0,null!=Oa.y?Oa.y:0,0,0),"resizable=0;html=1;");Xa.vertex=!0;Xa.connectable=!1;Xa.geometry.relative=!0;null!=Oa.placeholders&&(Xa.value=G.replacePlaceholders("target"==Oa.placeholders==!La.invert?Va:Ja,Xa.value,C));if(null!=Oa.dx||null!=Oa.dy)Xa.geometry.offset=new mxPoint(null!=Oa.dx?Oa.dx:0,null!=Oa.dy?Oa.dy:0);Fa.insert(Xa)}oa.push(Fa);
-mxUtils.remove(La.invert?Ja:Va,na)}}}});da(ua,ua,za);if(null!=y[ua.id])for(sa=0;sa<y[ua.id].length;sa++)da(ua,y[ua.id][sa],za)}}if(null!=Ba)for(ha=0;ha<n.length;ha++)for(ua=n[ha],sa=0;sa<Ba.length;sa++)G.setAttributeForCell(ua,mxUtils.trim(Ba[sa]),null);if(0<p.length){var ia=new mxParallelEdgeLayout(G);ia.spacing=R;ia.checkOverlap=!0;var ma=function(){0<ia.spacing&&ia.execute(G.getDefaultParent());for(var Ja=0;Ja<p.length;Ja++){var Ra=G.getCellGeometry(p[Ja]);Ra.x=Math.round(G.snap(Ra.x));Ra.y=Math.round(G.snap(Ra.y));
-"auto"==V&&(Ra.width=Math.round(G.snap(Ra.width)));"auto"==l&&(Ra.height=Math.round(G.snap(Ra.height)))}};if("["==aa.charAt(0)){var va=X;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(aa)),function(){ma();va()});X=null}else if("circle"==aa){var Aa=new mxCircleLayout(G);Aa.disableEdgeStyle=!1;Aa.resetEdges=!1;var Da=Aa.isVertexIgnored;Aa.isVertexIgnored=function(Ja){return Da.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){Aa.execute(G.getDefaultParent());
-ma()},!0,X);X=null}else if("horizontaltree"==aa||"verticaltree"==aa||"auto"==aa&&oa.length==2*p.length-1&&1==na.length){G.view.validate();var qa=new mxCompactTreeLayout(G,"horizontaltree"==aa);qa.levelDistance=Q;qa.edgeRouting=!1;qa.resetEdges=!1;this.executeLayout(function(){qa.execute(G.getDefaultParent(),0<na.length?na[0]:null)},!0,X);X=null}else if("horizontalflow"==aa||"verticalflow"==aa||"auto"==aa&&1==na.length){G.view.validate();var xa=new mxHierarchicalLayout(G,"horizontalflow"==aa?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=Q;xa.parallelEdgeSpacing=R;xa.interRankCellSpacing=S;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(G.getDefaultParent(),oa);G.moveCells(oa,Z,fa)},!0,X);X=null}else if("orgchart"==aa){G.view.validate();var ja=new mxOrgChartLayout(G,2,S,Q),Qa=ja.isVertexIgnored;ja.isVertexIgnored=function(Ja){return Qa.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){ja.execute(G.getDefaultParent());ma()},!0,X);X=null}else if("organic"==
-aa||"auto"==aa&&oa.length>p.length){G.view.validate();var Na=new mxFastOrganicLayout(G);Na.forceConstant=3*Q;Na.disableEdgeStyle=!1;Na.resetEdges=!1;var Ha=Na.isVertexIgnored;Na.isVertexIgnored=function(Ja){return Ha.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){Na.execute(G.getDefaultParent());ma()},!0,X);X=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=X&&X()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&
-"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(e+=g+n+"="+urlParams[n],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(g,
-n)&&(c=0==e?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,n,q){c=new LinkDialog(this,c,e,g,!0,n,q);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=
-this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
-this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);this.actions.get("smartFit").setEnabled(e);
-this.actions.get("resetView").setEnabled(e);this.actions.get("toggleDarkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=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()};var J=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
-function(c){var e=J.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){e.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh()}));return e};var D=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){D.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);this.actions.get("autosave").setEnabled(null!=
-e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(n&&0==g.edges.length&&1==g.vertices.length);this.actions.get("editImage").setEnabled(n&&g.image&&0<g.cells.length);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(n&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(n);this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
-this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);
-e.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 N=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);N.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
-!1,ExportDialog.exportFile=function(c,e,g,n,q,p,y,B){var G=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(G.getSvg(n,q,p)),"image/svg+xml");else{var C=c.getFileData(!0,null,null,null,null,!0),U=G.getGraphBounds(),m=Math.floor(U.width*q/G.view.scale),t=Math.floor(U.height*q/G.view.scale);if(C.length<=MAX_REQUEST_SIZE&&m*t<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&
-"jpeg"!=g||!c.isExportToCanvas()){var z={globalVars:G.getExportVariables()};B&&(z.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});c.saveRequest(e,g,function(H,L){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(L||"0")+(null!=H?"&filename="+encodeURIComponent(H):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(0<y?"&dpi="+y:"")+"&bg="+(null!=n?n:"none")+"&w="+m+"&h="+t+"&border="+p+"&xml="+encodeURIComponent(C))})}else"png"==g?c.exportImage(q,null==n||"none"==
-n,!0,!1,!1,p,!0,!1,null,B,y):c.exportImage(q,!1,!0,!1,!1,p,!0,!1,"jpeg",B);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var n=c;this.currentPage!=this.pages[g]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),n.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+n.getIndexableText()+
-" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.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";g.appendChild(n);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
-IMAGE_PATH+'/spin.gif"></div>';var p={};try{var y=mxSettings.getCustomLibraries();for(c=0;c<y.length;c++){var B=y[c];if("R"==B.substring(0,1)){var G=JSON.parse(decodeURIComponent(B.substring(1)));p[G[0]]={id:G[0],title:G[1],downloadUrl:G[2]}}}}catch(C){}this.remoteInvoke("getCustomLibraries",null,null,function(C){q.innerText="";if(0==C.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var U=0;U<
-C.length;U++){var m=C[U];p[m.id]&&(e[m.id]=m);var t=this.addCheckbox(q,m.title,p[m.id]);(function(z,H){mxEvent.addListener(H,"change",function(){this.checked?e[z.id]=z:delete e[z.id]})})(m,t)}},mxUtils.bind(this,function(C){q.innerText="";var U=document.createElement("div");U.style.padding="8px";U.style.textAlign="center";mxUtils.write(U,mxResources.get("error")+": ");mxUtils.write(U,null!=C&&null!=C.message?C.message:mxResources.get("unknownError"));q.appendChild(U)}));g.appendChild(q);g=new CustomDialog(this,
-g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var C=0,U;for(U in e)null==p[U]&&(C++,mxUtils.bind(this,function(m){this.remoteInvoke("getFileContent",[m.downloadUrl],null,mxUtils.bind(this,function(t){C--;0==C&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,t,m))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){C--;0==C&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[U]));
-for(U in p)e[U]||this.closeLibrary(new RemoteLibrary(this,null,p[U]));0==C&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.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 e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):
-g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,n,q){var p=!0,y=window.setTimeout(mxUtils.bind(this,function(){p=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),B=mxUtils.bind(this,function(){window.clearTimeout(y);p&&n.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(y);p&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:B,error:G});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(C,U){var m={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=U?m.error={errResp:U}:null!=C&&(m.resp=C);this.remoteWin.postMessage(JSON.stringify(m),"*")});try{var n=c.funtionName,q=
-this.remoteInvokableFns[n];if(null!=q&&"function"===typeof this[n]){if(q.allowedDomains){for(var p=!1,y=0;y<q.allowedDomains.length;y++)if(e=="https://"+q.allowedDomains[y]){p=!0;break}if(!p){g(null,"Invalid Call: "+n+" is not allowed.");return}}var B=c.functionArgs;Array.isArray(B)||(B=[]);if(q.isAsync)B.push(function(){g(Array.prototype.slice.apply(arguments))}),B.push(function(C){g(null,C||"Unkown Error")}),this[n].apply(this,B);else{var G=this[n].apply(this,B);g([G])}}else g(null,"Invalid Call: "+
-n+" is not found.")}catch(C){g(null,"Invalid Call: An error occurred, "+C.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var n=g.open("database",2);n.onupgradeneeded=function(q){try{var p=n.result;1>q.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(y){null!=e&&e(y)}};n.onsuccess=mxUtils.bind(this,function(q){var p=n.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(y){if(!y||"1"==urlParams.forceMigration){var B=document.createElement("iframe");B.style.display="none";B.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
-urlParams.forceMigration);document.body.appendChild(B);var G=!0,C=!1,U,m=0,t=mxUtils.bind(this,function(){C=!0;this.setDatabaseItem(".drawioMigrated3",!0);B.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),z=mxUtils.bind(this,function(){m++;H()}),H=mxUtils.bind(this,function(){try{if(m>=U.length)t();else{var E=U[m];StorageFile.getFileContent(this,E,mxUtils.bind(this,function(M){null==M||".scratchpad"==E&&M==this.emptyLibraryXml?B.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[E]}),"*"):z()}),z)}}catch(M){console.log(M)}}),L=mxUtils.bind(this,function(E){try{this.setDatabaseItem(null,[{title:E.title,size:E.data.length,lastModified:Date.now(),type:E.isLib?"L":"F"},{title:E.title,data:E.data}],z,z,["filesInfo","files"])}catch(M){console.log(M)}});y=mxUtils.bind(this,function(E){try{if(E.source==B.contentWindow){var M={};try{M=JSON.parse(E.data)}catch(P){}"init"==M.event?(B.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),B.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=M.event||C||(G?null!=M.resp&&0<M.resp.length&&null!=M.resp[0]?(U=M.resp[0],G=!1,H()):t():null!=M.resp&&0<M.resp.length&&null!=M.resp[0]?L(M.resp[0]):z())}}catch(P){console.log(P)}});window.addEventListener("message",y)}})));c(p);p.onversionchange=function(){p.close()}});n.onerror=e;n.onblocked=function(){}}catch(q){null!=e&&e(q)}else null!=e&&e()}else c(this.database)};
-EditorUi.prototype.setDatabaseItem=function(c,e,g,n,q){this.openDatabase(mxUtils.bind(this,function(p){try{q=q||"objects";Array.isArray(q)||(q=[q],c=[c],e=[e]);var y=p.transaction(q,"readwrite");y.oncomplete=g;y.onerror=n;for(p=0;p<q.length;p++)y.objectStore(q[p]).put(null!=c&&null!=c[p]?{key:c[p],data:e[p]}:e[p])}catch(B){null!=n&&n(B)}}),n)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,n){this.openDatabase(mxUtils.bind(this,function(q){n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);q=q.transaction(n,
-"readwrite");q.oncomplete=e;q.onerror=g;for(var p=0;p<n.length;p++)q.objectStore(n[p]).delete(c[p])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,n){this.openDatabase(mxUtils.bind(this,function(q){try{n=n||"objects";var p=q.transaction([n],"readonly").objectStore(n).get(c);p.onsuccess=function(){e(p.result)};p.onerror=g}catch(y){null!=g&&g(y)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(n){try{g=g||"objects";var q=n.transaction([g],
-"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),p=[];q.onsuccess=function(y){null==y.target.result?c(p):(p.push(y.target.result.value),y.target.result.continue())};q.onerror=e}catch(y){null!=e&&e(y)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(n){try{g=g||"objects";var q=n.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){c(q.result)};q.onerror=e}catch(p){null!=e&&e(p)}}),e)};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,e){var g=this.getCurrentFile();null!=g?g.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,g){var n=this.getCurrentFile();
-null!=n?n.addComment(c,e,g):e(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,e){var g=this.getCurrentFile();return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();
-return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({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.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language",
-"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,n,q,p,y,B){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,n,q,p,y,B)};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,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,n,q,p,y,B,G,C,U,m,t,z,H,L){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,n,q,p,y,B,G,C,U,m,t,z,H,L)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
-return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,n)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=
-function(c,e,g,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,n,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,g,n,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
-urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),n=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<n.length){var q="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(q||n)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
-var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+pa=0;pa<g.length&&"#"==g[pa].charAt(0);){c=g[pa].replace(/\r$/,"");for(pa++;pa<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[pa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[pa].substring(1)),pa++;if("#"!=c.charAt(1)){var ya=c.indexOf(":");if(0<ya){var la=mxUtils.trim(c.substring(1,ya)),ha=mxUtils.trim(c.substring(ya+1));"label"==la?ca=Graph.sanitizeHtml(ha):"labelname"==la&&0<ha.length&&"-"!=ha?z=ha:"labels"==la&&0<ha.length&&"-"!=ha?L=JSON.parse(ha):"style"==la?U=ha:"parentstyle"==la?E=
+ha:"unknownStyle"==la&&"-"!=ha?H=ha:"stylename"==la&&0<ha.length&&"-"!=ha?t=ha:"styles"==la&&0<ha.length&&"-"!=ha?m=JSON.parse(ha):"vars"==la&&0<ha.length&&"-"!=ha?C=JSON.parse(ha):"identity"==la&&0<ha.length&&"-"!=ha?M=ha:"parent"==la&&0<ha.length&&"-"!=ha?P=ha:"namespace"==la&&0<ha.length&&"-"!=ha?T=ha:"width"==la?V=ha:"height"==la?l=ha:"collapsed"==la&&"-"!=ha?x="true"==ha:"left"==la&&0<ha.length?K=ha:"top"==la&&0<ha.length?O=ha:"ignore"==la?Ba=ha.split(","):"connect"==la?ba.push(JSON.parse(ha)):
+"link"==la?ea=ha:"padding"==la?W=parseFloat(ha):"edgespacing"==la?R=parseFloat(ha):"nodespacing"==la?Q=parseFloat(ha):"levelspacing"==la?S=parseFloat(ha):"layout"==la&&(aa=ha)}}}if(null==g[pa])throw Error(mxResources.get("invalidOrMissingFile"));var Ta=this.editor.csvToArray(g[pa].replace(/\r$/,""));ya=c=null;la=[];for(ha=0;ha<Ta.length;ha++)M==Ta[ha]&&(c=ha),P==Ta[ha]&&(ya=ha),la.push(mxUtils.trim(Ta[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ca&&(ca="%"+la[0]+"%");
+if(null!=ba)for(var Ea=0;Ea<ba.length;Ea++)null==B[ba[Ea].to]&&(B[ba[Ea].to]={});M=[];for(ha=pa+1;ha<g.length;ha++){var Ga=this.editor.csvToArray(g[ha].replace(/\r$/,""));if(null==Ga){var Ka=40<g[ha].length?g[ha].substring(0,40)+"...":g[ha];throw Error(Ka+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<Ga.length&&M.push(Ga)}G.model.beginUpdate();try{for(ha=0;ha<M.length;ha++){Ga=M[ha];var ua=null,Ca=null!=c?T+Ga[c]:null;g=!1;null!=Ca&&(ua=G.model.getCell(Ca),g=null==ua||0<=mxUtils.indexOf(n,
+ua));var ta=new mxCell(ca,new mxGeometry(Z,Y,0,0),U||"whiteSpace=wrap;html=1;");ta.collapsed=x;ta.vertex=!0;ta.id=Ca;null==ua||g||G.model.setCollapsed(ua,x);for(var sa=0;sa<Ga.length;sa++)G.setAttributeForCell(ta,la[sa],Ga[sa]),null==ua||g||G.setAttributeForCell(ua,la[sa],Ga[sa]);if(null!=z&&null!=L){var Ma=L[ta.getAttribute(z)];null!=Ma&&(G.labelChanged(ta,Ma),null==ua||g||G.cellLabelChanged(ua,Ma))}if(null!=t&&null!=m){var Ia=m[ta.getAttribute(t)];null!=Ia&&(ta.style=Ia)}G.setAttributeForCell(ta,
+"placeholders","1");ta.style=G.replacePlaceholders(ta,ta.style,C);null==ua||g?G.fireEvent(new mxEventObject("cellsInserted","cells",[ta])):(G.model.setStyle(ua,ta.style),0>mxUtils.indexOf(p,ua)&&p.push(ua),G.fireEvent(new mxEventObject("cellsInserted","cells",[ua])));g=null!=ua;ua=ta;if(!g)for(Ea=0;Ea<ba.length;Ea++)B[ba[Ea].to][ua.getAttribute(ba[Ea].to)]=ua;null!=ea&&"link"!=ea&&(G.setLinkForCell(ua,ua.getAttribute(ea)),G.setAttributeForCell(ua,ea,null));var ka=this.editor.graph.getPreferredSizeForCell(ua);
+P=null!=ya?G.model.getCell(T+Ga[ya]):null;if(ua.vertex){Ka=null!=P?0:Z;pa=null!=P?0:fa;null!=K&&null!=ua.getAttribute(K)&&(ua.geometry.x=Ka+parseFloat(ua.getAttribute(K)));null!=O&&null!=ua.getAttribute(O)&&(ua.geometry.y=pa+parseFloat(ua.getAttribute(O)));var wa="@"==V.charAt(0)?ua.getAttribute(V.substring(1)):null;ua.geometry.width=null!=wa&&"auto"!=wa?parseFloat(ua.getAttribute(V.substring(1))):"auto"==V||"auto"==wa?ka.width+W:parseFloat(V);var ra="@"==l.charAt(0)?ua.getAttribute(l.substring(1)):
+null;ua.geometry.height=null!=ra&&"auto"!=ra?parseFloat(ra):"auto"==l||"auto"==ra?ka.height+W:parseFloat(l);Y+=ua.geometry.height+Q}g?(null==y[Ca]&&(y[Ca]=[]),y[Ca].push(ua)):(n.push(ua),null!=P?(P.style=G.replacePlaceholders(P,E,C),G.addCell(ua,P),q.push(P)):p.push(G.addCell(ua)))}for(ha=0;ha<q.length;ha++)wa="@"==V.charAt(0)?q[ha].getAttribute(V.substring(1)):null,ra="@"==l.charAt(0)?q[ha].getAttribute(l.substring(1)):null,"auto"!=V&&"auto"!=wa||"auto"!=l&&"auto"!=ra||G.updateGroupBounds([q[ha]],
+W,!0);var na=p.slice(),oa=p.slice();for(Ea=0;Ea<ba.length;Ea++){var za=ba[Ea];for(ha=0;ha<n.length;ha++){ua=n[ha];var da=mxUtils.bind(this,function(Ja,Ra,La){var Pa=Ra.getAttribute(La.from);if(null!=Pa&&""!=Pa){Pa=Pa.split(",");for(var Ua=0;Ua<Pa.length;Ua++){var Va=B[La.to][Pa[Ua]];if(null==Va&&null!=H){Va=new mxCell(Pa[Ua],new mxGeometry(Z,fa,0,0),H);Va.style=G.replacePlaceholders(Ra,Va.style,C);var Fa=this.editor.graph.getPreferredSizeForCell(Va);Va.geometry.width=Fa.width+W;Va.geometry.height=
+Fa.height+W;B[La.to][Pa[Ua]]=Va;Va.vertex=!0;Va.id=Pa[Ua];p.push(G.addCell(Va))}if(null!=Va){Fa=La.label;null!=La.fromlabel&&(Fa=(Ra.getAttribute(La.fromlabel)||"")+(Fa||""));null!=La.sourcelabel&&(Fa=G.replacePlaceholders(Ra,La.sourcelabel,C)+(Fa||""));null!=La.tolabel&&(Fa=(Fa||"")+(Va.getAttribute(La.tolabel)||""));null!=La.targetlabel&&(Fa=(Fa||"")+G.replacePlaceholders(Va,La.targetlabel,C));var Sa="target"==La.placeholders==!La.invert?Va:Ja;Sa=null!=La.style?G.replacePlaceholders(Sa,La.style,
+C):G.createCurrentEdgeStyle();Fa=G.insertEdge(null,null,Fa||"",La.invert?Va:Ja,La.invert?Ja:Va,Sa);if(null!=La.labels)for(Sa=0;Sa<La.labels.length;Sa++){var Oa=La.labels[Sa],Xa=new mxCell(Oa.label||Sa,new mxGeometry(null!=Oa.x?Oa.x:0,null!=Oa.y?Oa.y:0,0,0),"resizable=0;html=1;");Xa.vertex=!0;Xa.connectable=!1;Xa.geometry.relative=!0;null!=Oa.placeholders&&(Xa.value=G.replacePlaceholders("target"==Oa.placeholders==!La.invert?Va:Ja,Xa.value,C));if(null!=Oa.dx||null!=Oa.dy)Xa.geometry.offset=new mxPoint(null!=
+Oa.dx?Oa.dx:0,null!=Oa.dy?Oa.dy:0);Fa.insert(Xa)}oa.push(Fa);mxUtils.remove(La.invert?Ja:Va,na)}}}});da(ua,ua,za);if(null!=y[ua.id])for(sa=0;sa<y[ua.id].length;sa++)da(ua,y[ua.id][sa],za)}}if(null!=Ba)for(ha=0;ha<n.length;ha++)for(ua=n[ha],sa=0;sa<Ba.length;sa++)G.setAttributeForCell(ua,mxUtils.trim(Ba[sa]),null);if(0<p.length){var ia=new mxParallelEdgeLayout(G);ia.spacing=R;ia.checkOverlap=!0;var ma=function(){0<ia.spacing&&ia.execute(G.getDefaultParent());for(var Ja=0;Ja<p.length;Ja++){var Ra=G.getCellGeometry(p[Ja]);
+Ra.x=Math.round(G.snap(Ra.x));Ra.y=Math.round(G.snap(Ra.y));"auto"==V&&(Ra.width=Math.round(G.snap(Ra.width)));"auto"==l&&(Ra.height=Math.round(G.snap(Ra.height)))}};if("["==aa.charAt(0)){var va=X;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(aa)),function(){ma();va()});X=null}else if("circle"==aa){var Aa=new mxCircleLayout(G);Aa.disableEdgeStyle=!1;Aa.resetEdges=!1;var Da=Aa.isVertexIgnored;Aa.isVertexIgnored=function(Ja){return Da.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};
+this.executeLayout(function(){Aa.execute(G.getDefaultParent());ma()},!0,X);X=null}else if("horizontaltree"==aa||"verticaltree"==aa||"auto"==aa&&oa.length==2*p.length-1&&1==na.length){G.view.validate();var qa=new mxCompactTreeLayout(G,"horizontaltree"==aa);qa.levelDistance=Q;qa.edgeRouting=!1;qa.resetEdges=!1;this.executeLayout(function(){qa.execute(G.getDefaultParent(),0<na.length?na[0]:null)},!0,X);X=null}else if("horizontalflow"==aa||"verticalflow"==aa||"auto"==aa&&1==na.length){G.view.validate();
+var xa=new mxHierarchicalLayout(G,"horizontalflow"==aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=Q;xa.parallelEdgeSpacing=R;xa.interRankCellSpacing=S;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(G.getDefaultParent(),oa);G.moveCells(oa,Z,fa)},!0,X);X=null}else if("orgchart"==aa){G.view.validate();var ja=new mxOrgChartLayout(G,2,S,Q),Qa=ja.isVertexIgnored;ja.isVertexIgnored=function(Ja){return Qa.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){ja.execute(G.getDefaultParent());
+ma()},!0,X);X=null}else if("organic"==aa||"auto"==aa&&oa.length>p.length){G.view.validate();var Na=new mxFastOrganicLayout(G);Na.forceConstant=3*Q;Na.disableEdgeStyle=!1;Na.resetEdges=!1;var Ha=Na.isVertexIgnored;Na.isVertexIgnored=function(Ja){return Ha.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){Na.execute(G.getDefaultParent());ma()},!0,X);X=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=X&&X()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=
+function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(e+=g+n+"="+urlParams[n],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+n;for(n in urlParams)0>mxUtils.indexOf(g,n)&&(c=0==e?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,n,q){c=new LinkDialog(this,c,e,g,!0,n,q);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
+this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);
+this.actions.get("smartFit").setEnabled(e);this.actions.get("resetView").setEnabled(e);this.actions.get("toggleDarkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),
+null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=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()};var J=EditorUi.prototype.createSidebar;
+EditorUi.prototype.createSidebar=function(c){var e=J.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){e.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh()}));return e};var D=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){D.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);
+this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(n&&0==g.edges.length&&1==g.vertices.length);this.actions.get("editImage").setEnabled(n&&g.image&&0<g.cells.length);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(n&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(n);this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
+e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");
+e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.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 N=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);N.apply(this,arguments)};null!=window.ExportDialog&&
+(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,n,q,p,y,B){var G=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(G.getSvg(n,q,p)),"image/svg+xml");else{var C=c.getFileData(!0,null,null,null,null,!0),U=G.getGraphBounds(),m=Math.floor(U.width*q/G.view.scale),t=Math.floor(U.height*q/G.view.scale);if(C.length<=MAX_REQUEST_SIZE&&
+m*t<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var z={globalVars:G.getExportVariables()};B&&(z.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});c.saveRequest(e,g,function(H,L){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(L||"0")+(null!=H?"&filename="+encodeURIComponent(H):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(0<y?"&dpi="+y:"")+"&bg="+(null!=n?n:"none")+"&w="+m+"&h="+t+"&border="+p+"&xml="+encodeURIComponent(C))})}else"png"==
+g?c.exportImage(q,null==n||"none"==n,!0,!1,!1,p,!0,!1,null,B,y):c.exportImage(q,!1,!0,!1,!1,p,!0,!1,"jpeg",B);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var n=c;this.currentPage!=this.pages[g]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),n.model.setRoot(this.pages[g].root));e+=
+this.pages[g].getName()+" "+n.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.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";g.appendChild(n);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
+q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var y=mxSettings.getCustomLibraries();for(c=0;c<y.length;c++){var B=y[c];if("R"==B.substring(0,1)){var G=JSON.parse(decodeURIComponent(B.substring(1)));p[G[0]]={id:G[0],title:G[1],downloadUrl:G[2]}}}}catch(C){}this.remoteInvoke("getCustomLibraries",null,null,function(C){q.innerText="";if(0==C.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+"</div>";else for(var U=0;U<C.length;U++){var m=C[U];p[m.id]&&(e[m.id]=m);var t=this.addCheckbox(q,m.title,p[m.id]);(function(z,H){mxEvent.addListener(H,"change",function(){this.checked?e[z.id]=z:delete e[z.id]})})(m,t)}},mxUtils.bind(this,function(C){q.innerText="";var U=document.createElement("div");U.style.padding="8px";U.style.textAlign="center";mxUtils.write(U,mxResources.get("error")+": ");mxUtils.write(U,null!=C&&null!=C.message?C.message:mxResources.get("unknownError"));q.appendChild(U)}));
+g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var C=0,U;for(U in e)null==p[U]&&(C++,mxUtils.bind(this,function(m){this.remoteInvoke("getFileContent",[m.downloadUrl],null,mxUtils.bind(this,function(t){C--;0==C&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,t,m))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){C--;0==C&&this.spinner.stop();this.handleError(null,
+mxResources.get("errorLoadingFile"))}))})(e[U]));for(U in p)e[U]||this.closeLibrary(new RemoteLibrary(this,null,p[U]));0==C&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.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 e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+
+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,n,q){var p=!0,y=window.setTimeout(mxUtils.bind(this,function(){p=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),B=mxUtils.bind(this,function(){window.clearTimeout(y);p&&n.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(y);p&&q.apply(this,
+arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:B,error:G});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(C,U){var m={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=U?m.error={errResp:U}:null!=C&&(m.resp=C);this.remoteWin.postMessage(JSON.stringify(m),
+"*")});try{var n=c.funtionName,q=this.remoteInvokableFns[n];if(null!=q&&"function"===typeof this[n]){if(q.allowedDomains){for(var p=!1,y=0;y<q.allowedDomains.length;y++)if(e=="https://"+q.allowedDomains[y]){p=!0;break}if(!p){g(null,"Invalid Call: "+n+" is not allowed.");return}}var B=c.functionArgs;Array.isArray(B)||(B=[]);if(q.isAsync)B.push(function(){g(Array.prototype.slice.apply(arguments))}),B.push(function(C){g(null,C||"Unkown Error")}),this[n].apply(this,B);else{var G=this[n].apply(this,B);
+g([G])}}else g(null,"Invalid Call: "+n+" is not found.")}catch(C){g(null,"Invalid Call: An error occurred, "+C.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var n=g.open("database",2);n.onupgradeneeded=function(q){try{var p=n.result;1>q.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(y){null!=e&&e(y)}};n.onsuccess=mxUtils.bind(this,function(q){var p=n.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(y){if(!y||"1"==urlParams.forceMigration){var B=document.createElement("iframe");B.style.display=
+"none";B.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(B);var G=!0,C=!1,U,m=0,t=mxUtils.bind(this,function(){C=!0;this.setDatabaseItem(".drawioMigrated3",!0);B.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),z=mxUtils.bind(this,function(){m++;H()}),H=mxUtils.bind(this,function(){try{if(m>=U.length)t();else{var E=U[m];StorageFile.getFileContent(this,E,mxUtils.bind(this,
+function(M){null==M||".scratchpad"==E&&M==this.emptyLibraryXml?B.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[E]}),"*"):z()}),z)}}catch(M){console.log(M)}}),L=mxUtils.bind(this,function(E){try{this.setDatabaseItem(null,[{title:E.title,size:E.data.length,lastModified:Date.now(),type:E.isLib?"L":"F"},{title:E.title,data:E.data}],z,z,["filesInfo","files"])}catch(M){console.log(M)}});y=mxUtils.bind(this,function(E){try{if(E.source==B.contentWindow){var M=
+{};try{M=JSON.parse(E.data)}catch(P){}"init"==M.event?(B.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),B.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=M.event||C||(G?null!=M.resp&&0<M.resp.length&&null!=M.resp[0]?(U=M.resp[0],G=!1,H()):t():null!=M.resp&&0<M.resp.length&&null!=M.resp[0]?L(M.resp[0]):z())}}catch(P){console.log(P)}});window.addEventListener("message",y)}})));c(p);p.onversionchange=
+function(){p.close()}});n.onerror=e;n.onblocked=function(){}}catch(q){null!=e&&e(q)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,n,q){this.openDatabase(mxUtils.bind(this,function(p){try{q=q||"objects";Array.isArray(q)||(q=[q],c=[c],e=[e]);var y=p.transaction(q,"readwrite");y.oncomplete=g;y.onerror=n;for(p=0;p<q.length;p++)y.objectStore(q[p]).put(null!=c&&null!=c[p]?{key:c[p],data:e[p]}:e[p])}catch(B){null!=n&&n(B)}}),n)};EditorUi.prototype.removeDatabaseItem=
+function(c,e,g,n){this.openDatabase(mxUtils.bind(this,function(q){n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);q=q.transaction(n,"readwrite");q.oncomplete=e;q.onerror=g;for(var p=0;p<n.length;p++)q.objectStore(n[p]).delete(c[p])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,n){this.openDatabase(mxUtils.bind(this,function(q){try{n=n||"objects";var p=q.transaction([n],"readonly").objectStore(n).get(c);p.onsuccess=function(){e(p.result)};p.onerror=g}catch(y){null!=g&&g(y)}}),g)};EditorUi.prototype.getDatabaseItems=
+function(c,e,g){this.openDatabase(mxUtils.bind(this,function(n){try{g=g||"objects";var q=n.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),p=[];q.onsuccess=function(y){null==y.target.result?c(p):(p.push(y.target.result.value),y.target.result.continue())};q.onerror=e}catch(y){null!=e&&e(y)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(n){try{g=g||"objects";var q=n.transaction([g],"readonly").objectStore(g).getAllKeys();
+q.onsuccess=function(){c(q.result)};q.onerror=e}catch(p){null!=e&&e(p)}}),e)};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,e){var g=this.getCurrentFile();
+null!=g?g.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,g){var n=this.getCurrentFile();null!=n?n.addComment(c,e,g):e(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,e){var g=this.getCurrentFile();return null!=g?g.newComment(c,e):new DrawioComment(this,null,
+c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({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.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,n,q,p,y,B){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,n,q,p,y,B)};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,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,n,q,p,y,B,G,C,U,m,t,z,H,L){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,n,q,p,y,B,
+G,C,U,m,t,z,H,L)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,n)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};
+EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,g,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,n,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,
+e,g,n,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),n=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<n.length){var q="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(q||n)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=
+function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
var CommentsWindow=function(b,f,k,d,u,v){function A(){for(var z=y.getElementsByTagName("div"),H=0,L=0;L<z.length;L++)"none"!=z[L].style.display&&z[L].parentNode==y&&H++;B.style.display=0==H?"block":"none"}function F(z,H,L,E){function M(){H.removeChild(V);H.removeChild(l);T.style.display="block";P.style.display="block"}n={div:H,comment:z,saveCallback:L,deleteOnCancel:E};var P=H.querySelector(".geCommentTxt"),T=H.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
"geCommentEditTxtArea";V.style.minHeight=P.offsetHeight+"px";V.value=z.content;H.insertBefore(V,P);var l=document.createElement("div");l.className="geCommentEditBtns";var x=mxUtils.button(mxResources.get("cancel"),function(){E?(H.parentNode.removeChild(H),A()):M();n=null});x.className="geCommentEditBtn";l.appendChild(x);var K=mxUtils.button(mxResources.get("save"),function(){P.innerText="";z.content=V.value;mxUtils.write(P,z.content);M();L(z);n=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
function(O){mxEvent.isConsumed(O)||((mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O))&&13==O.keyCode?(K.click(),mxEvent.consume(O)):27==O.keyCode&&(x.click(),mxEvent.consume(O)))}));K.focus();K.className="geCommentEditBtn gePrimaryBtn";l.appendChild(K);H.insertBefore(l,P);T.style.display="none";P.style.display="none";V.focus()}function I(z,H){H.innerText="";z=new Date(z.modifiedDate);var L=b.timeSince(z);null==L&&(L=mxResources.get("lessThanAMinute"));mxUtils.write(H,mxResources.get("timeAgo",
@@ -14588,7 +14590,7 @@ this.countVisibleButtons()/2)+"px";else{b.parentNode.style.paddingBottom=this.pa
DrawioViewer.prototype.countVisibleButtons=function(){var a=0,b;for(b in this.buttons)this.buttons[b].visible&&a++;return a};
DrawioViewer.prototype.init=function(){this.loadStylesheet();mxConstants.SHADOWCOLOR="#000000";mxConstants.SHADOW_OPACITY=.25;this.graph.setEnabled(!1);this.graph.autoScroll=!1;this.graph.container.style.overflow="hidden";this.graph.container.style.cursor="move";this.graph.setPanning(!0);this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.panningHandler.isForcePanningEvent=function(b){return mxEvent.isLeftMouseButton(b.getEvent())};
this.graph.foldingEnabled=this.lightbox;this.graph.foldingEnabled?this.graph.cellRenderer.createControlClickHandler=function(b){var c=b.view.graph;return function(d){var e=!c.isCellCollapsed(b.cell);c.foldCells(e,!1,[b.cell],null,d);mxEvent.consume(d)}}:this.graph.getFoldingImage=function(){return null};this.graph.cellRenderer.getLabelValue=function(b){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(c=1!=b.style.html?mxUtils.htmlEntities(c,!1):
-b.view.graph.sanitizeHtml(c));return c};this.graph.click=function(b){var c=b.getCell();if(null!=c&&!b.isConsumed()&&(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isLeftMouseButton(b.getEvent()))){c=this.getLinkForCell(c);if(null!=c)if(RegExp("^(?:[a-z]+:)?//","i").test(c)){var d=document.createElement("a");d.href=c;d.href=d.href;d.host===location.host?window.location.href=c:window.open(c)}else 0!==c.lastIndexOf("/",0)&&(c="/"+c),window.location.href=c;b.consume()}};this.graph.setTooltips(!mxClient.IS_TOUCH);
+Graph.sanitizeHtml(c));return c};this.graph.click=function(b){var c=b.getCell();if(null!=c&&!b.isConsumed()&&(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isLeftMouseButton(b.getEvent()))){c=this.getLinkForCell(c);if(null!=c)if(RegExp("^(?:[a-z]+:)?//","i").test(c)){var d=document.createElement("a");d.href=c;d.href=d.href;d.host===location.host?window.location.href=c:window.open(c)}else 0!==c.lastIndexOf("/",0)&&(c="/"+c),window.location.href=c;b.consume()}};this.graph.setTooltips(!mxClient.IS_TOUCH);
null!=this.options.width&&(this.graph.container.style.width=this.options.width+"px");null!=this.options.height&&(this.graph.container.style.height=this.options.height+"px");var a=this.graph;a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);this.cumulativeZoomFactor=b?this.cumulativeZoomFactor*this.zoomFactor:this.cumulativeZoomFactor/this.zoomFactor;this.cumulativeZoomFactor=Math.round(this.view.scale*
this.cumulativeZoomFactor*100)/100/this.view.scale;this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};this.lightbox&&mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if(!mxClient.IS_MAC||!mxEvent.isControlDown(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){a.lazyZoom(c);mxEvent.consume(b);break}d=d.parentNode}}))};
DrawioViewer.prototype.resetGraphView=function(){this.graph.pageBreaksVisible=!1;this.graph.preferPageSize=!1;this.graph.pageVisible=!1;if(this.lightbox)this.graph.container.style.backgroundColor=null==this.graph.background||"none"==this.graph.background?"#ffffff":this.graph.background;else{var a=mxUtils.bind(this,function(){this.graph.centerZoom=this.graph.panningHandler.panningEnabled;var h=null==this.options.width,f=null==this.options.height,g=this.graph.getGraphBounds(),k=g.width/g.height;g=h?