diff --git a/ChangeLog b/ChangeLog index 18133d74d96773324c451efa7fbd3f3bca3c4dbc..b85622afe8ea81d470bfb8151eb637c406b2bd28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +11-FEB-2018: 8.1.0 + +- Adds VSDX/VSSX import/export for Electron +- Fixes access denied for Dropbox import +- Fixes escaping in SVG alternate text +- Uses mxGraph 3.9.2 beta 5 + 09-FEB-2018: 8.0.9 - Fixes block alignment for in-place editor diff --git a/VERSION b/VERSION index 7c6e60d8553cdd26828b1cfdee60567f26b749e7..da1561810140246b6a6971f317f6bbe9a2643ce2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.9 \ No newline at end of file +8.1.0 \ No newline at end of file diff --git a/etc/build/build.xml b/etc/build/build.xml index d9abaea7d61b21bc5a6255157bee1ea5f1fd9daf..7906ff18d3ca881e2983e74fc3782fb5983f8370 100644 --- a/etc/build/build.xml +++ b/etc/build/build.xml @@ -276,15 +276,14 @@ <sources dir="${war.dir}/js/diagramly"> <file name="Extensions.js" /> </sources> - </jscomp> - - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${war.dir}/js/vsdx.min.js"> <sources dir="${war.dir}/js/diagramly/vsdx"> <file name="VsdxExport.js" /> <file name="mxVsdxCanvas2D.js" /> + <file name="bmpDecoder.js" /> + <file name="importer.js" /> </sources> </jscomp> - <concat destfile="${war.dir}/js/vsdx.min.js" fixlastline="yes" append="yes"> + <concat destfile="${war.dir}/js/extensions.min.js" fixlastline="yes" append="yes"> <fileset dir="${war.dir}/js/jszip" includes="**/*.min.js"/> </concat> diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js index 1031afccfc917cce15011c06eec499e4deae89c1..4bb876167d38190959ed3c00d196edfb02519c1e 100644 --- a/etc/mxgraph/mxClient.js +++ b/etc/mxgraph/mxClient.js @@ -210,7 +210,7 @@ mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this. mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))}; mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null; mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a}; -mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)}; +mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&"file://"!=a.substring(0,7)}; mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a}; function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.stop()});mxEvent.addListener(document,"mouseup",this.mouseUpListener);var b=mxUtils.bind(this, function(){this.scrollbars=mxUtils.hasScrollbars(a.container);this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;this.scrollbars?(a.panGraph(-a.container.scrollLeft-Math.ceil(this.dx),-a.container.scrollTop-Math.ceil(this.dy)),a.panDx=this.scrollLeft-a.container.scrollLeft,a.panDy=this.scrollTop-a.container.scrollTop,a.fireEvent(new mxEventObject(mxEvent.PAN))):a.panGraph(this.getDx(), diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index c1ea84591ce8833513fb37d184cc7b79e0609914..63a2901923e2cb63c3f74d36a75443546a8792de 100644 --- a/src/main/webapp/cache.manifest +++ b/src/main/webapp/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 02/09/2018 09:13 AM +# 02/11/2018 05:31 PM app.html index.html?offline=1 @@ -11,6 +11,7 @@ open.html js/app.min.js js/shapes.min.js js/stencils.min.js +js/extensions.min.js styles/grapheditor.css styles/atlas.css styles/dark.css diff --git a/src/main/webapp/connect/confluence/ac.js b/src/main/webapp/connect/confluence/ac.js index a3df37c2ef39dca605e643f128769e932c7b405c..d798fefbbd2f0fa6ad23a2a976f3d8a310f03cb5 100644 --- a/src/main/webapp/connect/confluence/ac.js +++ b/src/main/webapp/connect/confluence/ac.js @@ -12,7 +12,7 @@ AC.autoExit = true; // Last Checked on 08-AUG-2017: No delete scope needed to delete drafts // LATER: If delete scope is needed users must upgrade to the latest json // Disabled. Flag to mute notifications for drafts is needed. 16-AUG-2017 -AC.draftEnabled = false; +AC.draftEnabled = true; //Enabled with the new save that mute notifications for saving TODO is there notification for deleting a draft? AC.getUrlParam = function(param, escape, url){ try{ @@ -30,6 +30,32 @@ AC.getMetaTag = function(name) { return document.getElementsByTagName('meta')[name].getAttribute('content'); } +//Code from: https://stackoverflow.com/questions/16245767/creating-a-blob-from-a-base64-string-in-javascript +AC.b64toBlob = function(b64Data, contentType, sliceSize, isByteCharacters) +{ + contentType = contentType || ''; + sliceSize = sliceSize || 512; + + var byteCharacters = isByteCharacters? b64Data : atob(b64Data); + var byteArrays = []; + + for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) { + var slice = byteCharacters.slice(offset, offset + sliceSize); + + var byteNumbers = new Array(slice.length); + for (var i = 0; i < slice.length; i++) { + byteNumbers[i] = slice.charCodeAt(i); + } + + var byteArray = new Uint8Array(byteNumbers); + + byteArrays.push(byteArray); + } + + var blob = new Blob(byteArrays, {type: contentType}); + return blob; + } + AC.initAsync = function(baseUrl) { var link = document.createElement('a'); @@ -416,7 +442,7 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d //console.trace('DRAFT: Save', draftName, xml); AC.saveDiagram(pageId, draftName, - btoa(unescape(encodeURIComponent(xml))), + xml, function(res) { var obj = null; @@ -920,7 +946,7 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d } else if (drawMsg.event == 'save') { - diagramXml = btoa(unescape(encodeURIComponent(drawMsg.xml))); + diagramXml = drawMsg.xml; if (diagramName == null) { @@ -1012,9 +1038,10 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d // LATER: Get revision from metadata of attachment and check // what condition makes the response not contain an URL - if (resp != null && resp.url != null) + //TODO Is prev comment still needed with REST API? + if (resp != null && resp.results != null && resp.results[0]) { - revision = resp.url.match(/version=(\d+)/i)[1]; + revision = resp.results[0].version.number; } else { @@ -1075,7 +1102,7 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d if (diagramName != null) { - AC.saveDiagram(pageId, diagramName + '.png', imageData, + AC.saveDiagram(pageId, diagramName + '.png', AC.b64toBlob(imageData, 'image/png'), successPng, saveError, false, 'image/png'); } }; @@ -1143,17 +1170,9 @@ AC.loadDiagram = function (pageId, diagramName, revision, success, error, owning }); }; -AC.saveDiagram = function(pageId, diagramName, xml, success, error, newSave, mime, comment) +//TODO We can upload both the diagram and its png in one call if needed? +AC.saveDiagram = function(pageId, diagramName, xml, success, error, newSave, mime, comment, sendNotif) { - var attachment = {fileName: diagramName, contentType: mime}; - - if (comment != null) - { - attachment.comment = comment; - } - - var params = [pageId, attachment, xml]; - loadSucess = function(resp) { error({status: 409, message: 'File already exists'}); @@ -1177,7 +1196,7 @@ AC.saveDiagram = function(pageId, diagramName, xml, success, error, newSave, mim { var obj = JSON.parse(responseText); - if (obj != null && obj.code == -32600) + if (obj != null && obj.code == -32600) //TODO is the codes the same with new REST APIs { error({status: 401}); @@ -1190,19 +1209,25 @@ AC.saveDiagram = function(pageId, diagramName, xml, success, error, newSave, mim doSave = function() { - // Workaround for encoding problems - var data = JSON.stringify(params); - AP.require(['request'], function(request) { - request({ - type: 'POST', - data: data, - url: '/rpc/json-rpc/confluenceservice-v2/addAttachment', - contentType: 'application/json;charset=UTF-8', + var blob = (xml instanceof Blob)? xml : new Blob([xml], {type: mime}); + var attFile = new File([blob], diagramName); + var reqData = {file: attFile, minorEdit: sendNotif? false : true}; + + if (comment != null) + { + reqData.comment = comment; + } + + request({ + type: 'PUT', + data: reqData, + url: "/rest/api/content/"+ pageId +"/child/attachment", + contentType: "multipart/form-data", success: sessionCheck, error: error - }); + }); }); }; @@ -1258,4 +1283,42 @@ AC.getMacroData = function(fn) { AP.require('confluence', function(confluence) { confluence.getMacroData(fn); }); -} \ No newline at end of file +} + +//From mxUtils +AC.htmlEntities = function(s, newline) +{ + s = String(s || ''); + + s = s.replace(/&/g,'&'); // 38 26 + s = s.replace(/"/g,'"'); // 34 22 + s = s.replace(/\'/g,'''); // 39 27 + s = s.replace(/</g,'<'); // 60 3C + s = s.replace(/>/g,'>'); // 62 3E + + if (newline == null || newline) + { + s = s.replace(/\n/g, '
'); + } + + return s; +}; + +AC.fromHtmlEntities = function(s, newline) +{ + s = String(s || ''); + + s = s.replace(/&/g,'&'); // 38 26 + s = s.replace(/"/g,'"'); // 34 22 + s = s.replace(/'/g,'\\'); // 39 27 + s = s.replace(/</g,'<'); // 60 3C + s = s.replace(/>/g,'>'); // 62 3E + + if (newline == null || newline) + { + s = s.replace(/
/g, '\n'); + } + + return s; +}; + diff --git a/src/main/webapp/connect/confluence/admin.html b/src/main/webapp/connect/confluence/admin.html index ee2752dcac5d69482fc673e84841304e512a1d92..56b6a0191bf2ad6f08e1a8d4d187ecd3d9deeaaf 100644 --- a/src/main/webapp/connect/confluence/admin.html +++ b/src/main/webapp/connect/confluence/admin.html @@ -1,116 +1,16 @@ <!DOCTYPE html> <html> -<head> -<meta charset="UTF-8"> -<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/6.0.7/css/aui.min.css" media="all"> -<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> -<script src="//aui-cdn.atlassian.com/aui-adg/6.0.7/js/aui.min.js"></script> -<script src="ac.js" type="text/javascript"></script> - -<script type="text/javascript"> -var baseUrl = AC.getUrlParam('xdm_e', true) + AC.getUrlParam('cp', true); - -var script = document.createElement('script'); - -function searchContentForMacro(macroName, onSuccess, onError) -{ - url = '/rest/api/content/search?cql=macro=' + macroName; + <head> + <meta charset="UTF-8"> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> + <script src="ac.js" type="text/javascript"></script> + <script src="admin.js" type="text/javascript"></script> + </head> - AP.require(['request'], function(request) - { - request({ - type: 'GET', - url: '/rest/api/content/search?cql=macro=' + macroName + "&limit=1000", - contentType: 'application/json;charset=UTF-8', - success: onSuccess, - error: onError - }); - }); -}; - -function getPageContent(pageId, success, error) -{ - AP.require(['request'], function(request) - { - request({ - type: 'GET', - url: '/rest/api/content/' + pageId + '/?expand=body.storage', - contentType: 'application/json;charset=UTF-8', - success: success, - error: error - }); - }); -}; - -function main() -{ - function nsResolver(prefix) - { - var ns = { - 'ac' : 'https://www.atlassian.com/software/confluence/ac', - 'ri': 'https://www.atlassian.com/software/confluence/ri' - }; - return ns[prefix] || null; - } - - function loadPageSuccess(page) - { - page = JSON.parse(page); - var pageXml = page.body.storage.value.replace(/&/g, '&'); - - var pageDom = new DOMParser().parseFromString('<root xmlns:ac="https://www.atlassian.com/software/confluence/ac">' + pageXml + '</root>', "text/xml"); - var nodes = pageDom.evaluate( "//ac:structured-macro[@ac:name='gliffy']", pageDom.documentElement, nsResolver, XPathResult.ANY_TYPE, null ); - var nextMacro = null; - var gliffyMacros = []; - - while(( nextMacro = nodes.iterateNext()) != null) - gliffyMacros.push(nextMacro); - - for(var i = 0; i < gliffyMacros.length; i++) - { - var element = gliffyMacros[i]; - var nameEl = pageDom.evaluate("ac:parameter[@ac:name='name']", element, nsResolver, XPathResult.ANY_TYPE, null).iterateNext(); - var imageIdEl = pageDom.evaluate("ac:parameter[@ac:name='diagramAttachmentId']", element, nsResolver, XPathResult.ANY_TYPE, null).iterateNext(); - var containerEl = pageDom.evaluate("ac:parameter[@ac:name='containerId']", element, nsResolver, XPathResult.ANY_TYPE, null).iterateNext(); - - }; - - //console.log(new XMLSerializer().serializeToString(pageDom.documentElement)) - - }; - - function loadPageError(resp) - { - console.log(resp); - }; - - searchContentForMacro('gliffy', function success(resp) - { - var resp = JSON.parse(resp); - for(var i = 0; i < resp.results.length; i++) - { - var page = resp.results[i]; - getPageContent(page.id, loadPageSuccess, loadPageError); - } - }, function error(err) - { - console.log(err); - }); -}; - -script.onload = function() -{ - scriptLoaded = true; - main(); -}; - -script.src = baseUrl + '/atlassian-connect/all.js'; -script.setAttribute('data-options', 'sizeToParent:true;'); -document.getElementsByTagName('head')[0].appendChild(script); -</script> -</head> - -<body> -<h6>Gliffy import</h6> -</body> + <body> + <h4>Gliffy import</h4> + <div><br>Click "Start Import" button to import all Gliffy diagrams to draw.io<br>Please note that the import procedure will take some time and the browser window must remain open until the import is completed.</div> + <div><br><button id="importBtn" disabled="disabled">Start Import</button></div> + <div id="importLog"><br></div> + </body> </html> \ No newline at end of file diff --git a/src/main/webapp/connect/confluence/admin.js b/src/main/webapp/connect/confluence/admin.js index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5be8fc3a1a9886433856458471d109bdaa1b7305 100644 --- a/src/main/webapp/connect/confluence/admin.js +++ b/src/main/webapp/connect/confluence/admin.js @@ -0,0 +1,298 @@ +var GliffyMassImporter = function(logDiv) +{ + logDiv.html("<br>"); + + var link = document.createElement('a'); + link.href = location.href; + link.href = link.href; //to have 'host' populated under IE + var hostUrl = link.protocol + '//' + link.hostname; + + function searchContentForMacro(macroName, onSuccess, onError, nextUrl) + { + AP.require(['request'], function(request) + { + request({ + type: 'GET', + url: nextUrl || ('/rest/api/content/search?cql=macro=' + macroName + "&limit=100"), + contentType: 'application/json;charset=UTF-8', + success: function(resp) { + var resp = JSON.parse(resp); + onSuccess(resp); + //Support pageing + if (resp._links && resp._links.next) { + searchContentForMacro(macroName, onSuccess, onError, resp._links.next); + } + }, + error: onError + }); + }); + }; + + function getPageContent(pageId, success, error) + { + AP.require(['request'], function(request) + { + request({ + type: 'GET', + url: '/rest/api/content/' + pageId + '/?expand=body.storage,version', + contentType: 'application/json;charset=UTF-8', + success: success, + error: error + }); + }); + }; + + + function importGliffyAtt(pageId, attName, attId, macroId, success, error) + { + logDiv.append($('<div>Gliffy diagram "'+ AC.htmlEntities(attName) +'" found. Importing...</div>')); + + //Get the latest version (no version parameter) + AP.require(['request'], function(request) + { + request({ + url: "/download/attachments/" + pageId + "/" + + encodeURIComponent(attName), + success: function(resp) + { + var blob = new Blob([resp], {type : 'application/json'}); + var file = new File([blob], 'gliffy'); + + var formData = new FormData(); + formData.append('format', 'xml'); + formData.append("upfile", file, 'gliffy'); + + var xhr = new XMLHttpRequest(); + xhr.open('POST', hostUrl + "/open"); + + xhr.onreadystatechange = function() + { + if (xhr.readyState == 4) + { + if (xhr.status >= 200 && xhr.status <= 299 && + xhr.responseText.substring(0, 13) == '<mxGraphModel') + { + //upload draw.io xml as an attachment and also generate the preview image + var xml = xhr.responseText; + AC.saveDiagram(pageId, attName + ".drawio.xml", xml, + function(resp) + { + logDiv.append($('<div>Gliffy diagram "'+ AC.htmlEntities(attName) +'" imported successfully.</div>')); + + resp = JSON.parse(resp); + + //TODO get the width & height + success({ + name: attName + ".drawio.xml", + revision: resp.results[0].version.number, + macroId: macroId, + previewPng: attName + ".png" + }); + }, function(err) + { + logDiv.append($('<div style="color:red">Saving imported Gliffy diagram "'+ AC.htmlEntities(attName) +'" failed.</div>')); + console.log(err); + error(); + }, false, 'text/plain', 'Imported from "' + attName + '" by draw.io'); + } + else + { + logDiv.append($('<div style="color:red">Importing Gliffy diagram "'+ AC.htmlEntities(attName) +'" failed.</div>')); + console.log(xhr.status, xhr.responseText); + error(); + } + } + }; + + xhr.send(formData); + }, + error: function(resp) + { + logDiv.append($('<div style="color:red">Fetching Gliffy diagram "'+ AC.htmlEntities(attName) +'" failed.</div>')); + console.log(resp); + error(); + } + }); + }); + }; + + + function nsResolver(prefix) + { + var ns = { + 'ac' : 'https://www.atlassian.com/software/confluence/ac', + 'ri': 'https://www.atlassian.com/software/confluence/ri' + }; + return ns[prefix] || null; + } + + var pagesCount = 0; + var processedPages = 0; + + function pageProcessed() + { + processedPages++; + + if (processedPages == pagesCount) + { + logDiv.append($('<div>All Gliffy diagrams processed. Import finished!</div>')); + } + }; + + function loadPageSuccess(page) + { + page = JSON.parse(page); + + logDiv.append($('<div>Started processing page "'+ AC.htmlEntities(page.title) +'"...</div>')); + + var originalBody = page.body.storage.value; + + var pageXml = page.body.storage.value.replace(/&/g, '&'); + + var pageDom = new DOMParser().parseFromString('<root xmlns:ac="https://www.atlassian.com/software/confluence/ac">' + pageXml + '</root>', "text/xml"); + var nodes = pageDom.evaluate( "//ac:structured-macro[@ac:name='gliffy']", pageDom.documentElement, nsResolver, XPathResult.ANY_TYPE, null ); + var nextMacro = null; + var gliffyMacros = []; + + while(( nextMacro = nodes.iterateNext()) != null) + gliffyMacros.push(nextMacro); + + var macrosParsed = 0; + var drawIoMacros = {}; + var gliffyMarcosIds = []; + + for(var i = 0; i < gliffyMacros.length; i++) + { + var element = gliffyMacros[i]; + var macroId = element.getAttribute('ac:macro-id'); + gliffyMarcosIds.push(macroId); + var nameEl = pageDom.evaluate("ac:parameter[@ac:name='name']", element, nsResolver, XPathResult.ANY_TYPE, null).iterateNext(); + var attIdEl = pageDom.evaluate("ac:parameter[@ac:name='diagramAttachmentId']", element, nsResolver, XPathResult.ANY_TYPE, null).iterateNext(); + + //get the attachment content + importGliffyAtt(page.id, AC.fromHtmlEntities(nameEl.textContent), attIdEl.textContent, macroId, function(attInfo) + { + //Replace gliffy macro with a draw.io one and use the gliffy preview image + + //generate draw.io macro HTML + var drawIoMacro = '<ac:structured-macro ac:name="drawio" ac:schema-version="1" ac:macro-id="' + attInfo.macroId + + '"><ac:parameter ac:name="baseUrl">' + baseUrl + + '</ac:parameter><ac:parameter ac:name="diagramName">' + AC.htmlEntities(attInfo.name) + + '</ac:parameter><ac:parameter ac:name="width">' + 500 //TODO It works with this hardcoded number, but it is better to get the actual value + + '</ac:parameter><ac:parameter ac:name="zoom">1</ac:parameter><ac:parameter ac:name="pageId">' + page.id + + '</ac:parameter><ac:parameter ac:name="lbox">1</ac:parameter><ac:parameter ac:name="height">' + 500 //TODO It works with this hardcoded number, but it is better to get the actual value + + '</ac:parameter><ac:parameter ac:name="revision">' + attInfo.revision + + '</ac:parameter><ac:parameter ac:name="tempPreview">' + AC.htmlEntities(attInfo.previewPng) + + '</ac:parameter>'; + + drawIoMacros[attInfo.macroId] = drawIoMacro; + macrosParsed++; + + if (gliffyMacros.length == macrosParsed) + { + for (var j = 0; j < macrosParsed; j++) + { + var id = gliffyMarcosIds[j]; + originalBody = originalBody.replace(/\<ac\:structured\-macro\s+ac\:name\=\"gliffy\".*?(?=\<\/ac\:structured\-macro\>)/, drawIoMacros[id]); + } + + //update page contents + AP.require(['request'], function(request) + { + request({ + type: 'PUT', + data: JSON.stringify({ + "body": { + "storage": { + "value": originalBody, + "representation": "storage", + "embeddedContent": [] + } + }, + "version": { + "number": page.version.number + 1 + }, + "type": "page", + "title": page.title, + "status": "current" + }), + url: "/rest/api/content/"+ page.id, + contentType: 'application/json;charset=UTF-8', + success: function(resp) { + logDiv.append($('<div>Gliffy diagrams in page "'+ AC.htmlEntities(page.title) +'" imported successfully.</div>')); + pageProcessed(); + }, + error: function(resp) { + logDiv.append($('<div style="color:red">Updating page "'+ AC.htmlEntities(page.title) +'" failed.</div>')); + console.error(resp); + pageProcessed(); + } + }); + }); + } + }, + function() + { + pageProcessed(); + }); + }; + + if (gliffyMacros.length == 0) + { + logDiv.append($('<div>No Gliffy diagrams found in page "'+ AC.htmlEntities(page.title) +'".</div>')); + pageProcessed(); + } + }; + + function loadPageError(resp) + { + logDiv.append($('<div style="color:red">Fetching the page failed.</div>')); + console.log(resp); + pageProcessed(); + }; + + //Code starts execution here + searchContentForMacro('gliffy', function success(resp) + { + pagesCount += resp.results.length; + + for(var i = 0; i < resp.results.length; i++) + { + var page = resp.results[i]; + + logDiv.append($('<div>Page "'+ AC.htmlEntities(page.title) +'" found. Fetching...</div>')); + + getPageContent(page.id, loadPageSuccess, loadPageError); + } + + if (resp.results.length == 0) + { + logDiv.append($('<div>No Gliffy diagrams found. Import finished.</div>')); + } + }, function error(err) + { + logDiv.append($('<div style="color:red">Searching for Gliffy diagrams failed. Please try again later.</div>')); + console.log(err); + }); +}; + +var baseUrl = AC.getUrlParam('xdm_e', true) + AC.getUrlParam('cp', true); + +var script = document.createElement('script'); + +script.onload = function() +{ + //JQuery is loaded in this page, so we can use it + var importBtn = $('#importBtn'); + + importBtn.attr("disabled", null); + + importBtn.click(function() + { + GliffyMassImporter($('#importLog')); + }); +}; + +script.src = baseUrl + '/atlassian-connect/all.js'; +script.setAttribute('data-options', 'sizeToParent:true;'); +document.getElementsByTagName('head')[0].appendChild(script); diff --git a/src/main/webapp/connect/confluence/connect.json b/src/main/webapp/connect/confluence/connect.json index 350b3f326954ffcb3e71c7bbe3ea6b1891257a66..a88ebce04627d05457d13ce0f2178da2b6719a40 100644 --- a/src/main/webapp/connect/confluence/connect.json +++ b/src/main/webapp/connect/confluence/connect.json @@ -19,6 +19,15 @@ }, "modules": { + "adminPages": [ + { + "key": "gliffyImport", + "url": "/connect/confluence/admin.html", + "name": { + "value": "Draw.io Import Service" + } + } + ], "generalPages": [ { "key": "lightbox", diff --git a/src/main/webapp/connect/confluence/viewer2.html b/src/main/webapp/connect/confluence/viewer2.html index a24e67c89cea13c2e02e7ee874af99cb6d328052..7223dd19c2a25783ea4a9d0a301f8d2d2b1c6862 100644 --- a/src/main/webapp/connect/confluence/viewer2.html +++ b/src/main/webapp/connect/confluence/viewer2.html @@ -331,7 +331,7 @@ if (lang != null) script.onload = function() { //save diagram - AC.saveDiagram(retryParams.pageId, name, btoa(unescape(encodeURIComponent(xml))), + AC.saveDiagram(retryParams.pageId, name, xml, function() { //nothing! diff --git a/src/main/webapp/electron.js b/src/main/webapp/electron.js index 3d5cf8d0cbf2f6f708cfd9d213260099b96e4449..fabedcc01b78de658186a269d4f027a4d7193779 100644 --- a/src/main/webapp/electron.js +++ b/src/main/webapp/electron.js @@ -38,7 +38,6 @@ function createWindow (opt = {}) protocol: __DEV__ ? 'http' : 'https:', query: { - 'https': __DEV__ ? 0 : 1, 'test': __DEV__ ? 1 : 0, 'db': 0, 'gapi': 0, diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index c67dcb1be5441c952390e71d84744f507287ef1d..fbc279937e337f78c358e519ab938ea5b4e78d32 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -337,18 +337,12 @@ else { mxscript('js/app.min.js'); - - if (urlParams['offline'] == '1' || urlParams['appcache'] == '1') - { - mxscript('js/stencils.min.js'); - } } + // Electron if (window && window.process && window.process.type) { - // Electron mxscript('js/diagramly/ElectronApp.js'); - mxscript('js/diagramly/Extensions.js'); } // Adds basic error handling diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 2642adfc0b85016092e0b35cf6073fe7ed9047b2..b9f499e5549de7f6fad6ca95d7c25be5f663e6c6 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -316,7 +316,7 @@ mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this. mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))}; mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null; mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a}; -mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)}; +mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&"file://"!=a.substring(0,7)}; mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a}; function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.stop()});mxEvent.addListener(document,"mouseup",this.mouseUpListener);var b=mxUtils.bind(this, function(){this.scrollbars=mxUtils.hasScrollbars(a.container);this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;this.scrollbars?(a.panGraph(-a.container.scrollLeft-Math.ceil(this.dx),-a.container.scrollTop-Math.ceil(this.dy)),a.panDx=this.scrollLeft-a.container.scrollLeft,a.panDy=this.scrollTop-a.container.scrollTop,a.fireEvent(new mxEventObject(mxEvent.PAN))):a.panGraph(this.getDx(), @@ -2524,7 +2524,7 @@ return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform", "translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var z=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,p){var D=this.state;if(null!=this.foAltText&&(0==d||0!=D.fontSize&&f.length<5*d/D.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+D.fontSize)/ 2));q.setAttribute("fill",D.fontColor||"black");q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(D.fontSize)+"px");q.setAttribute("font-family",D.fontFamily);(D.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(D.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(D.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline"); -mxUtils.write(q,f);return q}return z.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var n=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&n.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas= +q.innerHTML=f;return q}return z.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var n=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&n.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas= function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b= window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)}; Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b; @@ -6343,96 +6343,96 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav StorageFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable()){var e=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(f){null!=c&&c(f)}});this.isRenamable()&&"."==a.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt", [a]),e,c):e()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,b,d){var c=this.getTitle();c!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(e){var f=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(c,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,b)}),d)});null!=e?this.ui.confirm(mxResources.get("replaceIt",[a]),f,d):f()})):b()}; StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,b,d){StorageFile.call(this,a,b,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title}; -StorageLibrary.prototype.isRenamable=function(a,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,e,f,u,t,h){function w(){mxEvent.addListener(p,"click",null!=h?h:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,g.checked);b()})):(a.setMode(f,g.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";p.style.display= -mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.boxSizing="border-box";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 10px 12px 10px";p.style.width="88px";p.style.height="100px";p.style.whiteSpace="nowrap";p.setAttribute("title",e);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.overflow="hidden";if(null!=c){var y=document.createElement("img"); -y.setAttribute("src",c);y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.width="60px";y.style.height="60px";y.style.paddingBottom="6px";p.appendChild(y)}else q.style.paddingTop="5px",q.style.whiteSpace="normal",mxClient.IS_IOS?(p.style.padding="0px 10px 20px 10px",p.style.top="6px"):mxClient.IS_FF&&(q.style.paddingTop="0px",q.style.marginTop="-2px");p.appendChild(q);mxUtils.write(q,e);if(null!=t)for(c=0;c<t.length;c++)mxUtils.br(q),mxUtils.write(q,t[c]);if(null!=u&&null==a[u]){y.style.visibility= -"hidden";mxUtils.setOpacity(q,10);var l=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});l.spin(p);var z=window.setTimeout(function(){null==a[u]&&(l.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[u]&&(window.clearTimeout(z),mxUtils.setOpacity(q,100),y.style.visibility="",l.stop(),w(),"drive"==u&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else w(); -m.appendChild(p);++k>=d&&(mxUtils.br(m),k=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");f.setAttribute("title",mxResources.get("help"));f.setAttribute("target", -"_blank");f.style.position="absolute";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var h=document.createElement("img");h.setAttribute("border","0");h.setAttribute("valign","bottom");h.setAttribute("src",Editor.helpImage);h.style.marginRight="2px";f.appendChild(h);mxUtils.write(f,mxResources.get("help"));e.appendChild(f)}var l=document.createElement("div");l.style.position="absolute";l.style.cursor="pointer"; +StorageLibrary.prototype.isRenamable=function(a,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,e,f,u,t,k){function w(){mxEvent.addListener(p,"click",null!=k?k:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,g.checked);b()})):(a.setMode(f,g.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";p.style.display= +mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.boxSizing="border-box";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 10px 12px 10px";p.style.width="88px";p.style.height="100px";p.style.whiteSpace="nowrap";p.setAttribute("title",e);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.overflow="hidden";if(null!=c){var l=document.createElement("img"); +l.setAttribute("src",c);l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.width="60px";l.style.height="60px";l.style.paddingBottom="6px";p.appendChild(l)}else q.style.paddingTop="5px",q.style.whiteSpace="normal",mxClient.IS_IOS?(p.style.padding="0px 10px 20px 10px",p.style.top="6px"):mxClient.IS_FF&&(q.style.paddingTop="0px",q.style.marginTop="-2px");p.appendChild(q);mxUtils.write(q,e);if(null!=t)for(c=0;c<t.length;c++)mxUtils.br(q),mxUtils.write(q,t[c]);if(null!=u&&null==a[u]){l.style.visibility= +"hidden";mxUtils.setOpacity(q,10);var z=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(p);var y=window.setTimeout(function(){null==a[u]&&(z.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[u]&&(window.clearTimeout(y),mxUtils.setOpacity(q,100),l.style.visibility="",z.stop(),w(),"drive"==u&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else w(); +m.appendChild(p);++h>=d&&(mxUtils.br(m),h=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");f.setAttribute("title",mxResources.get("help"));f.setAttribute("target", +"_blank");f.style.position="absolute";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";f.appendChild(k);mxUtils.write(f,mxResources.get("help"));e.appendChild(f)}var l=document.createElement("div");l.style.position="absolute";l.style.cursor="pointer"; l.style.fontSize="12px";l.style.bottom="28px";l.style.color="gray";mxUtils.write(l,mxResources.get("decideLater"));a.isOfflineApp()?l.style.right="20px":(mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)"),l.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)l.style.marginLeft=-Math.round(l.clientWidth/2)+"px"};e.appendChild(l);mxEvent.addListener(l,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null, -null,null,null,null,null,!0);Editor.useLocalStorage=b});var m=document.createElement("div");mxClient.IS_QUIRKS&&(m.style.whiteSpace="nowrap",m.style.cssFloat="left");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var k=0,n=document.createElement("p"),f=document.createElement("p");f.style.fontSize="16pt";f.style.padding= +null,null,null,null,null,!0);Editor.useLocalStorage=b});var m=document.createElement("div");mxClient.IS_QUIRKS&&(m.style.whiteSpace="nowrap",m.style.cssFloat="left");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var h=0,n=document.createElement("p"),f=document.createElement("p");f.style.fontSize="16pt";f.style.padding= "0px";f.style.paddingTop="4px";f.style.paddingBottom="16px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("saveDiagramsTo")+":");e.appendChild(f);"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||c(IMAGE_PATH+ -"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);e.appendChild(m);f=document.createElement("p");f.style.marginTop="12px";f.style.marginBottom="6px";f.appendChild(g);h=document.createElement("span");h.style.color="gray";h.style.fontSize="12px";mxUtils.write(h," "+mxResources.get("rememberThisSetting"));f.appendChild(h);mxUtils.br(f);var q= +"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);e.appendChild(m);f=document.createElement("p");f.style.marginTop="12px";f.style.marginBottom="6px";f.appendChild(g);k=document.createElement("span");k.style.color="gray";k.style.fontSize="12px";mxUtils.write(k," "+mxResources.get("rememberThisSetting"));f.appendChild(k);mxUtils.br(f);var q= a.getRecent();if(null!=q&&0<q.length){var t=document.createElement("select");t.style.marginTop="8px";t.style.width="140px";var p=document.createElement("option");p.setAttribute("value","");p.setAttribute("selected","selected");p.style.textAlign="center";mxUtils.write(p,mxResources.get("openRecent")+"...");t.appendChild(p);for(p=0;p<q.length;p++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value", a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");t.appendChild(c)})(q[p]);f.appendChild(t);mxEvent.addListener(t,"change",function(b){""!=t.value&&a.loadFile(t.value)})}else f.style.marginTop="20px",m.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+" "+mxResources.get("gliffy")+ -", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),f.appendChild(q),m.style.paddingBottom="4px");m.appendChild(f);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&& +", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),f.appendChild(q),m.style.paddingBottom="4px");m.appendChild(f);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&& "0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",e.appendChild(n))}, 5E3);this.container=e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,c=a.getServiceCount();!a.isOffline()&&1<c&&(d=document.createElement("a"),d.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage"),d.setAttribute("title",mxResources.get("help")),d.setAttribute("target","_blank"),d.style.position="absolute",d.style.fontSize="12px",d.style.textDecoration="none",d.style.cursor="pointer",d.style.bottom= "22px",d.style.left="26px",d.style.color="gray",c=document.createElement("img"),c.setAttribute("border","0"),c.setAttribute("valign","bottom"),c.setAttribute("src",Editor.helpImage),c.style.marginRight="2px",d.appendChild(c),mxUtils.write(d,mxResources.get("help")),b.appendChild(d));c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.style.color="gray";var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("align", "absmiddle");e.style.width="40px";e.style.height="40px";e.style.marginRight="12px";e.style.paddingBottom="4px";var f="";a.mode==App.MODE_GOOGLE?(e.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive"),null!=d&&d.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Google+Drive")):a.mode==App.MODE_DROPBOX?(e.src=IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox"),null!=d&&d.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Dropbox")): a.mode==App.MODE_ONEDRIVE?(e.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive"),null!=d&&d.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+OneDrive")):a.mode==App.MODE_GITHUB?(e.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):a.mode==App.MODE_TRELLO?(e.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(e.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):(e.src=IMAGE_PATH+"/osa_drive-harddisk.png", -f=mxResources.get("device"));var h=document.createElement("div");h.style.margin="4px 0px 0px 0px";var l=document.createElement("button");l.className="geBigButton";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(h.style.padding="42px 0px 56px 0px",l.style.marginBottom="12px"):(c.appendChild(e),mxUtils.write(c,f),b.appendChild(c),h.style.border="1px solid #d3d3d3",h.style.borderWidth="1px 0px 1px 0px",h.style.padding="18px 0px 24px 0px",l.style.marginBottom= -"8px");mxClient.IS_QUIRKS&&(h.style.whiteSpace="nowrap",h.style.cssFloat="left");mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("createNewDiagram"));mxEvent.addListener(l,"click",function(){a.hideDialog();a.actions.get("new").funct()});h.appendChild(l);mxUtils.br(h);l=document.createElement("button");l.className="geBigButton";l.style.marginBottom="22px";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("openExistingDiagram")); -mxEvent.addListener(l,"click",function(){a.actions.get("open").funct()});h.appendChild(l);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP|| -EditorUi.isElectronApp||(e=function(b){l.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));l.style.marginBottom="16px";h.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});h.appendChild(c)},c=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=c?(l.style.marginBottom= -"24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+c.displayName+")"),l.style.marginBottom="16px",h.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog(); -a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),h.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?e(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&e(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&e(function(){a.dropbox.logout(); -a.openLink("https://www.dropbox.com/logout")}),e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="8px",mxUtils.write(e,mxResources.get("notUsingService",[d])),mxEvent.addListener(e,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),h.appendChild(e));b.appendChild(h);this.container=b},ConfirmDialog=function(a,b,d,c,e,f,h,l,m){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("div"); -k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);g.appendChild(k);k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(n.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop= -"8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});k.appendChild(e);null!=h?(e.innerHTML=h+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(f);g.appendChild(k);m?(k.style.marginTop="10px",k=document.createElement("p"), -k.style.marginTop="20px",k.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),g.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=g},ErrorDialog=function(a,b,d,c,e,f,h,l,m){m=null!=m?m:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px"; -k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="16px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";mxUtils.write(k,b);g.appendChild(k)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;g.appendChild(b);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");var n= -mxUtils.button(c,function(){m&&a.hideDialog();null!=e&&e()});n.className="geBtn";d.appendChild(n);null!=h&&(c=mxUtils.button(h,function(){m&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){n.focus()};g.appendChild(d);this.container=g},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c); -var h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(b.length));c.appendChild(h);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value= -mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var m= +f=mxResources.get("device"));var k=document.createElement("div");k.style.margin="4px 0px 0px 0px";var l=document.createElement("button");l.className="geBigButton";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(k.style.padding="42px 0px 56px 0px",l.style.marginBottom="12px"):(c.appendChild(e),mxUtils.write(c,f),b.appendChild(c),k.style.border="1px solid #d3d3d3",k.style.borderWidth="1px 0px 1px 0px",k.style.padding="18px 0px 24px 0px",l.style.marginBottom= +"8px");mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("createNewDiagram"));mxEvent.addListener(l,"click",function(){a.hideDialog();a.actions.get("new").funct()});k.appendChild(l);mxUtils.br(k);l=document.createElement("button");l.className="geBigButton";l.style.marginBottom="22px";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("openExistingDiagram")); +mxEvent.addListener(l,"click",function(){a.actions.get("open").funct()});k.appendChild(l);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP|| +EditorUi.isElectronApp||(e=function(b){l.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));l.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});k.appendChild(c)},c=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=c?(l.style.marginBottom= +"24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+c.displayName+")"),l.style.marginBottom="16px",k.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog(); +a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),k.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?e(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&e(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&e(function(){a.dropbox.logout(); +a.openLink("https://www.dropbox.com/logout")}),e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="8px",mxUtils.write(e,mxResources.get("notUsingService",[d])),mxEvent.addListener(e,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),k.appendChild(e));b.appendChild(k);this.container=b},ConfirmDialog=function(a,b,d,c,e,f,k,l,m){var g=document.createElement("div");g.style.textAlign="center";var h=document.createElement("div"); +h.style.padding="6px";h.style.overflow="auto";h.style.maxHeight="44px";mxClient.IS_QUIRKS&&(h.style.height="60px");mxUtils.write(h,b);g.appendChild(h);h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(n.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop= +"8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&h.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});h.appendChild(e);null!=k?(e.innerHTML=k+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||h.appendChild(f);g.appendChild(h);m?(h.style.marginTop="10px",h=document.createElement("p"), +h.style.marginTop="20px",h.appendChild(n),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),h.appendChild(k),g.appendChild(h),mxEvent.addListener(k,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):h.style.marginTop="16px";this.container=g},ErrorDialog=function(a,b,d,c,e,f,k,l,m){m=null!=m?m:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var h=document.createElement("div");h.style.padding="0px";h.style.margin="0px"; +h.style.fontSize="18px";h.style.paddingBottom="16px";h.style.marginBottom="16px";h.style.borderBottom="1px solid #c0c0c0";h.style.color="gray";mxUtils.write(h,b);g.appendChild(h)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;g.appendChild(b);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");var n= +mxUtils.button(c,function(){m&&a.hideDialog();null!=e&&e()});n.className="geBtn";d.appendChild(n);null!=k&&(c=mxUtils.button(k,function(){m&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){n.focus()};g.appendChild(d);this.container=g},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c); +var k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";mxUtils.write(k,a.formatFileSize(b.length));c.appendChild(k);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value= +mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var m= null;mxClient.IS_CHROMEAPP&&!f||navigator.standalone||!(f||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length?l.value:b;if(null!=e)e(c);else if(f)try{var g=a.openLink(c);null!=g&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=c.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}), -d||500)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}else{var k=window.open().document;k.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+b+"</body></html>");k.close()}}),m.className="geBtn",h.appendChild(m));if(!f||7500<b.length){var g=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",b,"text/plain")});g.className="geBtn";h.appendChild(g)}if(f&&(!a.isOffline()|| -mxClient.IS_CHROMEAPP)){if(51200>b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border","0");k.appendChild(g);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+ -" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";h.appendChild(k)}7168>b.length&&(k=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width", -"18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",k.appendChild(g),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign="bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",h.appendChild(k))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(g);k=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",g.className="geBtn"):(h.appendChild(m),g.className="geBtn",m.className="geBtn gePrimaryBtn");c.appendChild(h);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=B.getTitle()?B.getTitle(): -this.defaultFilename;if(x.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<A.length&&(b+="&s="+A);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(p.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(w.checked?"1":"0");b+="&resize="+(u.checked?"1":"0");b+="&x0="+Number(k.value);b+="&y0="+m;e.mathEnabled&&(b+="&math=1"); -y.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=b}else B.constructor==DriveFile||B.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=B.getHash().substring(1),b=B.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(k.value),b+="&height="+ -a),g.value=b):g.value=""}var c=document.createElement("div"),e=a.editor.graph,f=e.getGraphBounds(),h=e.view.scale,l=Math.floor(f.x/h-e.view.translate.x),m=Math.floor(f.y/h-e.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";c.appendChild(g);mxUtils.br(c);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=l;c.appendChild(k);mxUtils.write(c,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(f.height/h);c.appendChild(n); +d||500)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}else{var h=window.open().document;h.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+b+"</body></html>");h.close()}}),m.className="geBtn",k.appendChild(m));if(!f||7500<b.length){var g=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",b,"text/plain")});g.className="geBtn";k.appendChild(g)}if(f&&(!a.isOffline()|| +mxClient.IS_CHROMEAPP)){if(51200>b.length){var h=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border","0");h.appendChild(g);h.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+ +" max)");h.style.verticalAlign="bottom";h.style.paddingTop="4px";h.style.minWidth="46px";h.className="geBtn";k.appendChild(h)}7168>b.length&&(h=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width", +"18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",h.appendChild(g),h.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),h.style.verticalAlign="bottom",h.style.paddingTop="4px",h.style.minWidth="46px",h.className="geBtn",k.appendChild(h))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(g);h=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(k.appendChild(h),h.className="geBtn gePrimaryBtn",g.className="geBtn"):(k.appendChild(m),g.className="geBtn",m.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=B.getTitle()?B.getTitle(): +this.defaultFilename;if(x.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<A.length&&(b+="&s="+A);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(p.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(w.checked?"1":"0");b+="&resize="+(u.checked?"1":"0");b+="&x0="+Number(h.value);b+="&y0="+m;e.mathEnabled&&(b+="&math=1"); +z.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=b}else B.constructor==DriveFile||B.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=B.getHash().substring(1),b=B.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(h.value),b+="&height="+ +a),g.value=b):g.value=""}var c=document.createElement("div"),e=a.editor.graph,f=e.getGraphBounds(),k=e.view.scale,l=Math.floor(f.x/k-e.view.translate.x),m=Math.floor(f.y/k-e.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";c.appendChild(g);mxUtils.br(c);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.setAttribute("size","4");h.style.marginRight="16px";h.style.marginLeft="4px";h.value=l;c.appendChild(h);mxUtils.write(c,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(f.height/k);c.appendChild(n); mxUtils.br(c);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";c.appendChild(f);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=b||"";c.appendChild(q);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var t=document.createElement("input"); t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";c.appendChild(t);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft= -"8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);c.appendChild(z);mxUtils.write(c,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c,mxResources.get("asNew")+" ");mxUtils.br(c);var u=document.createElement("input");u.setAttribute("type", +"8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);c.appendChild(y);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,mxResources.get("asNew")+" ");mxUtils.br(c);var u=document.createElement("input");u.setAttribute("type", "checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";c.appendChild(u);mxUtils.write(c,mxResources.get("resize")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("embed")+" ");var A=a.getBasenames().join(";"), -B=a.getCurrentFile();mxEvent.addListener(p,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(k,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(q,"change",d);d();mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.className="geBtn gePrimaryBtn";f.appendChild(h);c.appendChild(f);this.container=c},CreateGraphDialog=function(a,b,d){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border= -"1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);c.appendChild(b);var f=new Graph(b);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var h="curved=1;";f.cellRenderer.installCellOverlayListeners=function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this, +B=a.getCurrentFile();mxEvent.addListener(p,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(h,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(q,"change",d);d();mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";f.appendChild(k);c.appendChild(f);this.container=c},CreateGraphDialog=function(a,b,d){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border= +"1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);c.appendChild(b);var f=new Graph(b);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";f.cellRenderer.installCellOverlayListeners=function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this, arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=!1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null, -null,null,null,h);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=f.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){f.connectionHandler.reset();f.clearSelection();var d=f.getCellGeometry(a),g;n(function(){g=f.insertVertex(l,null,"Entry",d.x,d.y,80,30,"rounded=1;");m(g);f.view.refresh(g);f.insertEdge(l,null,"",a,g,h)},function(){f.scrollCellToVisible(g)})}); -b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var g=mxUtils.convertPoint(f.container,mxEvent.getClientX(c),mxEvent.getClientY(c));f.connectionHandler.start(d,g.x,g.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var g;try{g=f.insertVertex(l,null,"Start",0,0,80,30,"ellipse"),m(g)}finally{f.getModel().endUpdate()}var k; -"horizontalTree"==d?(k=new mxCompactTreeLayout(f),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(k=new mxCompactTreeLayout(f,!1),k.edgeRouting=!1,k.levelDistance=30,h="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(k=new mxRadialTreeLayout(f,!1),k.edgeRouting=!1,k.levelDistance=80):"verticalFlow"==d?k=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==d?k=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST): -"organic"==d?(k=new mxFastOrganicLayout(f,!1),k.forceConstant=80):"circle"==d&&(k=new mxCircleLayout(f));if(null!=k){var n=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),k.execute(f.getDefaultParent(),g)}catch(u){throw u;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,b,c,d,g){q.apply(this,arguments);n()};f.resizeCell= +null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=f.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){f.connectionHandler.reset();f.clearSelection();var d=f.getCellGeometry(a),g;n(function(){g=f.insertVertex(l,null,"Entry",d.x,d.y,80,30,"rounded=1;");m(g);f.view.refresh(g);f.insertEdge(l,null,"",a,g,k)},function(){f.scrollCellToVisible(g)})}); +b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var g=mxUtils.convertPoint(f.container,mxEvent.getClientX(c),mxEvent.getClientY(c));f.connectionHandler.start(d,g.x,g.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var g;try{g=f.insertVertex(l,null,"Start",0,0,80,30,"ellipse"),m(g)}finally{f.getModel().endUpdate()}var h; +"horizontalTree"==d?(h=new mxCompactTreeLayout(f),h.edgeRouting=!1,h.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(h=new mxCompactTreeLayout(f,!1),h.edgeRouting=!1,h.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(h=new mxRadialTreeLayout(f,!1),h.edgeRouting=!1,h.levelDistance=80):"verticalFlow"==d?h=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==d?h=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST): +"organic"==d?(h=new mxFastOrganicLayout(f,!1),h.forceConstant=80):"circle"==d&&(h=new mxCircleLayout(f));if(null!=h){var n=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),h.execute(f.getDefaultParent(),g)}catch(u){throw u;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,b,c,d,g){q.apply(this,arguments);n()};f.resizeCell= function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&c.appendChild(t);var p=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();var c=a.editor.graph.getFreeInsertPoint(), c=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,g=d.getBounds(c);g.x-=d.translate.x;g.y-=d.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(c);null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(t)};this.container=c}; CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+ "/handle-connect.png",26,26); var BackgroundImageDialog=function(a,b){var d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h2");mxUtils.write(c,mxResources.get("backgroundImage"));c.style.marginTop="0px";d.appendChild(c);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var c=a.editor.graph.backgroundImage,e=document.createElement("input");e.setAttribute("type","text");e.style.marginTop="4px";e.style.marginBottom="4px";e.style.width="350px";e.value= -null!=c?c.src:"";var f=!1,h=function(){f||""==e.value||a.isOffline()?(l.value="",m.value=""):a.loadImage(mxUtils.trim(e.value),function(a){l.value=a.width;m.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";l.value="";m.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!= -c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,d,g,k){e.value=a;h()},function(){}, -function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(e.value=decodeURIComponent(d),h())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(e);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var l=document.createElement("input"); +null!=c?c.src:"";var f=!1,k=function(){f||""==e.value||a.isOffline()?(l.value="",m.value=""):a.loadImage(mxUtils.trim(e.value),function(a){l.value=a.width;m.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";l.value="";m.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!= +c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,d,g,h){e.value=a;k()},function(){}, +function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(e.value=decodeURIComponent(d),k())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(e);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var l=document.createElement("input"); l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=c?c.width:"";d.appendChild(l);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=c?c.height:"";d.appendChild(m);c=mxUtils.button(mxResources.get("reset"),function(){e.value="";l.value="";m.value="";f=!1});mxEvent.addListener(c,"mousedown", -function(){f=!0});mxEvent.addListener(c,"touchstart",function(){f=!0});c.className="geBtn";c.width="100";d.appendChild(c);mxUtils.br(d);mxEvent.addListener(e,"change",h);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(e.value=a.url,h()));e.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); -g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var k=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}); -k.className="geBtn";c.appendChild(k);null!=a.drive&&"1"==urlParams.photos&&(k=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD); -a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),k.className="geBtn",c.appendChild(k))}k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,m.value):null)});k.className="geBtn gePrimaryBtn";c.appendChild(k);a.editor.cancelFirst||c.appendChild(g);d.appendChild(c);this.container=d},ParseDialog=function(a,b){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"== -c){var d="plantUmlPng"==c?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},n=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=k(c1&63);r+=k(c2&63);r+=k(c3&63);return r+=k(c4&63)},f= +function(){f=!0});mxEvent.addListener(c,"touchstart",function(){f=!0});c.className="geBtn";c.width="100";d.appendChild(c);mxUtils.br(d);mxEvent.addListener(e,"change",k);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(e.value=a.url,k()));e.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); +g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var h=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}); +h.className="geBtn";c.appendChild(h);null!=a.drive&&"1"==urlParams.photos&&(h=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD); +a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),h.className="geBtn",c.appendChild(h))}h=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,m.value):null)});h.className="geBtn gePrimaryBtn";c.appendChild(h);a.editor.cancelFirst||c.appendChild(g);d.appendChild(c);this.container=d},ParseDialog=function(a,b){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"== +c){var d="plantUmlPng"==c?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var h=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},n=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=h(c1&63);r+=h(c2&63);r+=h(c3&63);return r+=h(c4&63)},f= new XMLHttpRequest;f.open("GET",d+function(a){r="";for(q=0;q<a.length;q+=3)r=q+2==a.length?r+n(a.charCodeAt(q),a.charCodeAt(q+1),0):q+1==a.length?r+n(a.charCodeAt(q),0,0):r+n(a.charCodeAt(q),a.charCodeAt(q+1),a.charCodeAt(q+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);f.responseType="blob";f.onload=function(c){200<=this.status&&300>this.status?(c=new FileReader,c.readAsDataURL(this.response),c.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop(); -var k=d.width,n=d.height;if(0==k&&0==n){var u=c.target.result,f=u.indexOf(","),u=decodeURIComponent(escape(atob(u.substring(f+1)))),u=mxUtils.parseXml(u).getElementsByTagName("svg");0<u.length&&(k=parseFloat(u[0].getAttribute("width")),n=parseFloat(u[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,e.x,e.y,k,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell); -g.scrollCellToVisible(g.getSelectionCell())};d.src=c.target.result},c.onerror=function(b){a.handleError(b)}):(a.spinner.stop(),a.handleError(c))};f.onerror=function(b){a.handleError(b)};f.send()}}else if("table"==c){for(var u=null,w=[],h=0,q=0;q<d.length;q++)if(f=mxUtils.trim(d[q]),"create table"==f.substring(0,12).toLowerCase())f=mxUtils.trim(f.substring(12)),"("==f.charAt(f.length-1)&&(f=f.substring(0,f.lastIndexOf(" "))),u=new mxCell(f,new mxGeometry(h,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"), -u.vertex=!0,w.push(u),f=a.editor.graph.getPreferredSizeForCell(l),null!=f&&(u.geometry.width=f.width+10);else if(null!=u&&")"==f.charAt(0))h+=u.geometry.width+40,u=null;else if("("!=f&&null!=u&&(f=f.substring(0,","==f.charAt(f.length-1)?f.length-1:f.length),"primary key"!=f.substring(0,11).toLowerCase())){var l=new mxCell(f,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"); +var h=d.width,n=d.height;if(0==h&&0==n){var u=c.target.result,f=u.indexOf(","),u=decodeURIComponent(escape(atob(u.substring(f+1)))),u=mxUtils.parseXml(u).getElementsByTagName("svg");0<u.length&&(h=parseFloat(u[0].getAttribute("width")),n=parseFloat(u[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,e.x,e.y,h,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell); +g.scrollCellToVisible(g.getSelectionCell())};d.src=c.target.result},c.onerror=function(b){a.handleError(b)}):(a.spinner.stop(),a.handleError(c))};f.onerror=function(b){a.handleError(b)};f.send()}}else if("table"==c){for(var u=null,w=[],k=0,q=0;q<d.length;q++)if(f=mxUtils.trim(d[q]),"create table"==f.substring(0,12).toLowerCase())f=mxUtils.trim(f.substring(12)),"("==f.charAt(f.length-1)&&(f=f.substring(0,f.lastIndexOf(" "))),u=new mxCell(f,new mxGeometry(k,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"), +u.vertex=!0,w.push(u),f=a.editor.graph.getPreferredSizeForCell(l),null!=f&&(u.geometry.width=f.width+10);else if(null!=u&&")"==f.charAt(0))k+=u.geometry.width+40,u=null;else if("("!=f&&null!=u&&(f=f.substring(0,","==f.charAt(f.length-1)?f.length-1:f.length),"primary key"!=f.substring(0,11).toLowerCase())){var l=new mxCell(f,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"); l.vertex=!0;f=sb.cloneCell(l,"");f.connectable=!1;f.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";f.geometry.width=30;f.geometry.height=26;l.insert(f);f=a.editor.graph.getPreferredSizeForCell(l);null!=f&&u.geometry.width<f.width+10&&(u.geometry.width=f.width+10);u.insert(l);u.geometry.height+=26}0<w.length&&(g=a.editor.graph,d=g.view,f=g.getGraphBounds(), g.setSelectionCells(g.importCells(w,Math.ceil(Math.max(0,f.x/d.scale-d.translate.x)+4*g.gridSize),Math.ceil(Math.max(0,(f.y+f.height)/d.scale-d.translate.y)+4*g.gridSize))),g.scrollCellToVisible(g.getSelectionCell()))}else if("list"==c){if(0<d.length){g=a.editor.graph;l=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");l.vertex=!0; -f=g.getPreferredSizeForCell(l);null!=f&&l.geometry.width<f.width+10&&(l.geometry.width=f.width+10);u=[l];if(1<d.length)for(q=1;q<d.length;q++)"--"==d[q]?(f=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),f.vertex=!0,l.geometry.height+=f.geometry.height,l.insert(f),u.push(f)):0<d[q].length&&";"!=d[q].charAt(0)&&(h=new mxCell(d[q], -new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),h.vertex=!0,f=g.getPreferredSizeForCell(h),null!=f&&h.geometry.width<f.width&&(h.geometry.width=f.width),l.geometry.width=Math.max(l.geometry.width,h.geometry.width),l.geometry.height+=h.geometry.height,l.insert(h),u.push(h));g.getModel().beginUpdate();try{l=g.importCells([l],e.x,e.y)[0],g.fireEvent(new mxEventObject("cellsInserted", -"cells",[l].concat(l.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(l);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var l=function(a){var b=m[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,m[a]=b,w.push(b));return b},m={},w=[],q=0;q<d.length;q++)if(";"!=d[q].charAt(0)){var D=d[q].split("->");if(2<=D.length){var h=l(D[0]),E=l(D[D.length-1]),D=new mxCell(2<D.length?D[1]:"",new mxGeometry);D.edge=!0;h.insertEdge(D,!0);E.insertEdge(D, +f=g.getPreferredSizeForCell(l);null!=f&&l.geometry.width<f.width+10&&(l.geometry.width=f.width+10);u=[l];if(1<d.length)for(q=1;q<d.length;q++)"--"==d[q]?(f=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),f.vertex=!0,l.geometry.height+=f.geometry.height,l.insert(f),u.push(f)):0<d[q].length&&";"!=d[q].charAt(0)&&(k=new mxCell(d[q], +new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),k.vertex=!0,f=g.getPreferredSizeForCell(k),null!=f&&k.geometry.width<f.width&&(k.geometry.width=f.width),l.geometry.width=Math.max(l.geometry.width,k.geometry.width),l.geometry.height+=k.geometry.height,l.insert(k),u.push(k));g.getModel().beginUpdate();try{l=g.importCells([l],e.x,e.y)[0],g.fireEvent(new mxEventObject("cellsInserted", +"cells",[l].concat(l.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(l);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var l=function(a){var b=m[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,m[a]=b,w.push(b));return b},m={},w=[],q=0;q<d.length;q++)if(";"!=d[q].charAt(0)){var D=d[q].split("->");if(2<=D.length){var k=l(D[0]),E=l(D[D.length-1]),D=new mxCell(2<D.length?D[1]:"",new mxGeometry);D.edge=!0;k.insertEdge(D,!0);E.insertEdge(D, !1);w.push(D)}}if(0<w.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);g=new Graph(d);g.getModel().beginUpdate();try{w=g.importCells(w);for(q=0;q<w.length;q++)g.getModel().isVertex(w[q])&&(f=g.getPreferredSizeForCell(w[q]),w[q].geometry.width=Math.max(w[q].geometry.width,f.width),w[q].geometry.height=Math.max(w[q].geometry.height,f.height));u=new mxFastOrganicLayout(g);u.disableEdgeStyle=!1;u.forceConstant=120;u.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays(); u=[];a.editor.graph.getModel().beginUpdate();try{u=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),e.x,e.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(u[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();d.parentNode.removeChild(d)}}}function c(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean": "table"==l.value?"CREATE TABLE Persons\n(\nPersonID int,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\n);":"plantUmlPng"==l.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":"plantUmlSvg"==l.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml": -";Example:\na->b\nb->edge label->c\nc->a\n"}var e=a.editor.graph.getFreeInsertPoint(),f=document.createElement("div");f.style.textAlign="right";var h=document.createElement("textarea");h.style.resize="none";h.style.width="100%";h.style.height="354px";h.style.marginBottom="16px";var l=document.createElement("select"),m=document.createElement("option");m.setAttribute("value","list");m.setAttribute("selected","selected");mxUtils.write(m,mxResources.get("list"));l.appendChild(m);m=document.createElement("option"); +";Example:\na->b\nb->edge label->c\nc->a\n"}var e=a.editor.graph.getFreeInsertPoint(),f=document.createElement("div");f.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height="354px";k.style.marginBottom="16px";var l=document.createElement("select"),m=document.createElement("option");m.setAttribute("value","list");m.setAttribute("selected","selected");mxUtils.write(m,mxResources.get("list"));l.appendChild(m);m=document.createElement("option"); m.setAttribute("value","table");mxUtils.write(m,mxResources.get("table"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+ -mxResources.get("formatPng")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(l.appendChild(m),l.appendChild(g));var k=c();h.value=k;f.appendChild(h);this.init=function(){h.focus()};Graph.fileSupport&&(h.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),h.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){h.value=a.target.result}; -b.readAsText(a)}},!1));f.appendChild(l);mxEvent.addListener(l,"change",function(){var a=c();if(0==h.value.length||h.value==k)k=a,h.value=k});m=mxUtils.button(mxResources.get("close"),function(){h.value==k?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});m.className="geBtn";a.editor.cancelFirst&&f.appendChild(m);g=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(h.value,l.value)});f.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst|| -f.appendChild(m);this.container=f},NewDialog=function(a,b,d,c,e,f,h,l,m,g,k,n,q,t){function p(){for(var a=!0;H<V.length&&(a||0!=mxUtils.mod(H,30));)a=V[H++],y(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info),a=!1}function v(){if(S)a.hideDialog(),t(S,M,B.value);else if(c)d||a.hideDialog(),c(Q,B.value);else{var b=B.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)? -a.mode:null,function(c){a.createFile(b,Q,null!=P&&0<P.length?P:null,null,function(){a.hideDialog()},null,c)})}}function z(a,b,c,d,g){null!=O&&(O.style.backgroundColor="transparent",O.style.border="1px solid transparent");D.removeAttribute("disabled");Q=b;P=c;O=a;S=d;M=g;O.style.backgroundColor=l;O.style.border=m}function y(a,b,c,d,g,k,e){var n=document.createElement("div");n.className="geTemplate";n.style.height=L+"px";n.style.width=X+"px";null!=d&&0<d.length&&n.setAttribute("title",d);if(null!=k)n.style.backgroundImage= -"url("+k+")",n.style.backgroundSize="contain",n.style.backgroundPosition="center center",n.style.backgroundRepeat="no-repeat",mxEvent.addListener(n,"click",function(b){z(n,null,null,a,e)}),mxEvent.addListener(n,"dblclick",function(a){v()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);n.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";var u=!1;mxEvent.addListener(n,"click",function(c){D.setAttribute("disabled", -"disabled");n.style.backgroundColor="transparent";n.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(z(n,a.getText(),b),u&&v())}))});mxEvent.addListener(n,"dblclick",function(a){u=!0})}else n.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+"</td></tr></table>",g&&z(n),mxEvent.addListener(n,"click",function(a){z(n)}),mxEvent.addListener(n,"dblclick",function(a){v()}); -J.appendChild(n)}function u(){mxEvent.addListener(J,"scroll",function(a){J.scrollTop+J.clientHeight>=J.scrollHeight&&(p(),mxEvent.consume(a))});var a=null,b;for(b in N){var c=document.createElement("div"),d=mxResources.get(b),k=N[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18<d.length&&(d=d.substring(0,18)+"…");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",d+" ("+ -k.length+")");mxUtils.write(c,c.getAttribute("title"));null!=g&&(c.style.padding=g);T.appendChild(c);null==a&&(a=c,a.style.backgroundColor=h);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=h,J.scrollTop=0,J.innerHTML="",H=0,V=N[b],G=null,p())})})(b,c)}p()}d=null!=d?d:!0;e=null!=e?e:!1;h=null!=h?h:"#ebf2f9";l=null!=l?l:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";k=null!=k?k:TEMPLATE_PATH+"/index.xml";var w=document.createElement("div"); +mxResources.get("formatPng")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(l.appendChild(m),l.appendChild(g));var h=c();k.value=h;f.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result}; +b.readAsText(a)}},!1));f.appendChild(l);mxEvent.addListener(l,"change",function(){var a=c();if(0==k.value.length||k.value==h)h=a,k.value=h});m=mxUtils.button(mxResources.get("close"),function(){k.value==h?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});m.className="geBtn";a.editor.cancelFirst&&f.appendChild(m);g=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(k.value,l.value)});f.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst|| +f.appendChild(m);this.container=f},NewDialog=function(a,b,d,c,e,f,k,l,m,g,h,n,q,t){function p(){for(var a=!0;H<V.length&&(a||0!=mxUtils.mod(H,30));)a=V[H++],z(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info),a=!1}function v(){if(S)a.hideDialog(),t(S,M,B.value);else if(c)d||a.hideDialog(),c(Q,B.value);else{var b=B.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)? +a.mode:null,function(c){a.createFile(b,Q,null!=P&&0<P.length?P:null,null,function(){a.hideDialog()},null,c)})}}function y(a,b,c,d,g){null!=O&&(O.style.backgroundColor="transparent",O.style.border="1px solid transparent");D.removeAttribute("disabled");Q=b;P=c;O=a;S=d;M=g;O.style.backgroundColor=l;O.style.border=m}function z(a,b,c,d,g,h,e){var n=document.createElement("div");n.className="geTemplate";n.style.height=L+"px";n.style.width=X+"px";null!=d&&0<d.length&&n.setAttribute("title",d);if(null!=h)n.style.backgroundImage= +"url("+h+")",n.style.backgroundSize="contain",n.style.backgroundPosition="center center",n.style.backgroundRepeat="no-repeat",mxEvent.addListener(n,"click",function(b){y(n,null,null,a,e)}),mxEvent.addListener(n,"dblclick",function(a){v()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);n.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";var u=!1;mxEvent.addListener(n,"click",function(c){D.setAttribute("disabled", +"disabled");n.style.backgroundColor="transparent";n.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(y(n,a.getText(),b),u&&v())}))});mxEvent.addListener(n,"dblclick",function(a){u=!0})}else n.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+"</td></tr></table>",g&&y(n),mxEvent.addListener(n,"click",function(a){y(n)}),mxEvent.addListener(n,"dblclick",function(a){v()}); +J.appendChild(n)}function u(){mxEvent.addListener(J,"scroll",function(a){J.scrollTop+J.clientHeight>=J.scrollHeight&&(p(),mxEvent.consume(a))});var a=null,b;for(b in N){var c=document.createElement("div"),d=mxResources.get(b),h=N[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18<d.length&&(d=d.substring(0,18)+"…");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",d+" ("+ +h.length+")");mxUtils.write(c,c.getAttribute("title"));null!=g&&(c.style.padding=g);T.appendChild(c);null==a&&(a=c,a.style.backgroundColor=k);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=k,J.scrollTop=0,J.innerHTML="",H=0,V=N[b],G=null,p())})})(b,c)}p()}d=null!=d?d:!0;e=null!=e?e:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";h=null!=h?h:TEMPLATE_PATH+"/index.xml";var w=document.createElement("div"); w.style.height="100%";var x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="46px";d&&w.appendChild(x);var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="40px";A.style.height="40px";A.style.marginRight="10px";A.style.paddingBottom="4px";A.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg": a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!b&&d&&x.appendChild(A);d&&mxUtils.write(x,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");A=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?A=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?A=a.dropbox.extension: a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?A=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?A=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(A=a.trello.extension);var B=document.createElement("input");B.setAttribute("value",a.defaultFilename+A);B.style.marginRight="20px";B.style.marginLeft="10px";B.style.width=b?"220px":"430px";this.init=function(){d&&(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll", @@ -6440,154 +6440,154 @@ a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?A=a.oneDrive.extension:a.mode==App.M "160px";C(0);J.scrollTop=0;J.innerHTML="";H=0;G!=V&&(V=G,p(),G=null)});E.push(F);A.appendChild(F);var I=function(a){T.style.display="none";J.style.left="30px";C(a?-1:1);null==G&&(G=V);J.scrollTop=0;J.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(J);H=0;var c=function(a,c){b.stop();V=a;c?J.innerHTML=c:0==a.length?J.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(J.innerHTML= "",p())};a?q(K.value,c):n(c)};n&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){I()}),A.appendChild(F),E.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerHTML=mxResources.get("search")+":";A.appendChild(F);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&I(!0)});A.appendChild(K);F=mxUtils.button(mxResources.get("search"), function(){I(!0)});F.className="geBtn";A.appendChild(F)}C(0)}var P=null,Q=null,O=null,S=null,M=null,J=document.createElement("div");J.style.border="1px solid #d3d3d3";J.style.position="absolute";J.style.left="160px";J.style.right="34px";x=(d?72:40)+(x?30:0);J.style.top=x+"px";J.style.bottom="68px";J.style.margin="6px 0 0 -1px";J.style.padding="6px";J.style.overflow="auto";var T=document.createElement("div");T.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;"; -var L=140,X=140,N={},Y=1;N.basic=[{title:"blankDiagram",select:!0}];var V=N.basic;if(!b){w.appendChild(T);w.appendChild(J);var U=!1;mxUtils.get(k,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=N[b];null==c&&(Y++,c=[],N[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a= -a.nextSibling}u()}})}mxEvent.addListener(B,"keypress",function(a){13==a.keyCode&&v()});k=document.createElement("div");k.style.marginTop=b?"4px":"16px";k.style.textAlign="right";k.style.position="absolute";k.style.left="40px";k.style.bottom="24px";k.style.right="40px";x=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});x.className="geBtn";!a.editor.cancelFirst||e&&null==f||k.appendChild(x);b||a.isOffline()||!d||null!=c||e||(A=mxUtils.button(mxResources.get("help"), -function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),A.className="geBtn",k.appendChild(A));b||"1"==urlParams.embed||e||(b=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(B.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))}, -mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),b.className="geBtn",k.appendChild(b));k.appendChild(D);a.editor.cancelFirst||null!=c||e&&null==f||k.appendChild(x);w.appendChild(k);this.container=w},CreateDialog=function(a,b,d,c,e,f,h,l,m,g,k,n,q,t,p){function v(c,d,g,k){function e(){mxEvent.addListener(u,"click",function(){var c=g;if(h){var d=w.value,k=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>k){var c=null!=c?c:B.value,e="";c==App.MODE_GOOGLE?e=a.drive.extension:c== -App.MODE_GITHUB?e=a.gitHub.extension:c==App.MODE_TRELLO?e=a.trello.extension:c==App.MODE_DROPBOX?e=a.dropbox.extension:c==App.MODE_ONEDRIVE?e=a.oneDrive.extension:c==App.MODE_DEVICE&&(e=".xml");0<=k&&(d=d.substring(0,k));w.value=d+e}}z(g)})}var u=document.createElement("a");u.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";u.style.display=mxClient.IS_QUIRKS? -"inline":"inline-block";u.className="geBaseButton";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 8px 10px 8px";u.style.whiteSpace="nowrap";u.appendChild(f);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");u.style.color="gray";u.style.fontSize="11px";var t=document.createElement("div");u.appendChild(t);mxUtils.write(t,d);if(null!=k&&null==a[k]){f.style.visibility="hidden";mxUtils.setOpacity(t,10);var q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0, -color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});q.spin(u);var l=window.setTimeout(function(){null==a[k]&&(q.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(l),mxUtils.setOpacity(t,100),f.style.visibility="",q.stop(),e())}))}else e();x.appendChild(u);++A==n&&(mxUtils.br(x),A=0)}function z(b){var c=w.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,b)}h=null!=h?h:!0;l=null!=l?l:!0;n=null!= -n?n:4;var y=document.createElement("div");null==c&&a.addLanguageMenu(y);var u=document.createElement("h2");mxUtils.write(u,e||mxResources.get("create"));u.style.marginTop="0px";u.style.marginBottom="24px";y.appendChild(u);mxUtils.write(y,mxResources.get("filename")+":");var w=document.createElement("input");w.setAttribute("value",b);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? -w.select():document.execCommand("selectAll",!1,null)};y.appendChild(w);null!=q&&null!=t&&"image/"==t.substring(0,6)&&(w.style.width="160px",e=null,"image/svg+xml"==t&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(q),q=e.getElementsByTagName("svg")[0],t=parseInt(q.getAttribute("width")),p=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+t+" "+p),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src", -"data:"+t+(p?";base64,":";utf8,")+q)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",e.style.maxHeight="80px",mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),y.appendChild(e),m&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){z("_blank")})));mxUtils.br(y);var x=document.createElement("div");x.style.textAlign="center";var A=0;x.style.marginTop="6px";y.appendChild(x);var B=document.createElement("select");B.style.marginLeft= +var L=140,X=140,N={},Y=1;N.basic=[{title:"blankDiagram",select:!0}];var V=N.basic;if(!b){w.appendChild(T);w.appendChild(J);var U=!1;mxUtils.get(h,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=N[b];null==c&&(Y++,c=[],N[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a= +a.nextSibling}u()}})}mxEvent.addListener(B,"keypress",function(a){13==a.keyCode&&v()});h=document.createElement("div");h.style.marginTop=b?"4px":"16px";h.style.textAlign="right";h.style.position="absolute";h.style.left="40px";h.style.bottom="24px";h.style.right="40px";x=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});x.className="geBtn";!a.editor.cancelFirst||e&&null==f||h.appendChild(x);b||a.isOffline()||!d||null!=c||e||(A=mxUtils.button(mxResources.get("help"), +function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),A.className="geBtn",h.appendChild(A));b||"1"==urlParams.embed||e||(b=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(B.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))}, +mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),b.className="geBtn",h.appendChild(b));h.appendChild(D);a.editor.cancelFirst||null!=c||e&&null==f||h.appendChild(x);w.appendChild(h);this.container=w},CreateDialog=function(a,b,d,c,e,f,k,l,m,g,h,n,q,t,p){function v(c,d,g,h){function e(){mxEvent.addListener(u,"click",function(){var c=g;if(k){var d=w.value,h=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>h){var c=null!=c?c:B.value,e="";c==App.MODE_GOOGLE?e=a.drive.extension:c== +App.MODE_GITHUB?e=a.gitHub.extension:c==App.MODE_TRELLO?e=a.trello.extension:c==App.MODE_DROPBOX?e=a.dropbox.extension:c==App.MODE_ONEDRIVE?e=a.oneDrive.extension:c==App.MODE_DEVICE&&(e=".xml");0<=h&&(d=d.substring(0,h));w.value=d+e}}y(g)})}var u=document.createElement("a");u.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";u.style.display=mxClient.IS_QUIRKS? +"inline":"inline-block";u.className="geBaseButton";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 8px 10px 8px";u.style.whiteSpace="nowrap";u.appendChild(f);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");u.style.color="gray";u.style.fontSize="11px";var t=document.createElement("div");u.appendChild(t);mxUtils.write(t,d);if(null!=h&&null==a[h]){f.style.visibility="hidden";mxUtils.setOpacity(t,10);var q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0, +color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});q.spin(u);var l=window.setTimeout(function(){null==a[h]&&(q.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(l),mxUtils.setOpacity(t,100),f.style.visibility="",q.stop(),e())}))}else e();x.appendChild(u);++A==n&&(mxUtils.br(x),A=0)}function y(b){var c=w.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,b)}k=null!=k?k:!0;l=null!=l?l:!0;n=null!= +n?n:4;var z=document.createElement("div");null==c&&a.addLanguageMenu(z);var u=document.createElement("h2");mxUtils.write(u,e||mxResources.get("create"));u.style.marginTop="0px";u.style.marginBottom="24px";z.appendChild(u);mxUtils.write(z,mxResources.get("filename")+":");var w=document.createElement("input");w.setAttribute("value",b);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? +w.select():document.execCommand("selectAll",!1,null)};z.appendChild(w);null!=q&&null!=t&&"image/"==t.substring(0,6)&&(w.style.width="160px",e=null,"image/svg+xml"==t&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(q),q=e.getElementsByTagName("svg")[0],t=parseInt(q.getAttribute("width")),p=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+t+" "+p),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src", +"data:"+t+(p?";base64,":";utf8,")+q)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",e.style.maxHeight="80px",mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),z.appendChild(e),m&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){y("_blank")})));mxUtils.br(z);var x=document.createElement("div");x.style.textAlign="center";var A=0;x.style.marginTop="6px";z.appendChild(x);var B=document.createElement("select");B.style.marginLeft= "10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(e,mxResources.get("googleDrive")),B.appendChild(e),v(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),B.appendChild(e),a.mode== App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),B.appendChild(e),a.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(e= document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),B.appendChild(e),v(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),B.appendChild(e),v(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage|| -null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),B.appendChild(e),a.mode!=App.MODE_DEVICE&&l||e.setAttribute("selected","selected"),k&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),B.appendChild(l), +null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),B.appendChild(e),a.mode!=App.MODE_DEVICE&&l||e.setAttribute("selected","selected"),h&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),B.appendChild(l), a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right";null!=g&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className= -"geBtn";a.editor.cancelFirst&&l.appendChild(e);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),q.className="geBtn",l.appendChild(q));m&&(m=mxUtils.button(mxResources.get("openInNewWindow"),function(){z("_blank")}),m.className="geBtn",l.appendChild(m));mxClient.IS_IOS||(f=mxUtils.button(f||mxResources.get("create"),function(){z(k?"download":App.MODE_DEVICE)}),f.className="geBtn gePrimaryBtn",l.appendChild(f));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(w, -"keypress",function(b){13==b.keyCode?z(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(l);this.container=y},PopupDialog=function(a,b,d,c,e){e=null!=e?e:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var h=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=c&&c()});h.className="geBtn";h.style.marginBottom="8px";h.style.width= -"280px";f.appendChild(h);mxUtils.br(f);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=d&&d();a.openLink(b)});l.className="geBtn gePrimaryBtn";l.style.width=h.style.width;f.appendChild(l);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,b,d,c,e,f){f=null!=f?f:!0;var h=a.editor.graph,l=document.createElement("div");mxUtils.write(l,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor= +"geBtn";a.editor.cancelFirst&&l.appendChild(e);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),q.className="geBtn",l.appendChild(q));m&&(m=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),m.className="geBtn",l.appendChild(m));mxClient.IS_IOS||(f=mxUtils.button(f||mxResources.get("create"),function(){y(h?"download":App.MODE_DEVICE)}),f.className="geBtn gePrimaryBtn",l.appendChild(f));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(w, +"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});z.appendChild(l);this.container=z},PopupDialog=function(a,b,d,c,e){e=null!=e?e:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();null!=c&&c()});k.className="geBtn";k.style.marginBottom="8px";k.style.width= +"280px";f.appendChild(k);mxUtils.br(f);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=d&&d();a.openLink(b)});l.className="geBtn gePrimaryBtn";l.style.width=k.style.width;f.appendChild(l);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,b,d,c,e,f){f=null!=f?f:!0;var k=a.editor.graph,l=document.createElement("div");mxUtils.write(l,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor= "transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||(b.style.paddingRight="20px");var m=document.createElement("input");m.setAttribute("value",d);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize","off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS? 20:-20)+"px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+ -a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){m.value="";m.focus()});b.appendChild(m);b.appendChild(d);l.appendChild(b);var g=function(b,d,g){var k="data:"==b.substring(0,5);!a.isOffline()||k&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(k){a.spinner.stop();a.hideDialog();var e=null!=d&&null!=g?Math.max(d/k.width,g/k.height):Math.min(1,Math.min(520/k.width,520/k.height));f&&(b=a.convertDataUri(b)); -c(b,Math.round(Number(k.width)*e),Math.round(Number(k.height)*e))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),c(b)):(b=a.convertDataUri(b),d=null==d?120:d,g=null==g?100:g,a.hideDialog(),c(b,d,g))},k=function(b){if(null!=b){var d=e?null:h.getModel().getGeometry(h.getSelectionCell());null!=d?g(b,d.width,d.height):g(b)}else a.hideDialog(),c(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder", +a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){m.value="";m.focus()});b.appendChild(m);b.appendChild(d);l.appendChild(b);var g=function(b,d,g){var h="data:"==b.substring(0,5);!a.isOffline()||h&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(h){a.spinner.stop();a.hideDialog();var e=null!=d&&null!=g?Math.max(d/h.width,g/h.height):Math.min(1,Math.min(520/h.width,520/h.height));f&&(b=a.convertDataUri(b)); +c(b,Math.round(Number(h.width)*e),Math.round(Number(h.height)*e))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),c(b)):(b=a.convertDataUri(b),d=null==d?120:d,g=null==g?100:g,a.hideDialog(),c(b,d,g))},h=function(b){if(null!=b){var d=e?null:k.getModel().getGeometry(k.getSelectionCell());null!=d?g(b,d.width,d.height):g(b)}else a.hideDialog(),c(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder", mxResources.get("dragImagesHere"));var b=l.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files, -0,0,a.maxImageSize,function(a,b,c,d,g,e){k(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&k(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign= +0,0,a.maxImageSize,function(a,b,c,d,g,e){h(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&h(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign= "right";b=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(m.value=a.url));m.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n, -"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,b,c,d,g,e){k(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){n.click()});q.className="geBtn";d.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==m.value.substring(0,11)&&"data:image/svg"!=m.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a, +"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,b,c,d,g,e){h(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){n.click()});q.className="geBtn";d.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==m.value.substring(0,11)&&"data:image/svg"!=m.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a, m.value,function(a){m.value=a});a.showDialog(b.container,200,180,!0,!0);b.init()}),q.className="geBtn",d.appendChild(q));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(q=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}), q.className="geBtn",d.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&(q=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD); -a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),q.className="geBtn",d.appendChild(q)));mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&k(m.value)});q=mxUtils.button(mxResources.get("apply"),function(){k(m.value)});q.className="geBtn gePrimaryBtn";d.appendChild(q);a.editor.cancelFirst||d.appendChild(b);Graph.fileSupport&&(d.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition= +a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),q.className="geBtn",d.appendChild(q)));mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&h(m.value)});q=mxUtils.button(mxResources.get("apply"),function(){h(m.value)});q.className="geBtn gePrimaryBtn";d.appendChild(q);a.editor.cancelFirst||d.appendChild(b);Graph.fileSupport&&(d.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition= "center 65%",l.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),l.appendChild(b));l.appendChild(d);this.container=l},LinkDialog=function(a,b,d,c,e){function f(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px"; -b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);z.appendChild(c)}var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var m=document.createElement("input"); +b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);y.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var m=document.createElement("input"); m.setAttribute("placeholder",mxResources.get("dragUrlsHere"));m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="400px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";var g=document.createElement("div");g.setAttribute("title",mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer"; -g.style.display=mxClient.IS_VML?"inline":"inline-block";g.style.top=(mxClient.IS_VML?0:3)+"px";g.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){m.value="";m.focus()});var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;"; -n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var q=document.createElement("select");q.style.width="380px";if(e&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(m.setAttribute("value",b),k.setAttribute("checked","checked"),k.defaultChecked=!0);m.style.width="380px";l.appendChild(k);l.appendChild(m);l.appendChild(g);mxUtils.br(l);l.appendChild(n);e=!1;for(g=0;g<a.pages.length;g++){var t= +g.style.display=mxClient.IS_VML?"inline":"inline-block";g.style.top=(mxClient.IS_VML?0:3)+"px";g.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){m.value="";m.focus()});var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;"; +n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var q=document.createElement("select");q.style.width="380px";if(e&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(m.setAttribute("value",b),h.setAttribute("checked","checked"),h.defaultChecked=!0);m.style.width="380px";l.appendChild(h);l.appendChild(m);l.appendChild(g);mxUtils.br(l);l.appendChild(n);e=!1;for(g=0;g<a.pages.length;g++){var t= document.createElement("option");mxUtils.write(t,a.pages[g].getName()||mxResources.get("pageWithNumber",[g+1]));t.setAttribute("value","data:page/id,"+a.pages[g].getId());b==t.getAttribute("value")&&(t.setAttribute("selected","selected"),e=!0);q.appendChild(t)}if(!e&&n.checked){var p=document.createElement("option");mxUtils.write(p,mxResources.get("pageNotFound"));p.setAttribute("disabled","disabled");p.setAttribute("selected","selected");p.setAttribute("value","pageNotFound");q.appendChild(p);mxEvent.addListener(q, -"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)})}l.appendChild(q)}else m.setAttribute("value",b),l.appendChild(m),l.appendChild(g);h.appendChild(l);var v=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==q.value?q.value:b:m.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){n.checked?q.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? -m.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){k.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var b=h.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover", -mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div"); -z.style.marginTop="20px";z.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&z.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b= +"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)})}l.appendChild(q)}else m.setAttribute("value",b),l.appendChild(m),l.appendChild(g);k.appendChild(l);var v=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==q.value?q.value:b:m.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){n.checked?q.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? +m.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){h.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover", +mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),h.setAttribute("checked","checked"),h.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div"); +y.style.marginTop="20px";y.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&y.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b= "https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);m.value=b;m.focus()}else LinkDialog.selectedDocs=null;m.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&f(IMAGE_PATH+"/google-drive-logo.svg", mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0), b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(d).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD); a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&f(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){m.value=a[0].link;m.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){m.value=b.value[0].webUrl; -m.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),c(n.checked?q.value:m.value,LinkDialog.selectedDocs))});z.appendChild(v);a.editor.cancelFirst||z.appendChild(d);h.appendChild(z);this.container= -h},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+ +m.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),c(n.checked?q.value:m.value,LinkDialog.selectedDocs))});y.appendChild(v);a.editor.cancelFirst||y.appendChild(d);k.appendChild(y);this.container= +k},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+ "/logo-flat.png"));b.appendChild(d);mxUtils.br(b);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=document.createElement("small");d.style.color="#505050";d.innerHTML='© 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container= b},FeedbackDialog=function(a){var b=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"), -function(){var b=(h.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+m.value+b), +function(){var b=(k.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+m.value+b), function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var f=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(c,"change", -function(){0<c.value.length&&0<f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(c,"keyup",function(){0<c.value.length&&f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b.appendChild(c);this.init=function(){c.focus()};var h=document.createElement("input");h.setAttribute("type","checkbox");h.setAttribute("checked","checked");h.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(h); -var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(l);mxEvent.addListener(l,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));b.appendChild(d);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("commentsNotes")); +function(){0<c.value.length&&0<f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(c,"keyup",function(){0<c.value.length&&f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b.appendChild(c);this.init=function(){c.focus()};var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(k); +var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(l);mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));b.appendChild(d);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("commentsNotes")); b.appendChild(m);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst?(d.appendChild(l),d.appendChild(e)):(d.appendChild(e),d.appendChild(l));b.appendChild(d);this.container=b};FeedbackDialog.maxAttachmentSize=1E6; -var RevisionDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));c.appendChild(e);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";c.appendChild(f);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.left="199px";h.style.width="470px";h.style.height= -"376px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);c.appendChild(h);var l=new Graph(h);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var m=0,g=null,k=0,n=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==a?k+1:n.apply(this,arguments)};l.getLinkForCell=function(){return null};Editor.MathJaxRender&& -l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),t=a.getCurrentFile(),p=null,v=null,z=null,y=null,u=mxUtils.button("",function(){null!=z&&l.zoomIn()});u.className="geSprite geSprite-zoomin";u.setAttribute("title",mxResources.get("zoomIn")); -u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var w=mxUtils.button("",function(){null!=z&&l.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var x=mxUtils.button("",function(){null!=z&&(l.maxFitScale=8,l.fit(8),l.center())});x.className= -"geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var A=mxUtils.button("",function(){null!=z&&(l.zoomActual(),l.center())});A.className="geSprite geSprite-actualsize";A.setAttribute("title",mxResources.get("actualSize"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var B= -document.createElement("div");B.style.position="absolute";B.style.textAlign="right";B.style.color="gray";B.style.marginTop="10px";B.style.backgroundColor="transparent";B.style.top="440px";B.style.right="32px";B.style.maxWidth="380px";B.style.cursor="default";var H=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(z.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"): -(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});H.className="geBtn";H.setAttribute("disabled","disabled");var D=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(b){a.spinner.stop(); -a.replaceFileData(y);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});D.className="geBtn";D.setAttribute("disabled","disabled");var E=document.createElement("select");E.setAttribute("disabled","disabled");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";var G=null;mxEvent.addListener(E,"change",function(a){null!= -G&&(G(a),mxEvent.consume(a))});var C=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),window.openWindow(a.getUrl()))});C.className="geBtn";C.setAttribute("disabled","disabled");null!=d&&(C.style.display="none");var F=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl())});F.className="geBtn gePrimaryBtn";F.setAttribute("disabled", -"disabled");null!=d&&(F.style.display="none",D.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.padding="2px";I.style.border="none";I.style.left="199px";I.style.top="442px";var K=null;if(null!=b&&0<b.length){h.style.cursor="move";var P=document.createElement("table");P.style.border= +var RevisionDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));c.appendChild(e);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";c.appendChild(f);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height= +"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);c.appendChild(k);var l=new Graph(k);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var m=0,g=null,h=0,n=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=g&&null!=g[h]?g[h].getAttribute("name"):"pagenumber"==a?h+1:n.apply(this,arguments)};l.getLinkForCell=function(){return null};Editor.MathJaxRender&& +l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),t=a.getCurrentFile(),p=null,v=null,y=null,z=null,u=mxUtils.button("",function(){null!=y&&l.zoomIn()});u.className="geSprite geSprite-zoomin";u.setAttribute("title",mxResources.get("zoomIn")); +u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var w=mxUtils.button("",function(){null!=y&&l.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var x=mxUtils.button("",function(){null!=y&&(l.maxFitScale=8,l.fit(8),l.center())});x.className= +"geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var A=mxUtils.button("",function(){null!=y&&(l.zoomActual(),l.center())});A.className="geSprite geSprite-actualsize";A.setAttribute("title",mxResources.get("actualSize"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var B= +document.createElement("div");B.style.position="absolute";B.style.textAlign="right";B.style.color="gray";B.style.marginTop="10px";B.style.backgroundColor="transparent";B.style.top="440px";B.style.right="32px";B.style.maxWidth="380px";B.style.cursor="default";var H=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(y.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"): +(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});H.className="geBtn";H.setAttribute("disabled","disabled");var D=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=z&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(z):a.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(b){a.spinner.stop(); +a.replaceFileData(z);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});D.className="geBtn";D.setAttribute("disabled","disabled");var E=document.createElement("select");E.setAttribute("disabled","disabled");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";var G=null;mxEvent.addListener(E,"change",function(a){null!= +G&&(G(a),mxEvent.consume(a))});var C=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),window.openWindow(a.getUrl()))});C.className="geBtn";C.setAttribute("disabled","disabled");null!=d&&(C.style.display="none");var F=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl())});F.className="geBtn gePrimaryBtn";F.setAttribute("disabled", +"disabled");null!=d&&(F.style.display="none",D.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.padding="2px";I.style.border="none";I.style.left="199px";I.style.top="442px";var K=null;if(null!=b&&0<b.length){k.style.cursor="move";var P=document.createElement("table");P.style.border= "1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var Q=document.createElement("tbody"),O=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var S=b.length-1;0<=S;S--){var M=function(c){var d=new Date(c.modifiedDate),e=null;if(0<=d.getTime()){var n=function(b){q.stop();var c=mxUtils.parseXml(b),n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){var f=function(b){null!=b&&(b= -p(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},p=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};E.style.display="none";E.innerHTML="";z=c;y=b;g=parseSelectFunction=null;k=0;if("mxfile"==n.nodeName){c=n.getElementsByTagName("diagram");g=[];for(b=0;b<c.length;b++)g.push(c[b]); -k=Math.min(m,g.length-1);0<g.length&&f(g[k]);if(1<g.length)for(E.removeAttribute("disabled"),E.style.display="",b=0;b<g.length;b++)c=document.createElement("option"),mxUtils.write(c,g[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==k&&c.setAttribute("selected","selected"),E.appendChild(c);G=function(){k=m=parseInt(E.value);f(g[m])}}else p(n);B.innerHTML="";mxUtils.write(B,d.toLocaleDateString()+" "+d.toLocaleTimeString());B.setAttribute("title",e.getAttribute("title")); +p(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},p=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};E.style.display="none";E.innerHTML="";y=c;z=b;g=parseSelectFunction=null;h=0;if("mxfile"==n.nodeName){c=n.getElementsByTagName("diagram");g=[];for(b=0;b<c.length;b++)g.push(c[b]); +h=Math.min(m,g.length-1);0<g.length&&f(g[h]);if(1<g.length)for(E.removeAttribute("disabled"),E.style.display="",b=0;b<g.length;b++)c=document.createElement("option"),mxUtils.write(c,g[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==h&&c.setAttribute("selected","selected"),E.appendChild(c);G=function(){h=m=parseInt(E.value);f(g[m])}}else p(n);B.innerHTML="";mxUtils.write(B,d.toLocaleDateString()+" "+d.toLocaleTimeString());B.setAttribute("title",e.getAttribute("title")); u.removeAttribute("disabled");w.removeAttribute("disabled");x.removeAttribute("disabled");A.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&D.removeAttribute("disabled"),H.removeAttribute("disabled"),F.removeAttribute("disabled"),C.removeAttribute("disabled"));mxUtils.setOpacity(u,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(A,60)}else E.style.display="none",E.innerHTML="",B.innerHTML="",mxUtils.write(B,mxResources.get("errorLoadingFile"))}, e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var f=document.createElement("td");f.style.padding="6px";f.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(f,mxResources.get("current")):d.toDateString()===O?mxUtils.write(f,d.toLocaleTimeString()):mxUtils.write(f,d.toLocaleDateString()+" "+d.toLocaleTimeString());e.appendChild(f);e.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+ -(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){v!=c&&(q.stop(),null!=p&&(p.style.backgroundColor=""),v=c,p=e,p.style.backgroundColor="#ebf2f9",y=z=null,B.removeAttribute("title"),B.innerHTML=mxResources.get("loading")+"...",h.style.backgroundColor="#ffffff",l.getModel().clear(),D.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),A.setAttribute("disabled", -"disabled"),x.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(u,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(A,20),q.spin(h),c.getXml(function(a){v==c&&n(a)},function(a){q.stop();E.style.display="none";E.innerHTML="";B.innerHTML="";mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){F.click(); -window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Q.appendChild(e)}return e}(b[S]);null!=M&&S==b.length-1&&(K=M)}P.appendChild(Q);f.appendChild(P)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(h.style.display="none",I.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(h.style.display="none",I.style.display="none",mxUtils.write(f, +(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){v!=c&&(q.stop(),null!=p&&(p.style.backgroundColor=""),v=c,p=e,p.style.backgroundColor="#ebf2f9",z=y=null,B.removeAttribute("title"),B.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",l.getModel().clear(),D.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),A.setAttribute("disabled", +"disabled"),x.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(u,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(A,20),q.spin(k),c.getXml(function(a){v==c&&n(a)},function(a){q.stop();E.style.display="none";E.innerHTML="";B.innerHTML="";mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){F.click(); +window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Q.appendChild(e)}return e}(b[S]);null!=M&&S==b.length-1&&(K=M)}P.appendChild(Q);f.appendChild(P)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(k.style.display="none",I.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(k.style.display="none",I.style.display="none",mxUtils.write(f, mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";I.appendChild(E);I.appendChild(u);I.appendChild(w);I.appendChild(A);I.appendChild(x);a.editor.cancelFirst?(e.appendChild(f),e.appendChild(H),e.appendChild(C),e.appendChild(D),e.appendChild(F)):(e.appendChild(H),e.appendChild(C),e.appendChild(D),e.appendChild(F),e.appendChild(f));c.appendChild(e);c.appendChild(I);c.appendChild(B);this.container= -c},DraftDialog=function(a,b,d,c,e,f,h,l){var m=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";mxUtils.write(g,b);m.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.marginTop="10px";k.style.width="640px";k.style.top="46px";k.style.bottom="74px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);m.appendChild(k);var n=new Graph(k); +c},DraftDialog=function(a,b,d,c,e,f,k,l){var m=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";mxUtils.write(g,b);m.appendChild(g);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.marginTop="10px";h.style.width="640px";h.style.top="46px";h.style.bottom="74px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);m.appendChild(h);var n=new Graph(h); n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;b=mxUtils.parseXml(d);var q=a.editor.extractGraphModel(b.documentElement,!0),t=0,p=null,v=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=p&&null!=p[t]?p[t].getAttribute("name"):"pagenumber"==a?t+1:v.apply(this,arguments)};n.getLinkForCell=function(){return null};b=mxUtils.button("",function(){n.zoomIn()});b.className= "geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){n.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);g=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});g.className="geSprite geSprite-fit";g.setAttribute("title", -mxResources.get("fit"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);var z=mxUtils.button("",function(){n.zoomActual();n.center()});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";mxUtils.setOpacity(z,60);e=mxUtils.button(h||mxResources.get("discard"),e);e.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position= -"relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight="6px";y.style.display="none";c=mxUtils.button(f||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.width="640px";f.style.textAlign="right";h=document.createElement("div");h.className="geToolbarContainer";h.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;"; -this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(y,"change",function(a){t=parseInt(y.value);c(p[t]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var d=q.getElementsByTagName("diagram"); -p=[];for(var g=0;g<d.length;g++)p.push(d[g]);0<p.length&&c(p[t]);if(1<p.length)for(y.style.display="",g=0;g<p.length;g++)d=document.createElement("option"),mxUtils.write(d,p[g].getAttribute("name")||mxResources.get("pageWithNumber",[g+1])),d.setAttribute("value",g),g==t&&d.setAttribute("selected","selected"),y.appendChild(d)}else b(q)};h.appendChild(y);h.appendChild(b);h.appendChild(d);h.appendChild(z);h.appendChild(g);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className= -"geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(f.appendChild(b),null!=l&&f.appendChild(l),f.appendChild(e),f.appendChild(c)):(f.appendChild(c),f.appendChild(e),null!=l&&f.appendChild(l),f.appendChild(b));m.appendChild(f);m.appendChild(h);this.container=m},FindWindow=function(a,b,d,c,e){function f(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var g= -mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&g.substring(0,c.length)===c||null!=a&&a.test(g))return!0}}return!1}function h(){var a=m.model.getDescendants(m.model.getRoot()),b=q.value.toLowerCase(),c=t.checked?new RegExp(b):null,d=null;g!=b&&(g=b,k=null);var e=null==k;if(0<b.length)for(var n=0;n<a.length;n++){var h=m.view.getState(a[n]);if(null!=h&&null!=h.cell.value&&(e||null==d)&&(m.model.isVertex(h.cell)||m.model.isEdge(h.cell))&&(m.isHtmlLabel(h.cell)? -(p.innerHTML=m.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([p])):label=m.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||f(c,h.cell,b))||null!=c&&(c.test(label)||f(c,h.cell,b))))if(e){d=h;break}else null==d&&(d=h);e=e||h==k}null!=d?(k=d,m.scrollCellToVisible(k.cell),m.isEnabled()?m.setSelectionCell(k.cell):m.highlightCell(k.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d} -var l=a.actions.get("find"),m=a.editor.graph,g=null,k=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width="170px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";n.appendChild(q);var t=document.createElement("input"); -t.setAttribute("type","checkbox");n.appendChild(t);mxUtils.write(n,mxResources.get("regularExpression"));var p=document.createElement("div");mxUtils.br(n);var v=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";g=k=null;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.backgroundColor="#f5f5f5";v.style.backgroundImage="none";v.className="geBtn";n.appendChild(v);v=mxUtils.button(mxResources.get("find"), -function(){try{q.style.backgroundColor=h()?"":"#ffcfcf"}catch(z){a.handleError(z)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.style.backgroundColor="#4d90fe";v.style.backgroundImage="none";v.className="geBtn gePrimaryBtn";n.appendChild(v);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(g!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=h()?"":"#ffcfcf"}catch(y){q.style.backgroundColor= +mxResources.get("fit"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);var y=mxUtils.button("",function(){n.zoomActual();n.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";mxUtils.setOpacity(y,60);e=mxUtils.button(k||mxResources.get("discard"),e);e.className="geBtn";var z=document.createElement("select");z.style.maxWidth="80px";z.style.position= +"relative";z.style.top="-2px";z.style.verticalAlign="bottom";z.style.marginRight="6px";z.style.display="none";c=mxUtils.button(f||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.width="640px";f.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;"; +this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(z,"change",function(a){t=parseInt(z.value);c(p[t]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var d=q.getElementsByTagName("diagram"); +p=[];for(var g=0;g<d.length;g++)p.push(d[g]);0<p.length&&c(p[t]);if(1<p.length)for(z.style.display="",g=0;g<p.length;g++)d=document.createElement("option"),mxUtils.write(d,p[g].getAttribute("name")||mxResources.get("pageWithNumber",[g+1])),d.setAttribute("value",g),g==t&&d.setAttribute("selected","selected"),z.appendChild(d)}else b(q)};k.appendChild(z);k.appendChild(b);k.appendChild(d);k.appendChild(y);k.appendChild(g);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className= +"geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(f.appendChild(b),null!=l&&f.appendChild(l),f.appendChild(e),f.appendChild(c)):(f.appendChild(c),f.appendChild(e),null!=l&&f.appendChild(l),f.appendChild(b));m.appendChild(f);m.appendChild(k);this.container=m},FindWindow=function(a,b,d,c,e){function f(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var g= +mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&g.substring(0,c.length)===c||null!=a&&a.test(g))return!0}}return!1}function k(){var a=m.model.getDescendants(m.model.getRoot()),b=q.value.toLowerCase(),c=t.checked?new RegExp(b):null,d=null;g!=b&&(g=b,h=null);var e=null==h;if(0<b.length)for(var n=0;n<a.length;n++){var k=m.view.getState(a[n]);if(null!=k&&null!=k.cell.value&&(e||null==d)&&(m.model.isVertex(k.cell)||m.model.isEdge(k.cell))&&(m.isHtmlLabel(k.cell)? +(p.innerHTML=m.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([p])):label=m.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||f(c,k.cell,b))||null!=c&&(c.test(label)||f(c,k.cell,b))))if(e){d=k;break}else null==d&&(d=k);e=e||k==h}null!=d?(h=d,m.scrollCellToVisible(h.cell),m.isEnabled()?m.setSelectionCell(h.cell):m.highlightCell(h.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d} +var l=a.actions.get("find"),m=a.editor.graph,g=null,h=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width="170px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";n.appendChild(q);var t=document.createElement("input"); +t.setAttribute("type","checkbox");n.appendChild(t);mxUtils.write(n,mxResources.get("regularExpression"));var p=document.createElement("div");mxUtils.br(n);var v=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";g=h=null;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.backgroundColor="#f5f5f5";v.style.backgroundImage="none";v.className="geBtn";n.appendChild(v);v=mxUtils.button(mxResources.get("find"), +function(){try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.style.backgroundColor="#4d90fe";v.style.backgroundImage="none";v.className="geBtn gePrimaryBtn";n.appendChild(v);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(g!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(z){q.style.backgroundColor= "#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,b,d,c,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? -q.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},TagsWindow=function(a,b,d,c,e){function f(a){a=null!=a?a:l.model.getDescendants(l.model.getRoot());for(var b=k.value.split(" "),c=[],d=0;d<a.length;d++)if(l.model.isVertex(a[d])||l.model.isEdge(a[d])){var g=null!=a[d].value&&"object"==typeof a[d].value?mxUtils.trim(a[d].value.getAttribute(m)||""):"",e=!0;if(0<g.length)for(var g=g.toLowerCase().split(" "),n=0;n<b.length&&e;n++)var f=mxUtils.trim(b[n]).toLowerCase(),e=e&& -(0==f.length||0<=mxUtils.indexOf(g,f));else e=0==mxUtils.trim(k.value).length;e&&c.push(a[d])}return c}function h(a,b){l.model.beginUpdate();try{for(var c=0;c<a.length;c++)l.model.setVisible(a[c],b)}finally{l.model.endUpdate()}}var l=a.editor.graph,m="tags",g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var k=document.createElement("input");k.setAttribute("placeholder",mxResources.get("allTags"));k.setAttribute("type", -"text");k.style.marginTop="4px";k.style.width="260px";k.style.fontSize="12px";k.style.borderRadius="4px";k.style.padding="6px";g.appendChild(k);mxEvent.addListener(k,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});k.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(g);var n=mxUtils.button(mxResources.get("hide"), -function(){h(f(),!1)});n.setAttribute("title",mxResources.get("hide"));n.style.marginTop="8px";n.style.marginRight="4px";n.style.backgroundColor="#f5f5f5";n.style.backgroundImage="none";n.className="geBtn";g.appendChild(n);n=mxUtils.button(mxResources.get("show"),function(){var a=f();h(a,!0);l.isEnabled()&&l.setSelectionCells(a)});n.setAttribute("title",mxResources.get("show"));n.style.marginTop="8px";n.style.marginRight="4px";n.style.backgroundColor="#f5f5f5";n.style.backgroundImage="none";n.className= -"geBtn";g.appendChild(n);var q=a.actions.get("tags"),n=mxUtils.button(mxResources.get("close"),function(){q.funct()});n.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");n.style.marginTop="8px";n.style.backgroundColor="#4d90fe";n.style.backgroundImage="none";n.className="geBtn gePrimaryBtn";g.appendChild(n);mxEvent.addListener(k,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),g,b,d,c,e,!0,!0);this.window.destroyOnClose=!1; -this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):l.container.focus()}))},AuthDialog=function(a,b,d,c){var e=document.createElement("div");e.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding= -"0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("authorizationRequired"));var h="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";b==a.drive?(h=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):b==a.dropbox?(h=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):b==a.oneDrive?(h=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"): -b==a.gitHub?(h=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):b==a.trello&&(h=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[h]));var m=document.createElement("input");m.setAttribute("type","checkbox");h=mxUtils.button(mxResources.get("authorize"),function(){c(m.checked)});h.insertBefore(l,h.firstChild);h.style.marginTop="6px";h.className="geBigButton";e.appendChild(f);e.appendChild(a); -e.appendChild(h);d&&(d=document.createElement("p"),d.style.marginTop="20px",d.appendChild(m),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),d.appendChild(f),e.appendChild(d),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,b,d){d=null!=d?d:a.sidebar.entries;var c=document.createElement("div");if(b){b=document.createElement("div");b.className="geDialogTitle"; +q.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},TagsWindow=function(a,b,d,c,e){function f(a){a=null!=a?a:l.model.getDescendants(l.model.getRoot());for(var b=h.value.split(" "),c=[],d=0;d<a.length;d++)if(l.model.isVertex(a[d])||l.model.isEdge(a[d])){var g=null!=a[d].value&&"object"==typeof a[d].value?mxUtils.trim(a[d].value.getAttribute(m)||""):"",e=!0;if(0<g.length)for(var g=g.toLowerCase().split(" "),n=0;n<b.length&&e;n++)var f=mxUtils.trim(b[n]).toLowerCase(),e=e&& +(0==f.length||0<=mxUtils.indexOf(g,f));else e=0==mxUtils.trim(h.value).length;e&&c.push(a[d])}return c}function k(a,b){l.model.beginUpdate();try{for(var c=0;c<a.length;c++)l.model.setVisible(a[c],b)}finally{l.model.endUpdate()}}var l=a.editor.graph,m="tags",g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var h=document.createElement("input");h.setAttribute("placeholder",mxResources.get("allTags"));h.setAttribute("type", +"text");h.style.marginTop="4px";h.style.width="260px";h.style.fontSize="12px";h.style.borderRadius="4px";h.style.padding="6px";g.appendChild(h);mxEvent.addListener(h,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});h.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(g);var n=mxUtils.button(mxResources.get("hide"), +function(){k(f(),!1)});n.setAttribute("title",mxResources.get("hide"));n.style.marginTop="8px";n.style.marginRight="4px";n.style.backgroundColor="#f5f5f5";n.style.backgroundImage="none";n.className="geBtn";g.appendChild(n);n=mxUtils.button(mxResources.get("show"),function(){var a=f();k(a,!0);l.isEnabled()&&l.setSelectionCells(a)});n.setAttribute("title",mxResources.get("show"));n.style.marginTop="8px";n.style.marginRight="4px";n.style.backgroundColor="#f5f5f5";n.style.backgroundImage="none";n.className= +"geBtn";g.appendChild(n);var q=a.actions.get("tags"),n=mxUtils.button(mxResources.get("close"),function(){q.funct()});n.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");n.style.marginTop="8px";n.style.backgroundColor="#4d90fe";n.style.backgroundImage="none";n.className="geBtn gePrimaryBtn";g.appendChild(n);mxEvent.addListener(h,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),g,b,d,c,e,!0,!0);this.window.destroyOnClose=!1; +this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(h.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)):l.container.focus()}))},AuthDialog=function(a,b,d,c){var e=document.createElement("div");e.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding= +"0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("authorizationRequired"));var k="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";b==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):b==a.dropbox?(k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):b==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"): +b==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):b==a.trello&&(k=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var m=document.createElement("input");m.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){c(m.checked)});k.insertBefore(l,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";e.appendChild(f);e.appendChild(a); +e.appendChild(k);d&&(d=document.createElement("p"),d.style.marginTop="20px",d.appendChild(m),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),d.appendChild(f),e.appendChild(d),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,b,d){d=null!=d?d:a.sidebar.entries;var c=document.createElement("div");if(b){b=document.createElement("div");b.className="geDialogTitle"; mxUtils.write(b,mxResources.get("shapes"));b.style.position="absolute";b.style.top="0px";b.style.left="0px";b.style.lineHeight="40px";b.style.height="40px";b.style.right="0px";mxClient.IS_QUIRKS&&(b.style.width="718px");var e=document.createElement("div"),f=document.createElement("div");e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";mxClient.IS_QUIRKS&&(e.style.height="437px",e.style.marginTop="1px");f.style.position= -"absolute";f.style.left="202px";f.style.right="0px";f.style.top="40px";f.style.bottom="60px";f.style.overflow="auto";f.style.borderLeft="1px solid rgb(211, 211, 211)";f.style.textAlign="center";mxClient.IS_QUIRKS&&(f.style.width=parseInt(b.style.width)-202+"px",f.style.height=e.style.height,f.style.marginTop=e.style.marginTop);var h=null,l=[],m=document.createElement("div");m.style.position="relative";m.style.left="0px";m.style.right="0px";for(var g=0;g<d.length;g++)(function(b){var c=m.cloneNode(!1); -c.style.fontWeight="bold";c.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);e.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=m.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.checked=a.sidebar.isEntryVisible(b.id);k.defaultChecked=k.checked;c.appendChild(k);mxUtils.write(c," "+b.title);e.appendChild(c);var n= -function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=b.imageCallback?b.imageCallback(f):null!=b.image?f.innerHTML='<img border="0" src="'+b.image+'"/>':(f.innerHTML="<br>",mxUtils.write(f,mxResources.get("noPreview"))),null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});l.push(function(){return k.checked? -b.id:null});0==g&&0==d&&n()})(b.entries[d])})(d[g]);c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var k=document.createElement("input");k.setAttribute("type", -"checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=document.createElement("span"),b.style.paddingRight="20px",b.appendChild(k),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=k&&(k.checked=!k.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className= -"geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),k.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),t=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var p=document.createElement("tr");q.style.width="100%";b=document.createElement("td");var n=document.createElement("td"),v=document.createElement("td"), -z=mxUtils.bind(this,function(b,c,d){var g=document.createElement("input");g.type="checkbox";q.appendChild(g);g.checked=a.sidebar.isEntryVisible(d);var k=document.createElement("span");mxUtils.write(k,c);c=document.createElement("div");c.style.display="block";c.appendChild(g);c.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return g.checked?d:null}});p.appendChild(b);p.appendChild(n);p.appendChild(v);t.appendChild(p); -q.appendChild(t);for(var l=[],y=0,g=0;g<d.length;g++)for(t=0;t<d[g].entries.length;t++)y++;for(var u=[b,n,v],w=0,g=0;g<d.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];l.push(z(u[Math.floor(w/(y/3))],c.title,c.id));w++}})(d[g]);c.appendChild(q);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";k=document.createElement("input");isLocalStorage&&(k.setAttribute("type","checkbox"),k.checked=!0,k.defaultChecked=!0,d.appendChild(k),b=document.createElement("span"), -mxUtils.write(b," "+mxResources.get("rememberThisSetting")),d.appendChild(b),mxEvent.addListener(b,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)}));c.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",k.checked);a.hideDialog()});n.className= -"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(n)):(d.appendChild(n),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==e.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var d=0;d<e.length;d++){var k=document.createElement("span");k.style.whiteSpace="nowrap";var n=document.createElement("span");n.className="geSprite geSprite-delete"; -n.style.position="relative";n.style.cursor="pointer";n.style.top="5px";n.style.marginRight="4px";n.style.display="inline-block";k.appendChild(n);mxUtils.write(k,e[d]);c.appendChild(k);mxUtils.br(c);mxEvent.addListener(n,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+e[c]+'"?',function(){e.splice(c,1);b()})}}(d))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var e=mxSettings.getPlugins().slice(); +"absolute";f.style.left="202px";f.style.right="0px";f.style.top="40px";f.style.bottom="60px";f.style.overflow="auto";f.style.borderLeft="1px solid rgb(211, 211, 211)";f.style.textAlign="center";mxClient.IS_QUIRKS&&(f.style.width=parseInt(b.style.width)-202+"px",f.style.height=e.style.height,f.style.marginTop=e.style.marginTop);var k=null,l=[],m=document.createElement("div");m.style.position="relative";m.style.left="0px";m.style.right="0px";for(var g=0;g<d.length;g++)(function(b){var c=m.cloneNode(!1); +c.style.fontWeight="bold";c.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);e.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=m.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.checked=a.sidebar.isEntryVisible(b.id);h.defaultChecked=h.checked;c.appendChild(h);mxUtils.write(c," "+b.title);e.appendChild(c);var n= +function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=b.imageCallback?b.imageCallback(f):null!=b.image?f.innerHTML='<img border="0" src="'+b.image+'"/>':(f.innerHTML="<br>",mxUtils.write(f,mxResources.get("noPreview"))),null!=k&&(k.style.backgroundColor=""),k=c,k.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){h.checked=!h.checked;mxEvent.consume(a)});l.push(function(){return h.checked? +b.id:null});0==g&&0==d&&n()})(b.entries[d])})(d[g]);c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var h=document.createElement("input");h.setAttribute("type", +"checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=document.createElement("span"),b.style.paddingRight="20px",b.appendChild(h),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),h.checked=!0,h.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=h&&(h.checked=!h.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className= +"geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),h.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),t=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var p=document.createElement("tr");q.style.width="100%";b=document.createElement("td");var n=document.createElement("td"),v=document.createElement("td"), +y=mxUtils.bind(this,function(b,c,d){var g=document.createElement("input");g.type="checkbox";q.appendChild(g);g.checked=a.sidebar.isEntryVisible(d);var h=document.createElement("span");mxUtils.write(h,c);c=document.createElement("div");c.style.display="block";c.appendChild(g);c.appendChild(h);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return g.checked?d:null}});p.appendChild(b);p.appendChild(n);p.appendChild(v);t.appendChild(p); +q.appendChild(t);for(var l=[],z=0,g=0;g<d.length;g++)for(t=0;t<d[g].entries.length;t++)z++;for(var u=[b,n,v],w=0,g=0;g<d.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];l.push(y(u[Math.floor(w/(z/3))],c.title,c.id));w++}})(d[g]);c.appendChild(q);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";h=document.createElement("input");isLocalStorage&&(h.setAttribute("type","checkbox"),h.checked=!0,h.defaultChecked=!0,d.appendChild(h),b=document.createElement("span"), +mxUtils.write(b," "+mxResources.get("rememberThisSetting")),d.appendChild(b),mxEvent.addListener(b,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)}));c.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",h.checked);a.hideDialog()});n.className= +"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(n)):(d.appendChild(n),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==e.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var d=0;d<e.length;d++){var h=document.createElement("span");h.style.whiteSpace="nowrap";var n=document.createElement("span");n.className="geSprite geSprite-delete"; +n.style.position="relative";n.style.cursor="pointer";n.style.top="5px";n.style.marginRight="4px";n.style.display="inline-block";h.appendChild(n);mxUtils.write(h,e[d]);c.appendChild(h);mxUtils.br(c);mxEvent.addListener(n,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+e[c]+'"?',function(){e.splice(c,1);b()})}}(d))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var e=mxSettings.getPlugins().slice(); d.appendChild(c);b();var f=mxUtils.button(mxResources.get("add"),function(){var c="",d=urlParams.p;if(null!=d&&0<d.length){for(var n=d.split(";"),d=0;d<n.length;d++){var f=App.pluginRegistry[n[d]];null!=f&&(c+=f+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){n=a.split(";");for(a=0;a<n.length;a++)0<n[a].length&&0>mxUtils.indexOf(e,n[a])&&e.push(n[a]);b()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+ -")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=document.createElement("div");m.style.marginTop="14px";m.style.textAlign="right";a.editor.cancelFirst?(m.appendChild(h),m.appendChild(f), -m.appendChild(l)):(m.appendChild(f),m.appendChild(l),m.appendChild(h));d.appendChild(m);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),h=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");h.appendChild(l);f.appendChild(h);var h=document.createElement("tr"),m=document.createElement("td"), -g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";this.init=function(){k.focus();k.select()};g.appendChild(k);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type", -"text");n.style.width="100px";n.value="0";g.appendChild(n);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";g.appendChild(q);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td"); -mxUtils.write(m,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";g.appendChild(t);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");h.appendChild(m);var p=document.createElement("input");p.setAttribute("type","checkbox");g.appendChild(p);h.appendChild(g);f.appendChild(h);e.appendChild(f); -c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,z=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),g=v.width,e=v.height,f=parseInt(k.value),h=parseInt(n.value),g=Math.max(1,g-f-parseInt(q.value)),e=Math.max(1,e-h-parseInt(t.value));b.width=g;b.height=e;p.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation= -"source-in");c.drawImage(v,f,h,g,e,0,0,g,e);d(b.toDataURL())});z.setAttribute("disabled","disabled");v.onload=function(){z.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+": "+v.height)};v.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&z.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(z)):(b.appendChild(z), -b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),f=document.createElement("table"),h=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px"; -k.value=null!=c?c.x:"";this.init=function(){k.focus();k.select()};g.appendChild(k);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";g.appendChild(n);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td"); -g=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.width:"";g.appendChild(q);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!= -c?c.height:"";g.appendChild(t);l.appendChild(m);l.appendChild(g);h.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(p);l.appendChild(m);l.appendChild(g);h.appendChild(l);f.appendChild(h);e.appendChild(f); -var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var g=d.getCellGeometry(b[c]);null!=g&&(g=g.clone(),d.isCellMovable(b[c])&&(0<mxUtils.trim(k.value).length&&(g.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(g.y=Number(n.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(q.value).length&&(g.width=Number(q.value)),0<mxUtils.trim(t.value).length&& +")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=document.createElement("div");m.style.marginTop="14px";m.style.textAlign="right";a.editor.cancelFirst?(m.appendChild(k),m.appendChild(f), +m.appendChild(l)):(m.appendChild(f),m.appendChild(l),m.appendChild(k));d.appendChild(m);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");k.appendChild(l);f.appendChild(k);var k=document.createElement("tr"),m=document.createElement("td"), +g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";this.init=function(){h.focus();h.select()};g.appendChild(h);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type", +"text");n.style.width="100px";n.value="0";g.appendChild(n);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";g.appendChild(q);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td"); +mxUtils.write(m,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";g.appendChild(t);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");k.appendChild(m);var p=document.createElement("input");p.setAttribute("type","checkbox");g.appendChild(p);k.appendChild(g);f.appendChild(k);e.appendChild(f); +c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),g=v.width,e=v.height,f=parseInt(h.value),k=parseInt(n.value),g=Math.max(1,g-f-parseInt(q.value)),e=Math.max(1,e-k-parseInt(t.value));b.width=g;b.height=e;p.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation= +"source-in");c.drawImage(v,f,k,g,e,0,0,g,e);d(b.toDataURL())});y.setAttribute("disabled","disabled");v.onload=function(){y.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+": "+v.height)};v.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&y.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(y)):(b.appendChild(y), +b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),f=document.createElement("table"),k=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px"; +h.value=null!=c?c.x:"";this.init=function(){h.focus();h.select()};g.appendChild(h);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";g.appendChild(n);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td"); +g=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.width:"";g.appendChild(q);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!= +c?c.height:"";g.appendChild(t);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(p);l.appendChild(m);l.appendChild(g);k.appendChild(l);f.appendChild(k);e.appendChild(f); +var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var g=d.getCellGeometry(b[c]);null!=g&&(g=g.clone(),d.isCellMovable(b[c])&&(0<mxUtils.trim(h.value).length&&(g.x=Number(h.value)),0<mxUtils.trim(n.value).length&&(g.y=Number(n.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(q.value).length&&(g.width=Number(q.value)),0<mxUtils.trim(t.value).length&& (g.height=Number(t.value))),d.getModel().setGeometry(b[c],g));0<mxUtils.trim(p.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(p.value),[b[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&v.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(c),f.appendChild(v)):(f.appendChild(v),f.appendChild(c));e.appendChild(f);this.container=e},LibraryDialog=function(a, -b,d,c,e,f){function h(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var b=null;if(null!=a)for(var c=t.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function l(b,c,d,g,e,n,f,q,m){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=f||null==v[b]){var y=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=E.title&&0<E.title.length?E.title:mxResources.get("untitled")); +b,d,c,e,f){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var b=null;if(null!=a)for(var c=t.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function l(b,c,d,g,e,n,f,q,m){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=f||null==v[b]){var z=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=E.title&&0<E.title.length?E.title:mxResources.get("untitled")); D.style.color=null==E.title||0==E.title.length?"#d0d0d0":""};t.style.backgroundImage="";p.style.display="none";var A=e,C=n;if(e>a.maxImageSize||n>a.maxImageSize){var B=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=B;n*=B}A>C?(C=Math.round(100*C/A),A=100):(A=Math.round(100*A/C),C=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move"; mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=b){var I=document.createElement("img");I.setAttribute("src",w.convert(b));I.style.width=A+"px";I.style.height=C+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-C)/2)+"px";I.style.paddingLeft=Math.floor((100-A)/2)+"px";F.appendChild(I)}else if(null!=f){var K=a.stringToCells(a.editor.graph.decompress(f.xml));0<K.length&&(a.sidebar.createThumb(K,100,100,F,null,!0,!1),F.firstChild.style.display=mxClient.IS_QUIRKS? "inline":"inline-block",F.firstChild.style.cursor="")}var H=document.createElement("img");H.setAttribute("src",Editor.closeImage);H.setAttribute("border","0");H.setAttribute("title",mxResources.get("delete"));H.setAttribute("align","top");H.style.paddingTop="4px";H.style.marginLeft="-22px";H.style.cursor="pointer";mxEvent.addListener(H,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=f&&(H.style.position="relative");(function(a,b,c){mxEvent.addListener(H,"click",function(d){v[b]=null;for(var g= -0;g<k.length;g++)if(null!=k[g].data&&k[g].data==b||null!=k[g].xml&&null!=c&&k[g].xml==c.xml){k.splice(g,1);break}F.parentNode.removeChild(a);0==k.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(d)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(F,b,f);F.appendChild(H);F.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left= -"10px";D.style.right="10px";D.style.backgroundColor="#ffffff";D.style.overflow="hidden";D.style.textAlign="center";var E=null;null!=b?(E={data:b,w:e,h:n,title:m},null!=q&&(E.aspect=q),v[b]=I,k.push(E)):null!=f&&(f.aspect="fixed",k.push(f),E=f);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=u&&(u(),u=null,mxEvent.consume(a))});y();F.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(b){if(mxClient.IS_IOS|| -mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,E.title||"",mxResources.get("ok"),function(a){null!=a&&(E.title=a,y())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=D.getAttribute("contentEditable")){null!=u&&(u(),u=null);if(null==E.title||0==E.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable", -"true");D.focus();document.execCommand("selectAll",!1,null);u=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";E.title=D.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",K);mxEvent.addListener(F,"dblclick",K);t.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==b&&null!=f&&(H.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=f.xml&&a.dataTransfer.setData("Text",f.xml);z=h(a);mxClient.IS_GC&&(F.style.opacity="0.9"); -window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);H.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",D.style.visibility="");z=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else x||(x=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),A=mxUtils.parseXml(b),"mxlibrary"== +0;g<h.length;g++)if(null!=h[g].data&&h[g].data==b||null!=h[g].xml&&null!=c&&h[g].xml==c.xml){h.splice(g,1);break}F.parentNode.removeChild(a);0==h.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(d)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(F,b,f);F.appendChild(H);F.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left= +"10px";D.style.right="10px";D.style.backgroundColor="#ffffff";D.style.overflow="hidden";D.style.textAlign="center";var E=null;null!=b?(E={data:b,w:e,h:n,title:m},null!=q&&(E.aspect=q),v[b]=I,h.push(E)):null!=f&&(f.aspect="fixed",h.push(f),E=f);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=u&&(u(),u=null,mxEvent.consume(a))});z();F.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(b){if(mxClient.IS_IOS|| +mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,E.title||"",mxResources.get("ok"),function(a){null!=a&&(E.title=a,z())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=D.getAttribute("contentEditable")){null!=u&&(u(),u=null);if(null==E.title||0==E.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable", +"true");D.focus();document.execCommand("selectAll",!1,null);u=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";E.title=D.innerHTML;z()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",K);mxEvent.addListener(F,"dblclick",K);t.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==b&&null!=f&&(H.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=f.xml&&a.dataTransfer.setData("Text",f.xml);y=k(a);mxClient.IS_GC&&(F.style.opacity="0.9"); +window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);H.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",D.style.visibility="");y=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else x||(x=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),A=mxUtils.parseXml(b),"mxlibrary"== A.documentElement.nodeName){C=JSON.parse(mxUtils.getTextContent(A.documentElement));if(null!=C&&0<C.length)for(var G=0;G<C.length;G++)null!=C[G].xml?l(null,null,0,0,0,0,C[G]):l(C[G].data,null,0,0,C[G].w,C[G].h,null,"fixed",C[G].title);e=!0}else if("mxfile"==A.documentElement.nodeName){for(var P=A.documentElement.getElementsByTagName("diagram"),G=0;G<P.length;G++){var C=mxUtils.getTextContent(P[G]),K=a.stringToCells(a.editor.graph.decompress(C)),R=a.editor.graph.getBoundingBoxFromGeometry(K);l(null, -null,0,0,0,0,{xml:C,w:R.width,h:R.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function m(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function g(b){b.stopPropagation();b.preventDefault();x=!1;y=h(b);if(null!=z)null!=y&&y<t.children.length?(k.splice(y>z?y-1:y,0,k.splice(z,1)[0]),t.insertBefore(t.children[z],t.children[y])):(k.push(k.splice(z,1)[0]),t.appendChild(t.children[z])); -else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,A(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){l(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var k=[];d=document.createElement("div"); +null,0,0,0,0,{xml:C,w:R.width,h:R.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function m(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function g(b){b.stopPropagation();b.preventDefault();x=!1;z=k(b);if(null!=y)null!=z&&z<t.children.length?(h.splice(z>y?z-1:z,0,h.splice(y,1)[0]),t.insertBefore(t.children[y],t.children[z])):(h.push(h.splice(y,1)[0]),t.appendChild(t.children[y])); +else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,A(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){l(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var h=[];d=document.createElement("div"); d.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";d.appendChild(n);mxUtils.write(n,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",b);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==e||e.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF|| -5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};n.appendChild(q);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p= -document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));d.appendChild(p);var v={},z=null,y=null,u=null;b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=u&&(u(),u=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",b);mxEvent.addListener(t,"pointerdown",b);mxEvent.addListener(t,"touchstart", -b);var w=new mxUrlConverter,x=!1;if(null!=c)for(b=0;b<c.length;b++)n=c[b],l(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(t,"dragleave",function(a){p.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==p){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var A=function(b){return function(c,d,g,k,e,n,f,u,h){null!=h&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,h.name)?a.parseFile(h,mxUtils.bind(this,function(c){4==c.readyState&& -(a.spinner.stop(),200<=c.status&&299>=c.status&&(l(c.responseText,d,g,k,e,n,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(l(c,d,g,k,e,n,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",m);mxEvent.addListener(t,"drop",g);mxEvent.addListener(p,"dragover",m);mxEvent.addListener(p,"drop",g);d.appendChild(t);c=document.createElement("div"); -c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k),c=q.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document, -"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B,"change",function(b){x=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,c,d,g,k,e,n,f,u){A(b)(a,c,d,g,k,e,n,f,u);B.value=""});t.scrollTop=t.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=u&&(u(),u=null);B.click()}),n.setAttribute("id", -"btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=u&&(u(),u=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){x=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}l(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,c,d,g){a.saveLibrary(b, -c,d,g)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=u&&(u(),u=null);this.saveBtnClickHandler(q.value,k,e,f)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n);a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=function(a,b,d,c,e){c=null!=c?c:300;e=null!=e?e:120;var f,h,l=document.createElement("table"),m=document.createElement("tbody");l.style.cellPadding="4px";f=document.createElement("tr");h= -document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";mxUtils.write(h,d);f.appendChild(h);m.appendChild(f);f=document.createElement("tr");h=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=c-200+"px";g.style.height=e+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};h.appendChild(g);f.appendChild(h);h=document.createElement("td");d=document.createElement("div");d.style.position= -"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=e+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);h.appendChild(d);var k=new Graph(d);k.setEnabled(!1);var n=a.editor.graph.cloneCells([b])[0];k.addCells([n]);d=k.view.getState(n);var q="";null!=d.shape&&null!=d.shape.stencil&&(q=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(g,q||"");d=k.getGraphBounds();e=Math.min(160/d.width,(e-40)/d.height);k.view.scaleAndTranslate(e, -20/e-d.x,20/e-d.y);f.appendChild(h);m.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.setAttribute("colspan","2");h.style.paddingTop="2px";h.style.whiteSpace="nowrap";h.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&h.appendChild(e);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}), -d.className="geBtn",h.appendChild(d));var t=function(b,c,d){var k=g.value,e=mxUtils.parseXml(k),k=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),e=!b.model.contains(c),!d||e||k!=q){k=a.editor.graph.compress(k);b.getModel().beginUpdate();try{if(e){var n=a.editor.graph.getInsertPoint();c.geometry.x=n.x; -c.geometry.y=n.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+k+")",[c])}catch(x){throw x;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){t(k,n,!1)});d.className="geBtn";h.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";h.appendChild(d);a.editor.cancelFirst||h.appendChild(e);f.appendChild(h);m.appendChild(f);l.appendChild(m);this.container= -l},CustomDialog=function(a,b,d,c,e,f,h){var l=document.createElement("div");l.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="right";null!=h&&b.appendChild(h);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});h.className="geBtn";a.editor.cancelFirst&&b.appendChild(h);if(!a.isOffline()&&null!=f){var m=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)});m.className="geBtn";b.appendChild(m)}e=mxUtils.button(e|| -mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});b.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(h);l.appendChild(b);this.cancelBtn=h;this.okButton=e;this.container=l};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC": +5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};n.appendChild(q);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==h.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p= +document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));d.appendChild(p);var v={},y=null,z=null,u=null;b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=u&&(u(),u=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",b);mxEvent.addListener(t,"pointerdown",b);mxEvent.addListener(t,"touchstart", +b);var w=new mxUrlConverter,x=!1;if(null!=c)for(b=0;b<c.length;b++)n=c[b],l(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(t,"dragleave",function(a){p.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==p){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var A=function(b){return function(c,d,g,h,e,n,f,u,k){null!=k&&(/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name))?a.importVisio(k,mxUtils.bind(this,function(c){a.spinner.stop();l(c,d,g, +h,e,n,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," "))})):null!=k&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,k.name)?a.parseFile(k,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(l(c.responseText,d,g,h,e,n,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(l(c,d,g,h,e,n,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0, +f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",m);mxEvent.addListener(t,"drop",g);mxEvent.addListener(p,"dragover",m);mxEvent.addListener(p,"drop",g);d.appendChild(t);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("export"), +function(){var b=a.createLibraryDataFromImages(h),c=q.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B, +"change",function(b){x=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,c,d,g,h,e,n,f,u){A(b)(a,c,d,g,h,e,n,f,u);B.value=""});t.scrollTop=t.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=u&&(u(),u=null);B.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=u&&(u(),u=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){x=!1;if(null!=a){if("data:image/"== +a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}l(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,c,d,g){a.saveLibrary(b,c,d,g)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=u&&(u(),u=null);this.saveBtnClickHandler(q.value,h,e,f)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n); +a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=function(a,b,d,c,e){c=null!=c?c:300;e=null!=e?e:120;var f,k,l=document.createElement("table"),m=document.createElement("tbody");l.style.cellPadding="4px";f=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,d);f.appendChild(k);m.appendChild(f);f=document.createElement("tr");k=document.createElement("td");var g=document.createElement("textarea"); +g.style.outline="none";g.style.resize="none";g.style.width=c-200+"px";g.style.height=e+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};k.appendChild(g);f.appendChild(k);k=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=e+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);k.appendChild(d);var h=new Graph(d);h.setEnabled(!1); +var n=a.editor.graph.cloneCells([b])[0];h.addCells([n]);d=h.view.getState(n);var q="";null!=d.shape&&null!=d.shape.stencil&&(q=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(g,q||"");d=h.getGraphBounds();e=Math.min(160/d.width,(e-40)/d.height);h.view.scaleAndTranslate(e,20/e-d.x,20/e-d.y);f.appendChild(k);m.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align", +"right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&k.appendChild(e);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),d.className="geBtn",k.appendChild(d));var t=function(b,c,d){var h=g.value,e=mxUtils.parseXml(h),h=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"), +mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),e=!b.model.contains(c),!d||e||h!=q){h=a.editor.graph.compress(h);b.getModel().beginUpdate();try{if(e){var n=a.editor.graph.getInsertPoint();c.geometry.x=n.x;c.geometry.y=n.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+h+")",[c])}catch(x){throw x;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){t(h,n,!1)});d.className="geBtn"; +k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";k.appendChild(d);a.editor.cancelFirst||k.appendChild(e);f.appendChild(k);m.appendChild(f);l.appendChild(m);this.container=l},CustomDialog=function(a,b,d,c,e,f,k){var l=document.createElement("div");l.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="right";null!=k&&b.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(); +null!=c&&c()});k.className="geBtn";a.editor.cancelFirst&&b.appendChild(k);if(!a.isOffline()&&null!=f){var m=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)});m.className="geBtn";b.appendChild(m)}e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});b.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(k);l.appendChild(b);this.cancelBtn=k;this.okButton=e;this.container=l};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC": IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=": IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==": IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=": @@ -6610,17 +6610,17 @@ messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var g= document.createElement("script");g.type="text/javascript";g.src=a;d[0].parentNode.appendChild(g)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g, function(a,c,d,g){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==d?b.push(d.replace(/\\"/g,'"')):void 0!==g&&b.push(g);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); -mxSettings.save()}}if(null!=window.StyleFormatPanel){var h=Format.prototype.init;Format.prototype.init=function(){h.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this, +mxSettings.save()}}if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this, arguments);if(mxClient.IS_SVG){var b=this.editorUi,c=b.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var d=new ChangePageSetup(b);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;c.model.execute(d)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}))}return a};var g=DiagramFormatPanel.prototype.addOptions; DiagramFormatPanel.prototype.addOptions=function(a){a=g.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a}; StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"}, -{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var k=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&& -this.container.appendChild(this.addStyles(this.createPanel()));k.apply(this,arguments)};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b); +{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var h=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&& +this.container.appendChild(this.addStyles(this.createPanel()));h.apply(this,arguments)};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b); b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c= -d.getSelectionCells();for(b=0;b<c.length;b++){for(var g=d.getModel().getStyle(c[b]),e=0;e<k.length;e++)g=mxUtils.removeStylename(g,k[e]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR, +d.getSelectionCells();for(b=0;b<c.length;b++){for(var g=d.getModel().getStyle(c[b]),e=0;e<h.length;e++)g=mxUtils.removeStylename(g,h[e]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR, null));d.getModel().setStyle(c[b],g)}}finally{d.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor= a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");g.appendChild(b)}g.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(g),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight= -"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);var h="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var n=document.createElement("div");n.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; 1<this.defaultColorSchemes.length&&(a.appendChild(e),a.appendChild(n));mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(e);c(n);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&& (c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,g=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this, @@ -6630,10 +6630,10 @@ function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("ti this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a, b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};var t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){t.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a, b,c){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,b,d,!1);g.highlight(a);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition","all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1; -var d=a.ownerDocument,g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");g.setAttribute("id",this.shadowId);var k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset"); -k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"): -d.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");g.appendChild(k);k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");g.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"), -null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=k[0];d.appendChild(g);c||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", +var d=a.ownerDocument,g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");g.setAttribute("id",this.shadowId);var h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");h.setAttribute("in","SourceAlpha");h.setAttribute("stdDeviation",this.svgShadowBlur);h.setAttribute("result","blur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset"); +h.setAttribute("in","blur");h.setAttribute("dx",this.svgShadowSize);h.setAttribute("dy",this.svgShadowSize);h.setAttribute("result","offsetBlur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");h.setAttribute("flood-color",this.svgShadowColor);h.setAttribute("flood-opacity",this.svgShadowOpacity);h.setAttribute("result","offsetColor");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"): +d.createElement("feComposite");h.setAttribute("in","offsetColor");h.setAttribute("in2","offsetBlur");h.setAttribute("operator","in");h.setAttribute("result","offsetBlur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");h.setAttribute("in","SourceGraphic");h.setAttribute("in2","offsetBlur");g.appendChild(h);h=a.getElementsByTagName("defs");0==h.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"), +null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=h[0];d.appendChild(g);c||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", "url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,c=0;do b=this.model.getChildAt(this.model.root,c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"]; mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5= [STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/transmission"]= @@ -6641,298 +6641,298 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist [SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap= [SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js", STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors= -[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var p=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,g,k,e,n,f,h){if(null!=c&&null==mxMarker.markers[c]){var u=this.getPackageForType(c);null!=u&&mxStencilRegistry.getStencil(u)}return p.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){t.value=Math.max(1, -Math.min(n,Math.max(parseInt(t.value),parseInt(p.value))));p.value=Math.max(1,Math.min(n,Math.min(parseInt(t.value),parseInt(p.value))))}function d(b){function c(b,c,g){var k=b.getGraphBounds(),e=0,n=0,f=Z.get(),u=1/b.pageScale,h=y.checked;if(h)var u=parseInt(U.value),q=parseInt(R.value),u=Math.min(f.height*q/(k.height/b.view.scale),f.width*u/(k.width/b.view.scale));else u=parseInt(z.value)/(100*b.pageScale),isNaN(u)&&(d=1/b.pageScale,z.value="100 %");f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width* -d);f.height=Math.ceil(f.height*d);u*=d;!h&&b.pageVisible?(k=b.getPageLayout(),e-=k.x*f.width,n-=k.y*f.height):h=!0;if(null==c){c=PrintDialog.createPrintPreview(b,u,f,0,e,n,h);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var l=c.writeHead;c.writeHead=function(b){l.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var p=c.renderPage;c.renderPage= -function(a,b,c,d,g,k){var e=p.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=h;c.appendGraph(b,u,e,n,g,!0)}return c}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,W.value="100 %");var d=.75*d,k=p.value,e=t.value,n=!q.checked,u=null;n&&(n=k==f&&e==f);if(!n&&null!=a.pages&&a.pages.length){var h=0,n=a.pages.length-1;q.checked|| -(h=parseInt(k)-1,n=parseInt(e)-1);for(var l=h;l<=n;l++){var m=a.pages[l],k=m==a.currentPage?g:null;if(null==k){var k=a.createTemporaryGraph(g.getStylesheet()),e=!0,h=!1,w=null,v=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(e=m.viewState.pageVisible,h=m.viewState.mathEnabled,w=m.viewState.background,v=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(h="0"!=m.mapping.diagramMap.get("mathEnabled"),w=m.mapping.diagramMap.get("background"), -v=m.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);k.background=w;k.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height):null;k.pageVisible=e;k.mathEnabled=h;var C=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?l+1:C.apply(this,arguments)};document.body.appendChild(k.container);a.updatePageRoot(m);k.model.setRoot(m.root)}u=c(k,u,l!=n);k!=g&&k.container.parentNode.removeChild(k.container)}}else u=c(g);u.mathEnabled&& +[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var p=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,g,h,e,n,f,k){if(null!=c&&null==mxMarker.markers[c]){var u=this.getPackageForType(c);null!=u&&mxStencilRegistry.getStencil(u)}return p.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){p.value=Math.max(1, +Math.min(n,Math.max(parseInt(p.value),parseInt(t.value))));t.value=Math.max(1,Math.min(n,Math.min(parseInt(p.value),parseInt(t.value))))}function d(b){function c(b,c,g){var h=b.getGraphBounds(),e=0,n=0,f=Z.get(),u=1/b.pageScale,k=z.checked;if(k)var u=parseInt(U.value),q=parseInt(R.value),u=Math.min(f.height*q/(h.height/b.view.scale),f.width*u/(h.width/b.view.scale));else u=parseInt(y.value)/(100*b.pageScale),isNaN(u)&&(d=1/b.pageScale,y.value="100 %");f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width* +d);f.height=Math.ceil(f.height*d);u*=d;!k&&b.pageVisible?(h=b.getPageLayout(),e-=h.x*f.width,n-=h.y*f.height):k=!0;if(null==c){c=PrintDialog.createPrintPreview(b,u,f,0,e,n,k);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var l=c.writeHead;c.writeHead=function(b){l.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var t=c.renderPage;c.renderPage= +function(a,b,c,d,g,h){var e=t.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=k;c.appendGraph(b,u,e,n,g,!0)}return c}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,W.value="100 %");var d=.75*d,h=t.value,e=p.value,n=!q.checked,u=null;n&&(n=h==f&&e==f);if(!n&&null!=a.pages&&a.pages.length){var k=0,n=a.pages.length-1;q.checked|| +(k=parseInt(h)-1,n=parseInt(e)-1);for(var l=k;l<=n;l++){var m=a.pages[l],h=m==a.currentPage?g:null;if(null==h){var h=a.createTemporaryGraph(g.getStylesheet()),e=!0,k=!1,w=null,v=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(e=m.viewState.pageVisible,k=m.viewState.mathEnabled,w=m.viewState.background,v=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(k="0"!=m.mapping.diagramMap.get("mathEnabled"),w=m.mapping.diagramMap.get("background"), +v=m.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);h.background=w;h.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height):null;h.pageVisible=e;h.mathEnabled=k;var C=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?l+1:C.apply(this,arguments)};document.body.appendChild(h.container);a.updatePageRoot(m);h.model.setRoot(m.root)}u=c(h,u,l!=n);h!=g&&h.container.parentNode.removeChild(h.container)}}else u=c(g);u.mathEnabled&& (n=u.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"), -n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),b&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));u.closeDocument();!u.mathEnabled&&b&&PrintDialog.printPreview(u)}var g=a.editor.graph,k=document.createElement("div"),e=document.createElement("h3"); -e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,b||mxResources.get("print"));k.appendChild(e);var n=1,f=1,h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");h.appendChild(q);e=document.createElement("span"); -mxUtils.write(e,mxResources.get("printAllPages"));h.appendChild(e);mxUtils.br(h);var l=q.cloneNode(!0);q.setAttribute("checked","checked");l.setAttribute("value","range");h.appendChild(l);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");h.appendChild(e);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.style.width="50px";h.appendChild(p);e=document.createElement("span"); -mxUtils.write(e,mxResources.get("to"));h.appendChild(e);var t=p.cloneNode(!0);h.appendChild(t);mxEvent.addListener(p,"focus",function(){l.checked=!0});mxEvent.addListener(t,"focus",function(){l.checked=!0});mxEvent.addListener(p,"change",c);mxEvent.addListener(t,"change",c);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){f=e+1;p.value=f;t.value=f;break}p.setAttribute("max",n);t.setAttribute("max",n);1<n&&k.appendChild(h);var m=document.createElement("div"); -m.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");m.appendChild(v);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));m.appendChild(e);var z=document.createElement("input");z.style.cssText="margin:0 8px 0 8px;";z.setAttribute("value","100 %");z.style.width="50px";m.appendChild(z);mxEvent.addListener(z,"focus",function(){v.checked=!0}); -k.appendChild(m);var h=h.cloneNode(!1),y=v.cloneNode(!0);y.setAttribute("value","fit");v.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(y);h.appendChild(e);m=document.createElement("table");m.style.display="inline-block";var S=document.createElement("tbody"),M=document.createElement("tr"),J=M.cloneNode(!0),T=document.createElement("td"),L=T.cloneNode(!0),X=T.cloneNode(!0),N=T.cloneNode(!0), +n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),b&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));u.closeDocument();!u.mathEnabled&&b&&PrintDialog.printPreview(u)}var g=a.editor.graph,h=document.createElement("div"),e=document.createElement("h3"); +e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,b||mxResources.get("print"));h.appendChild(e);var n=1,f=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");k.appendChild(q);e=document.createElement("span"); +mxUtils.write(e,mxResources.get("printAllPages"));k.appendChild(e);mxUtils.br(k);var l=q.cloneNode(!0);q.setAttribute("checked","checked");l.setAttribute("value","range");k.appendChild(l);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");k.appendChild(e);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.style.width="50px";k.appendChild(t);e=document.createElement("span"); +mxUtils.write(e,mxResources.get("to"));k.appendChild(e);var p=t.cloneNode(!0);k.appendChild(p);mxEvent.addListener(t,"focus",function(){l.checked=!0});mxEvent.addListener(p,"focus",function(){l.checked=!0});mxEvent.addListener(t,"change",c);mxEvent.addListener(p,"change",c);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){f=e+1;t.value=f;p.value=f;break}t.setAttribute("max",n);p.setAttribute("max",n);1<n&&h.appendChild(k);var m=document.createElement("div"); +m.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");m.appendChild(v);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));m.appendChild(e);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";m.appendChild(y);mxEvent.addListener(y,"focus",function(){v.checked=!0}); +h.appendChild(m);var k=k.cloneNode(!1),z=v.cloneNode(!0);z.setAttribute("value","fit");v.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(z);k.appendChild(e);m=document.createElement("table");m.style.display="inline-block";var S=document.createElement("tbody"),M=document.createElement("tr"),J=M.cloneNode(!0),T=document.createElement("td"),L=T.cloneNode(!0),X=T.cloneNode(!0),N=T.cloneNode(!0), Y=T.cloneNode(!0),V=T.cloneNode(!0);T.style.textAlign="right";N.style.textAlign="right";mxUtils.write(T,mxResources.get("fitTo"));var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","1");U.setAttribute("min","1");U.setAttribute("type","number");U.style.width="40px";L.appendChild(U);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));X.appendChild(e);mxUtils.write(N,mxResources.get("fitToBy"));var R=U.cloneNode(!0);Y.appendChild(R); -mxEvent.addListener(U,"focus",function(){y.checked=!0});mxEvent.addListener(R,"focus",function(){y.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));V.appendChild(e);M.appendChild(T);M.appendChild(L);M.appendChild(X);J.appendChild(N);J.appendChild(Y);J.appendChild(V);S.appendChild(M);S.appendChild(J);m.appendChild(S);h.appendChild(m);k.appendChild(h);h=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom= -"12px";mxUtils.write(e,mxResources.get("paperSize"));h.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);h.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));h.appendChild(e);var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";h.appendChild(W); -k.appendChild(h);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&e.appendChild(h);a.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),m.className="geBtn",e.appendChild(m));PrintDialog.previewEnabled&&(m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog(); -d(!1)}),m.className="geBtn",e.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});m.className="geBtn gePrimaryBtn";e.appendChild(m);a.editor.cancelFirst||e.appendChild(h);k.appendChild(e);this.container=k};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background= +mxEvent.addListener(U,"focus",function(){z.checked=!0});mxEvent.addListener(R,"focus",function(){z.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));V.appendChild(e);M.appendChild(T);M.appendChild(L);M.appendChild(X);J.appendChild(N);J.appendChild(Y);J.appendChild(V);S.appendChild(M);S.appendChild(J);m.appendChild(S);k.appendChild(m);h.appendChild(k);k=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom= +"12px";mxUtils.write(e,mxResources.get("paperSize"));k.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));k.appendChild(e);var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";k.appendChild(W); +h.appendChild(k);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&e.appendChild(k);a.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),m.className="geBtn",e.appendChild(m));PrintDialog.previewEnabled&&(m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog(); +d(!1)}),m.className="geBtn",e.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});m.className="geBtn gePrimaryBtn";e.appendChild(m);a.editor.cancelFirst||e.appendChild(k);h.appendChild(e);this.container=h};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background= this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(v.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!= this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})(); -(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.0.9";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.1.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; -EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported= -!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(p){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{b= -document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(a){return window.open(a)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()}; -EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()|| -!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=d.spin;d.spin=function(c,k){var e=!1;this.active||(g.call(this,c),this.active=!0,null!=k&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color= -"white",e.style.fontFamily="Helvetica, Arial",e.style.fontSize="9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight="10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),e.innerHTML=k+"...",c.appendChild(e),d.status=e,mxClient.IS_VML&& -(null==document.documentMode||8>=document.documentMode)&&(e.style.left=Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,k)}));this.stop();return a}),e=!0);return e};var k=d.stop;d.stop=function(){k.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}}; -return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=g(a);var e=d(a,4);if(null!=b&&b(k-8,e,c))break;value=d(a,c);d(a,4);if("IEND"==e)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b= -mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("<mxfile ");if(0<=d){var g=b.lastIndexOf("</mxfile>");g>d&&(c=b.substring(d,g+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var e= -mxUtils.parseXml(b),f=this.editor.extractGraphModel(e.documentElement,null!=this.pages),c=null!=f?mxUtils.getXml(f):""}catch(v){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a, -!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var g=d.length-1;0<=g;g--){var e=this.updatePageRoot(new DiagramPage(d[g]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[g+1]));b.model.execute(new ChangePage(this,e,0==g?e:null,0))}}else"0"!= -urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)b.model.execute(new ChangePage(this,c[g],null))}finally{b.model.endUpdate()}}}; -EditorUi.prototype.createFileData=function(a,b,c,d,e,f,h,l,m,u){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var g,k=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?g="_blank":k=g=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(q);if(b.decompress(n)!=q)return q;q=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(q,n);n=a.ownerDocument.createElement("mxfile");n.appendChild(q)}u? -(n=n.cloneNode(!0),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.setAttribute("userAgent",navigator.userAgent),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!f&&!e&&(h||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,g,k);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null== -c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,l,m,k);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var g= -0;g<this.pages.length;g++){var k=this.pages[g].mapping;this.currentPage!=this.pages[g]&&null!=k&&k.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(k.graphModel),k.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[g].node,d),k.needsUpdate=!1);c.appendChild(this.pages[g].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,h,l,m){e=null!=e?e:!0;h=null!=h?h:this.getXmlFileData(e,null!= -f?f:!1);m=null!=m?m:this.getCurrentFile();f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());var g=f.getGlobalVariable,k=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(k.root)}a=this.createFileData(h,f,m,window.location.href,a,b,c,d,e,l);f!=this.editor.graph&& -f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,k="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),n=b.view.scale;f=Math.floor(g.x/n-b.view.translate.x);n=Math.floor(g.y/n-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(k="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",f);a.setAttribute("y0", -n)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': -"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=g&&g!=mxConstants.NONE?' style="background-color:'+g+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+ -"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+k+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){null!=e&&(e=e.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"}; -null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+ -mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length? -mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page|| -0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!= -a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(),k=g+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(k,a,n,"text/xml")}else if("html"== -a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(k,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=g+".png":"jpeg"==a&&(k=g+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(b,c){try{var g=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var e=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=g;return e}catch(G){this.handleError(G)}}));else{var u=null,h= -mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);var q=this.editor.graph.getSvg(l,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();h('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+ -mxUtils.getXml(a))})))}else k=g+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();h(a)}),d)}}catch(B){this.handleError(B)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var g=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var e="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};g="0";if("xmlpng"==b&&(g="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k= -0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){e="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+e+"&base64="+d+"&embedXml="+g+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear(); -this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a); -a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable? -(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(), -mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){null!=window.console&&console.log("error in fileLoaded:",a,t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!= -t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(p){}this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL: -"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,h){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this, -function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()), -".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling; -var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!= -this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,g=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding= -"8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var g=b[d],k=g.data;if(null!=k){var k=this.convertDataUri(k),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==g.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+k,g.w,g.h,"",g.title||"",!1,!1,!0))}else null!=g.xml&&(k=this.stringToCells(this.editor.graph.decompress(g.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k, -g.w,g.h,g.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var k=0;k<b.length;k++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title, -mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[k]);c=null!=c&&0<c.length?c:a.getTitle();var f=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(d);var n=f.parentNode.previousSibling;c=n.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c); -var u=document.createElement("div");u.style.position="absolute";u.style.right="0px";u.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(u.style.backgroundColor="inherit");n.style.position="relative";var h=document.createElement("img");h.setAttribute("src",Dialog.prototype.closeImage);h.setAttribute("title",mxResources.get("close"));h.setAttribute("align","top");h.setAttribute("border","0");h.className="geButton";h.style.marginRight="1px";h.style.marginTop="-1px";u.appendChild(h);var l= -null;mxEvent.addListener(h,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,B=null,H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),f,b,a,a.getMode());mxEvent.consume(c)}),D=mxUtils.bind(this,function(c){a.setModified(!0); -a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=h.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",u.insertBefore(B,u.firstChild),n.style.paddingRight=18*u.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),n.style.paddingRight=18*u.childNodes.length+ -"px")})):null==l&&(l=h.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),u.insertBefore(l,u.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(n.style.paddingRight=18*u.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(c)})),n.style.paddingRight=18*u.childNodes.length+"px")}),E= -mxUtils.bind(this,function(a,c,d,g){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var n=m.getCellGeometry(a[k]);null!=n&&n.translate(-c.x,-c.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,g||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=g&&(a.title=g);b.push(a);D(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}), -G=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),d=m.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=m.view.translate.x;c.y-=m.view.translate.y;E(b,c)}mxEvent.consume(a)});f.style.border="3px solid transparent";mxEvent.addGestureListeners(f,function(){}, -mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)",f.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&& -null!=m.panningManager&&null!=m.graphHandler&&(f.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),f.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="visible",f.style.border="3px solid transparent",f.style.cursor= -"",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})), -mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){f.style.border="3px solid transparent";f.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,n,h,u,l,m,q){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,h,u),c)],c[0].vertex= -!0,E(c,new mxRectangle(0,0,h,u),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var p=!1,w=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(k.documentElement));g(n,f);b=b.concat(n);D(a);this.spinner.stop();p=!0}catch(W){}else if("mxfile"==k.documentElement.nodeName)try{for(var h= -k.documentElement.getElementsByTagName("diagram"),k=0;k<h.length;k++){var n=mxUtils.getTextContent(h[k]),u=this.stringToCells(this.editor.graph.decompress(n)),l=this.editor.graph.getBoundingBoxFromGeometry(u);E(u,new mxRectangle(0,0,l.width,l.height),a)}p=!0}catch(W){null!=window.console&&console.log("error in drop handler:",W)}}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});!this.isOffline()&& -(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,l)&&null!=q?this.parseFile(q,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(f.style.border= -"3px solid transparent",f.style.cursor="");a.stopPropagation();a.preventDefault()}));h=h.cloneNode(!1);h.setAttribute("src",IMAGE_PATH+"/edit.gif");h.setAttribute("title",mxResources.get("edit"));u.insertBefore(h,u.firstChild);mxEvent.addListener(h,"click",H);mxEvent.addListener(f,"dblclick",function(a){mxEvent.getSource(a)==f&&H(a)});c=h.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));u.insertBefore(c,u.firstChild);mxEvent.addListener(c,"click", -G);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),u.insertBefore(c,u.firstChild))}n.appendChild(u);n.style.paddingRight=18*u.childNodes.length+"px"}};"1"==urlParams.offline|| -EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide")); -a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet","styles/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)", -Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet","styles/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme", -Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor= -"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", +EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');svrc=EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport= +!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(p){}};c.src="data:image/svg+xml;base64,"+ +btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(a){return window.open(a)}; +EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled= +function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme? +"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=d.spin;d.spin=function(c,h){var e=!1;this.active||(g.call(this,c),this.active=!0,null!=h&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",e.style.fontSize="9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight="10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top= +Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),e.innerHTML=h+"...",c.appendChild(e),d.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this, +function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,h)}));this.stop();return a}),e=!0);return e};var h=d.stop;d.stop=function(){h.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=h;h+=b;return a.substring(c,h)}function g(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<< +24)}var h=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=g(a);var e=d(a,4);if(null!=b&&b(h-8,e,c))break;value=d(a,c);d(a,4);if("IEND"==e)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml; +EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("<mxfile ");if(0<=d){var g=b.lastIndexOf("</mxfile>");g>d&&(c=b.substring(d,g+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),f=this.editor.extractGraphModel(e.documentElement,null!=this.pages),c=null!=f?mxUtils.getXml(f):""}catch(v){}return c};EditorUi.prototype.validateFileData=function(a){if(null!= +a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages|| +1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var g=d.length-1;0<=g;g--){var e=this.updatePageRoot(new DiagramPage(d[g]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[g+1]));b.model.execute(new ChangePage(this,e,0==g?e:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", +[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)b.model.execute(new ChangePage(this,c[g],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,f,k,l,m,u){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var g,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER? +g="_blank":h=g=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(q);if(b.decompress(n)!=q)return q;q=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(q,n);n=a.ownerDocument.createElement("mxfile");n.appendChild(q)}u?(n=n.cloneNode(!0),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.setAttribute("userAgent",navigator.userAgent),n.setAttribute("version", +EditorUi.VERSION),n.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!f&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,g,h);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,l,m,h);return a};EditorUi.prototype.getXmlFileData=function(a,b){a= +null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var g=0;g<this.pages.length;g++){var h=this.pages[g].mapping;this.currentPage!=this.pages[g]&&null!=h&&h.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(h.graphModel), +h.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[g].node,d),h.needsUpdate=!1);c.appendChild(this.pages[g].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,k,l,m){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=f?f:!1);m=null!=m?m:this.getCurrentFile();f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet()); +var g=f.getGlobalVariable,h=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(h.root)}a=this.createFileData(k,f,m,window.location.href,a,b,c,d,e,l);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,h="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds(): +b.getBoundingBox(b.getSelectionCells()),n=b.view.scale;f=Math.floor(g.x/n-b.view.translate.x);n=Math.floor(g.y/n-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(h="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",f);a.setAttribute("y0",n)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!= +e&&(e=e.replace(/&/g,"&"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e? +'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=g&&g!=mxConstants.NONE?' style="background-color:'+g+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+h+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+ +"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){null!=e&&(e=e.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">': +">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ +e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode= +b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", +[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty(); +var g=this.getBaseFilename(),h=g+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(h,a,n,"text/xml")}else if("html"==a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(h,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?h=g+".png":"jpeg"==a&&(h=g+".jpg"),this.saveRequest(h,a,mxUtils.bind(this, +function(b,c){try{var g=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var e=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=g;return e}catch(G){this.handleError(G)}}));else{var u=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var l=this.editor.graph.background; +l==mxConstants.NONE&&(l=null);var q=this.editor.graph.getSvg(l,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else h=g+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),d)}}catch(B){this.handleError(B)}}; +EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var g=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var e="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};g="0";if("xmlpng"==b&&(g="1",b="png",null!=this.pages&&null!=this.currentPage))for(var h=0;h<this.pages.length;h++)if(this.pages[h]==this.currentPage){e="&from="+h;break}return new mxXmlRequest(EXPORT_URL,"format="+b+e+"&base64="+d+"&embedXml="+ +g+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle(); +this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open(); +this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()): +this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){null!= +window.console&&console.log("error in fileLoaded:",a,t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(p){}this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this, +function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)): +"")}catch(n){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))}; +EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a]; +if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData()); +if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()], +d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,g=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var g=b[d],h=g.data;if(null!=h){var h= +this.convertDataUri(h),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==g.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+h,g.w,g.h,"",g.title||"",!1,!1,!0))}else null!=g.xml&&(h=this.stringToCells(this.editor.graph.decompress(g.xml)),0<h.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(h,g.w,g.h,g.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var h=0;h<b.length;h++)mxUtils.bind(this,function(a){var b= +a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b, +a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);c=null!=c&&0<c.length?c:a.getTitle();var f=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(d);var n=f.parentNode.previousSibling;c=n.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var u=document.createElement("div");u.style.position="absolute";u.style.right="0px";u.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode|| +(u.style.backgroundColor="inherit");n.style.position="relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("align","top");k.setAttribute("border","0");k.className="geButton";k.style.marginRight="1px";k.style.marginTop="-1px";u.appendChild(k);var l=null;mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)}); +null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,B=null,H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),f,b,a,a.getMode());mxEvent.consume(c)}),D=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=k.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title", +mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",u.insertBefore(B,u.firstChild),n.style.paddingRight=18*u.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),n.style.paddingRight=18*u.childNodes.length+"px")})):null==l&&(l=k.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),u.insertBefore(l,u.firstChild), +mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(n.style.paddingRight=18*u.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(c)})),n.style.paddingRight=18*u.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,c,d,g){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var h=0;h<a.length;h++){var n=m.getCellGeometry(a[h]);null!=n&& +n.translate(-c.x,-c.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,g||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=g&&(a.title=g);b.push(a);D(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),G=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"), +mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),d=m.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=m.view.translate.x;c.y-=m.view.translate.y;E(b,c)}mxEvent.consume(a)});f.style.border="3px solid transparent";mxEvent.addGestureListeners(f,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)": +f.style.border="3px dotted rgb(254, 137, 12)",f.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(f.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),f.style.cursor="default",this.sidebar.showTooltips=!0, +m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="visible",f.style.border="3px solid transparent",f.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border= +"3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){f.style.border="3px solid transparent";f.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0< +a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,h,n,k,u,l,m,q){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,u),c)],c[0].vertex=!0,E(c,new mxRectangle(0,0,k,u),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e), +e=null);else{var p=!1,t=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(h.documentElement));g(n,f);b=b.concat(n);D(a);this.spinner.stop();p=!0}catch(W){}else if("mxfile"==h.documentElement.nodeName)try{for(var k=h.documentElement.getElementsByTagName("diagram"),h=0;h<k.length;h++){var n=mxUtils.getTextContent(k[h]),u=this.stringToCells(this.editor.graph.decompress(n)),l=this.editor.graph.getBoundingBoxFromGeometry(u); +E(u,new mxRectangle(0,0,l.width,l.height),a)}p=!0}catch(W){null!=window.console&&console.log("error in drop handler:",W)}}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});null!=q&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l))?this.importVisio(q,function(a){t(a,"text/xml")}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,l)&&null!=q?this.parseFile(q, +mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?t(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(f.style.border="3px solid transparent",f.style.cursor="");a.stopPropagation();a.preventDefault()})); +k=k.cloneNode(!1);k.setAttribute("src",IMAGE_PATH+"/edit.gif");k.setAttribute("title",mxResources.get("edit"));u.insertBefore(k,u.firstChild);mxEvent.addListener(k,"click",H);mxEvent.addListener(f,"dblclick",function(a){mxEvent.getSource(a)==f&&H(a)});c=k.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));u.insertBefore(c,u.firstChild);mxEvent.addListener(c,"click",G);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"), +c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),u.insertBefore(c,u.firstChild))}n.appendChild(u);n.style.paddingRight=18*u.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth= +64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top= +"-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet","styles/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight= +41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet","styles/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor= +"#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display= "none",this.refresh())};EditorUi.prototype.showFooter=function(a){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor= !0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer"); a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!= -this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(g=mxResources.get("cancel"),k=function(){d();e.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden")); +this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(g=mxResources.get("cancel"),h=function(){d();e.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden")); else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var f=window.location.hash;null!=f&&"#G"==f.substring(0,2)&&(f=f.substring(2),a+=' <a href="https://drive.google.com/open?id='+f+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else e.code==App.ERROR_TIMEOUT?a= -mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,g,c,k)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,h){a=new ErrorDialog(this,a,b,c,d,e,f,h);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this, +mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,g,c,h)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,k){a=new ErrorDialog(this,a,b,c,d,e,f,k);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this, null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){g();null!=b&&b()},function(){g();null!=c&&c()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d}; EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,e=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(e,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS}; EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height= -"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var g=document.createElement("a"),k=!mxClient.IS_SF&&"undefined"!==typeof g.download;if(k||this.isOffline()){g.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));k?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},0),g.click(),g.parentNode.removeChild(g)}catch(z){}}else this.createEchoRequest(a, -b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),g=Array(e),k=0;k<e;++k){for(var f=1024*k,h=Math.min(f+1024,d),u=Array(h-f),l=0;f<h;++l,++f)u[l]= -c[f].charCodeAt(0);g[k]=new Uint8Array(u)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f,h){f=null!=f?f:!1;h=null!=h?h:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(f);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a, -!1)),g.document.close())}else this.openInNewWindow(a,c,d);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,d,e,g)}catch(x){this.handleError(x)}}))}catch(w){this.handleError(w)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,h,null,null,4<e?3:4,a,c,d);this.showDialog(b.container,380,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()}; +"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var g=document.createElement("a"),h=!mxClient.IS_SF&&"undefined"!==typeof g.download;if(h||this.isOffline()){g.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));h?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},0),g.click(),g.parentNode.removeChild(g)}catch(y){}}else this.createEchoRequest(a, +b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),g=Array(e),h=0;h<e;++h){for(var f=1024*h,k=Math.min(f+1024,d),u=Array(k-f),l=0;f<k;++l,++f)u[l]= +c[f].charCodeAt(0);g[h]=new Uint8Array(u)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f,k){f=null!=f?f:!1;k=null!=k?k:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(f);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a, +!1)),g.document.close())}else this.openInNewWindow(a,c,d);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,d,e,g)}catch(x){this.handleError(x)}}))}catch(w){this.handleError(w)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,k,null,null,4<e?3:4,a,c,d);this.showDialog(b.container,380,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()}; EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a, !0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div"); var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left= d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height= "auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null, this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,g){return this.createEchoRequest(c,a,d,e,b,g)}),c, -e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,f,h){h=null!=h?h:!mxClient.IS_IOS||!navigator.standalone;var g=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var g=c("_blank"==e?null:a,e==App.MODE_DEVICE||null==e||"_blank"==e?"0":"1");null!=g&&(e==App.MODE_DEVICE||"_blank"==e?g.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){f=null!=f?f:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d, +e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,f,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var g=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var g=c("_blank"==e?null:a,e==App.MODE_DEVICE||null==e||"_blank"==e?"0":"1");null!=g&&(e==App.MODE_DEVICE||"_blank"==e?g.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){f=null!=f?f:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d, a,f,!0,e,c)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),a,f,!0,e,c)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"), -!1,!1,h,null,null,4<g?3:4,d,f,e);this.showDialog(a.container,380,g==(mxClient.IS_IOS?0:1)?160:4<g?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,h,l,m){if(this.spinner.spin(document.body,mxResources.get("export"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background; -g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var k=this.editor.graph.getSvg(g,a,h,l,null,c);d&&this.editor.graph.addSvgShadow(k);var n=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b, -this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,k,!1,mxUtils.bind(this,function(){f?(null== -this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(k,q,this.thumbImageCache)):q(k)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement("input");g.style.marginRight="8px";g.style.marginTop="16px";g.setAttribute("type","checkbox");c&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d&&g.setAttribute("disabled","disabled");f&&(a.appendChild(g),mxUtils.write(a,b),e||mxUtils.br(a));return g};EditorUi.prototype.addEditButton=function(a, +!1,!1,k,null,null,4<g?3:4,d,f,e);this.showDialog(a.container,380,g==(mxClient.IS_IOS?0:1)?160:4<g?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,k,l,m){if(this.spinner.spin(document.body,mxResources.get("export"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background; +g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var h=this.editor.graph.getSvg(g,a,k,l,null,c);d&&this.editor.graph.addSvgShadow(h);var n=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b, +this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,h,!1,mxUtils.bind(this,function(){f?(null== +this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(h,q,this.thumbImageCache)):q(h)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement("input");g.style.marginRight="8px";g.style.marginTop="16px";g.setAttribute("type","checkbox");c&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d&&g.setAttribute("disabled","disabled");f&&(a.appendChild(g),mxUtils.write(a,b),e||mxUtils.br(a));return g};EditorUi.prototype.addEditButton=function(a, b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));g.appendChild(d);d=document.createElement("option"); d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");g.appendChild(d);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b|| -b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+ +b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+ Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option"); -e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;c()});mxEvent.consume(a)}));c();k.style.padding= -mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,h,l){var g=this.getCurrentFile(),k=[];d&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+ -a),null!=b&&b!=mxConstants.NONE&&k.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&k.push("edit="+encodeURIComponent(e)),f&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&k.push("page="+a);break}a=!0;null!=h?c="#U"+encodeURIComponent(h):(g=this.getCurrentFile(),l||null==g||g.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c? -this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+g.getHash(),a=!1));a&&null!=g&&null!=g.getTitle()&&g.getTitle()!=this.defaultFilename&&k.push("title="+encodeURIComponent(g.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<k.length?"?"+k.join("&"):"")+c};EditorUi.prototype.createHtml=function(a, -b,c,d,e,f,h,l,m,u,w){this.getBasenames();var g={};""!=e&&e!=mxConstants.NONE&&(g.highlight=e);"auto"!==d&&(g.target=d);m||(g.lightbox=!1);g.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(g.zoom=c/100);c=[];h&&(c.push("pages"),g.resize=!0,null!=this.pages&&null!=this.currentPage&&(g.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),g.resize=!0);l&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),g.toolbar=c.join(" "));null!=u&&0<u.length&&(g.edit=u);null!= -a?g.url=a:g.xml=this.getFileData(!0,null,null,null,null,!h);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(g))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";w(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+ -'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;"; -f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");g=f.cloneNode(!0);g.setAttribute("value","copy");k.appendChild(g);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(n);mxUtils.br(k);k.appendChild(f);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));k.appendChild(n);var h=this.getCurrentFile();null==c&&null!=h&&h.constructor==window.DriveFile&&(n= -document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href","javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),k.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(h.getId())})));g.setAttribute("checked","checked");null==c&&f.setAttribute("disabled","disabled");e.appendChild(k);var l=this.addLinkSection(e),m=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e, -":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";e.appendChild(q);var B=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(e,mxResources.get("allPages"),k,!k),D=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),G=this.addEditButton(e,E),C=G.getEditInput(); +e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;c()});mxEvent.consume(a)}));c();h.style.padding= +mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,k,l){var g=this.getCurrentFile(),h=[];d&&(h.push("lightbox=1"),"auto"!=a&&h.push("target="+ +a),null!=b&&b!=mxConstants.NONE&&h.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&h.push("edit="+encodeURIComponent(e)),f&&h.push("layers=1"),this.editor.graph.foldingEnabled&&h.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&h.push("page="+a);break}a=!0;null!=k?c="#U"+encodeURIComponent(k):(g=this.getCurrentFile(),l||null==g||g.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c? +this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+g.getHash(),a=!1));a&&null!=g&&null!=g.getTitle()&&g.getTitle()!=this.defaultFilename&&h.push("title="+encodeURIComponent(g.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<h.length?"?"+h.join("&"):"")+c};EditorUi.prototype.createHtml=function(a, +b,c,d,e,f,k,l,m,u,w){this.getBasenames();var g={};""!=e&&e!=mxConstants.NONE&&(g.highlight=e);"auto"!==d&&(g.target=d);m||(g.lightbox=!1);g.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(g.zoom=c/100);c=[];k&&(c.push("pages"),g.resize=!0,null!=this.pages&&null!=this.currentPage&&(g.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),g.resize=!0);l&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),g.toolbar=c.join(" "));null!=u&&0<u.length&&(g.edit=u);null!= +a?g.url=a:g.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(g))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";w(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+ +'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;"; +f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");g=f.cloneNode(!0);g.setAttribute("value","copy");h.appendChild(g);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(n);mxUtils.br(h);h.appendChild(f);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));h.appendChild(n);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(n= +document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href","javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),h.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));g.setAttribute("checked","checked");null==c&&f.setAttribute("disabled","disabled");e.appendChild(h);var l=this.addLinkSection(e),m=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e, +":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";e.appendChild(q);var B=this.addCheckbox(e,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(e,mxResources.get("allPages"),h,!h),D=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),G=this.addEditButton(e,E),C=G.getEditInput(); C.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&E.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(f.checked?c:null,m.checked,q.value,l.getTarget(),l.getColor(),B.checked,H.checked,D.checked,E.checked,G.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);g.focus()}; -EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var n=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=n&&n.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384", -h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));h.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));l.style.marginTop="12px";l.className="geBtn";h.appendChild(l);g.appendChild(h);l=document.createElement("a"); -l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));h.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok")); +EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var h=document.createElement("h3");mxUtils.write(h,a||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(h);var n=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=n&&n.constructor==window.DriveFile&&!b){a=80;var h="https://desk.draw.io/support/solutions/articles/16000039384", +k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));k.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));l.style.marginTop="12px";l.className="geBtn";k.appendChild(l);g.appendChild(k);l=document.createElement("a"); +l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));k.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok")); this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",g.appendChild(m),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px", q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var p=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==n||n.constructor!=window.DriveFile||b)t=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(g,mxResources.get("lightbox"),!0),E=this.addEditButton(g,D),G=E.getEditInput(),C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=G.style.marginLeft;C.style.marginBottom="16px"; C.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(C.removeAttribute("disabled"),G.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"));G.checked&&D.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(p.getTarget(),p.getColor(),null==t?!0:t.checked,D.checked,E.getLink(),C.checked,null!=m?m.value:null,null!= -q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; -e.appendChild(g);var k=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),f=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0);null!=f&&(f.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!k.checked,null!=f?f.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,h,l){h=null!=h?h:!0;var g=document.createElement("div");g.style.whiteSpace= -"nowrap";var k=this.editor.graph,n="jpeg"==l?170:280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";g.appendChild(q);mxUtils.write(g,mxResources.get("borderWidth")+ -":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";g.appendChild(p);mxUtils.br(g);var t=this.addCheckbox(g,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background,null,null,"jpeg"!=l),v=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight= -"8px";z.style.marginLeft="24px";z.setAttribute("disabled","disabled");z.setAttribute("type","checkbox");f&&(g.appendChild(z),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),n+=26,mxEvent.addListener(v,"change",function(){v.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));k.isSelectionEmpty()||(z.setAttribute("checked","checked"),z.defaultChecked=!0);var G=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible),C=document.createElement("input");C.style.marginTop= -"16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(g.appendChild(C),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),n+=26);var F=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),h,null,null,"jpeg"!=l),I=null!=this.pages&&1<this.pages.length,K=this.addCheckbox(g,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=l);K.style.marginLeft="24px";K.style.marginBottom="16px";I||(K.style.visibility= -"hidden");mxEvent.addListener(F,"change",function(){F.checked&&I?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")});h&&I||K.setAttribute("disabled","disabled");a=new CustomDialog(this,g,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=q.value;e(q.value,t.checked,!v.checked,G.checked,F.checked,C.checked,p.value,z.checked,!K.checked)}),null,c,d);this.showDialog(a.container,320,n,!0,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var f=document.createElement("h3");mxUtils.write(f,b);f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";g.appendChild(f)}var n=this.addCheckbox(g,mxResources.get("fit"),!0),h=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible&&d, -!d),l=this.addCheckbox(g,c),m=this.addCheckbox(g,mxResources.get("lightbox"),!0),q=this.addEditButton(g,m),t=q.getEditInput(),H=1<k.model.getChildCount(k.model.getRoot()),D=this.addCheckbox(g,mxResources.get("layers"),H,!H);D.style.marginLeft=t.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?(H&&D.removeAttribute("disabled"),t.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled")); -t.checked&&m.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){a(n.checked,h.checked,l.checked,m.checked,q.getLink(),D.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,h,l){function g(b){var g=" ",n="";d&&(g=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");var l="";c&&(l=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');h('<img src="'+b+'"'+l+(""!=n?' style="'+n+'"':"")+g+"/>")}var k=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}), -null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),k.width*k.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*k.width)+"&h="+Math.round(2*k.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?g("data:image/png;base64,"+m.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})}; -EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,h){var g=this.editor.graph.getSvg(),k=g.getElementsByTagName("a");if(null!=k)for(var n=0;n<k.length;n++){var l=k[n].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==k[n].getAttribute("target")&&k[n].removeAttribute("target")}d&&g.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(g);if(c){var m=" ",q="";d&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(g,mxUtils.bind(this,function(a){h('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+m+"/>")}))}else q="",d&&(g.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(g.getAttribute("width")),b=parseInt(g.getAttribute("height")),g.setAttribute("viewBox","0 0 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",g.removeAttribute("height")),""!=q&&g.setAttribute("style",q),h(mxUtils.getXml(g))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+ +q?q.value:null)}),null,mxResources.get("create"),h);this.showDialog(b.container,340,246+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; +e.appendChild(g);var h=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),f=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0);null!=f&&(f.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!h.checked,null!=f?f.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,k,l){k=null!=k?k:!0;var g=document.createElement("div");g.style.whiteSpace= +"nowrap";var h=this.editor.graph,n="jpeg"==l?170:280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";g.appendChild(q);mxUtils.write(g,mxResources.get("borderWidth")+ +":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";g.appendChild(p);mxUtils.br(g);var t=this.addCheckbox(g,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||null==h.background,null,null,"jpeg"!=l),v=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,h.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight= +"8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");f&&(g.appendChild(y),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),n+=26,mxEvent.addListener(v,"change",function(){v.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var G=this.addCheckbox(g,mxResources.get("shadow"),h.shadowVisible),C=document.createElement("input");C.style.marginTop= +"16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(g.appendChild(C),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),n+=26);var F=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),I=null!=this.pages&&1<this.pages.length,K=this.addCheckbox(g,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=l);K.style.marginLeft="24px";K.style.marginBottom="16px";I||(K.style.visibility= +"hidden");mxEvent.addListener(F,"change",function(){F.checked&&I?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")});k&&I||K.setAttribute("disabled","disabled");a=new CustomDialog(this,g,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=q.value;e(q.value,t.checked,!v.checked,G.checked,F.checked,C.checked,p.value,y.checked,!K.checked)}),null,c,d);this.showDialog(a.container,320,n,!0,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var g=document.createElement("div");g.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=b){var f=document.createElement("h3");mxUtils.write(f,b);f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";g.appendChild(f)}var n=this.addCheckbox(g,mxResources.get("fit"),!0),k=this.addCheckbox(g,mxResources.get("shadow"),h.shadowVisible&&d, +!d),l=this.addCheckbox(g,c),m=this.addCheckbox(g,mxResources.get("lightbox"),!0),q=this.addEditButton(g,m),t=q.getEditInput(),H=1<h.model.getChildCount(h.model.getRoot()),D=this.addCheckbox(g,mxResources.get("layers"),H,!H);D.style.marginLeft=t.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?(H&&D.removeAttribute("disabled"),t.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled")); +t.checked&&m.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){a(n.checked,k.checked,l.checked,m.checked,q.getLink(),D.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,k,l){function g(b){var g=" ",n="";d&&(g=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");var l="";c&&(l=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+b+'"'+l+(""!=n?' style="'+n+'"':"")+g+"/>")}var h=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}), +null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),h.width*h.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?g("data:image/png;base64,"+m.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})}; +EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,k){var g=this.editor.graph.getSvg(),h=g.getElementsByTagName("a");if(null!=h)for(var n=0;n<h.length;n++){var l=h[n].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==h[n].getAttribute("target")&&h[n].removeAttribute("target")}d&&g.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(g);if(c){var m=" ",q="";d&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(g,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+m+"/>")}))}else q="",d&&(g.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(g.getAttribute("width")),b=parseInt(g.getAttribute("height")),g.setAttribute("viewBox","0 0 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",g.removeAttribute("height")),""!=q&&g.setAttribute("style",q),k(mxUtils.getXml(g))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+ " "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0< d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(p){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph, e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),g=d.getGlobalVariable,f=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(d.container); d.model.setRoot(f.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var g=c.toDataURL("image/png"),g=this.writeGraphModelToPng(g,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(g.substring(g.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(u){null!=b&&b(u)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg= -function(a,b,c,d,e,f,h){h=b.background;h==mxConstants.NONE&&(h=null);b=b.getSvg(h,null,null,null,null,f);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ -mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,f,h,l,m){m=null!=m?m:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,m)}catch(x){"Invalid image"==x.message?this.downloadFile(m):this.handleError(x)}}),null, -this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,f,h)}catch(w){this.spinner.stop(),this.handleError(w)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var g=[c[0]],f=1;f<c.length;f++){var k= -c[f].indexOf(")");g.push('url("');g.push(e[b(c[f].substring(0,k))]);g.push('"'+c[f].substring(k))}this.editor.resolvedFontCss=g.join("");a()}});if(0<c.length)for(var f=1;f<c.length;f++){var h=c[f].indexOf(")"),l=null,u=c[f].indexOf("format(",h);0<u&&(l=b(c[f].substring(u+7,c[f].indexOf(")",u))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b= +function(a,b,c,d,e,f,k){k=b.background;k==mxConstants.NONE&&(k=null);b=b.getSvg(k,null,null,null,null,f);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,f,k,l,m){m=null!=m?m:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,m)}catch(x){"Invalid image"==x.message?this.downloadFile(m):this.handleError(x)}}),null, +this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,f,k)}catch(w){this.spinner.stop(),this.handleError(w)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var g=[c[0]],f=1;f<c.length;f++){var h= +c[f].indexOf(")");g.push('url("');g.push(e[b(c[f].substring(0,h))]);g.push('"'+c[f].substring(h))}this.editor.resolvedFontCss=g.join("");a()}});if(0<c.length)for(var f=1;f<c.length;f++){var k=c[f].indexOf(")"),l=null,u=c[f].indexOf("format(",k);0<u&&(l=b(c[f].substring(u+7,c[f].indexOf(")",u))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b= "application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;g()}),mxUtils.bind(this, -function(a){d--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[f].substring(0,h)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,h,l,m,u,w,x,A,B){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;A=null!=A?A:0;var g=m?null:x.background;g==mxConstants.NONE&&(g=null);null==g&&(g=d);null==g&&0==m&&(g=this.editor.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(g,null,null,B,null,null!=h?h:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this, -function(){try{var k=document.createElement("canvas"),h=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*n),b/h)):b/h);h=Math.ceil(l*h)+2*A;n=Math.ceil(l*n)+2*A;k.setAttribute("width",h);k.setAttribute("height",n);var u=k.getContext("2d");null!=g&&(u.beginPath(),u.rect(0,0,h,n),u.fillStyle=g,u.fill());u.scale(l,l);u.drawImage(d,A/l,A/l);a(k)}catch(P){null!=e&&e(P)}});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.graph.addSvgShadow(c); -var k=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(k)}catch(C){null!=e&&e(C)}}),c,w)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert; -a.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,a.baseUrl.length)==a.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,f){for(var k=a.getElementsByTagName(c),h=0;h<k.length;h++)mxUtils.bind(this,function(c){var k= -d.convert(c.getAttribute(f));if(null!=k&&"data:"!=k.substring(0,5)){var h=g[k];null==h?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(g[k]=d,c.setAttribute(f,d));e--;0==e&&b(a)})):c.setAttribute(f,h)}})(k[h])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,f){try{var g=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var k=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<= -a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}f=null!=f?f:"data:image/png;base64,";d=f+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},g,this.timeout, -function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:k})})});k()}catch(y){null!=c&&c(y)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a, -b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var g=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),h= -this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=h&&"mxfile"==h.nodeName&&null!=this.pages){var n=h.getElementsByTagName("diagram");if(1==n.length)h=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){f.model.beginUpdate();try{for(a=0;a<n.length;a++){var l=this.updatePageRoot(new DiagramPage(n[a])),m=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,l,l, -m))}}finally{f.model.endUpdate()}}}null!=h&&"mxGraphModel"===h.nodeName&&(g=f.importGraphModel(h,b,c,d))}}catch(A){throw e||this.handleError(A,mxResources.get("invalidOrMissingFile")),A;}return g};EditorUi.prototype.importLucidChart=function(a,b,c,d,e){var g=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,e)}catch(v){this.handleError(v)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(g,0):(this.loadingExtensions= -!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.insertLucidChart=function(a,b,c,d,e){e=JSON.parse(a);a=[];if(null!=e.state){e=JSON.parse(e.state);for(var g in e.Pages)a.push(e.Pages[g]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(e);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,d),null!=this.pages){var f= -this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f,h){f=null!=f?f:!0;h=null!=h?h:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>= -a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),n=this.importXml(k,b,c,f,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&& -!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),n=this.importXml(k,b,c,f,!0),0<n.length)return n}catch(w){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+ -";"))}),h,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c), -1,1,"text;"+(d?"html=1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,f);else{g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c), -1,1,"text;"+(d?"html=1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize= -function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile= -function(a,b,c,d,e,f,h,l,m,u,w){u=null!=u?u:!0;var g=!1,k=null;"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=w?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(k=this.importXml(b,c,d,u),m=!0)),m||(k=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&k.isGridEnabled()&&(c=k.snap(c),d=k.snap(d)),k=[k.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ -a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,u);null!=l&&l(a)})):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,h)?(g=!0,this.parseFile(null!=m?m:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=h&&".vssx"== -h.toLowerCase().substring(h.length-5)&&(h=h.substring(0,h.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,h))):b=this.importXml(a,c,d,u));null!=l&&l(b)}}),h)):/(\.vsd)($|\?)/i.test(h)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,u));g||null==l||l(k);return k};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,h,l,m,u,w,x){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var g=null!=b&&null!=c,k=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=w||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0, -6)&&a[p].size>q){n=!0;break}var t=mxUtils.bind(this,function(){var n=this.editor.graph,m=n.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,k,h,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,f,k,h,n,g,x)});f=null!=f?f:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,p=q,t=[],v=mxUtils.bind(this,function(a, -b){t[a]=b;if(0==--p){this.spinner.stop();if(null!=l)l(t);else{var c=[];n.getModel().beginUpdate();try{for(var d=0;d<t.length;d++){var e=t[d]();null!=e&&(c=c.concat(e))}}finally{n.getModel().endUpdate()}}f(c)}}),A=0;A<q;A++)mxUtils.bind(this,function(f){var g=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==h||h(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,q=l.indexOf(","),p=decodeURIComponent(escape(atob(l.substring(q+1)))), -t=mxUtils.parseXml(p),p=t.getElementsByTagName("svg");if(0<p.length){var p=p[0],C=x?null:p.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(l.substring(0,q+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var k=a[0],h=parseFloat(k.getAttribute("width")), -u=parseFloat(k.getAttribute("height")),p=k.getAttribute("viewBox");if(null==p||0==p.length)k.setAttribute("viewBox","0 0 "+h+" "+u);else if(isNaN(h)||isNaN(u)){var w=p.split(" ");3<w.length&&(h=parseFloat(w[2]),u=parseFloat(w[3]))}l=this.createSvgDataUri(mxUtils.getXml(k));var C=Math.min(1,Math.min(d/Math.max(1,h)),d/Math.max(1,u)),x=e(l,g.type,b+f*m,c+f*m,Math.max(1,Math.round(h*C)),Math.max(1,Math.round(u*C)),g.name);if(isNaN(h)||isNaN(u)){var v=new Image;v.onload=mxUtils.bind(this,function(){h= -Math.max(1,v.width);u=Math.max(1,v.height);x[0].geometry.width=h;x[0].geometry.height=u;k.setAttribute("viewBox","0 0 "+h+" "+u);l=this.createSvgDataUri(mxUtils.getXml(k));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));n.setCellStyles("image",l,[x[0]])});v.src=this.createSvgDataUri(mxUtils.getXml(k))}return x}}}catch(aa){}return null})):v(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*m,c+f*m,0,0,g.name)}))}}else{p=!1;if("image/png"==g.type){var A=x?null: -this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var I=new Image;I.src=a.target.result;v(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*m,c+f*m,I.width,I.height,g.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result, -mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,l,n){v(f,mxUtils.bind(this,function(){if(null!=h&&h.length<u){var q=k&&this.isResampleImage(a.target.result,w)?Math.min(1,Math.min(d/l,d/n)):1;return e(h,g.type,b+f*m,c+f*m,Math.round(l*q),Math.round(n*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),k,d,w)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result, -g.type,b+f*m,c+f*m,240,160,g.name,function(a){v(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)?"1"==urlParams.dev?/(\.vssx)($|\?)/i.test(g.name)?(new com.mxgraph.io.mxVssxCodec).decodeVssx(g,mxUtils.bind(this,function(a){v(f,mxUtils.bind(this,function(){var b=g.name;null!=b&&".vssx"==b.toLowerCase().substring(b.length-5)&&(b=b.substring(0,b.length-5)+".xml");this.loadLibrary(new LocalLibrary(this,a,b))}))})):(new com.mxgraph.io.mxVsdxCodec).decodeVsdx(g, -mxUtils.bind(this,function(a){v(f,mxUtils.bind(this,function(){return this.importXml(a,b+f*m,c+f*m)}))})):e(null,g.type,b+f*m,c+f*m,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)})(A)});n?this.confirmImageResize(function(a){k=a;t()},m):t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP? -mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage|| -mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height); -if(d&&this.isResampleImage(b,f))try{var h=Math.max(g/e,k/e);if(1<h){var l=Math.round(g/h),n=Math.round(k/h),m=document.createElement("canvas");m.width=l;m.height=n;m.getContext("2d").drawImage(a,0,0,l,n);var q=m.toDataURL();if(q.length<b.length){var p=document.createElement("canvas");p.width=l;p.height=n;var t=p.toDataURL();q!==t&&(b=q,g=l,k=n)}}}catch(D){}c(b,g,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]= -c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=h;h+=b;return a.substring(c,h)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a, -!0);var h=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,h);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,h-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=k(c.length)+b+c+k(d^4294967295);e+=a.substring(h-8,a.length);break}e+=a.substring(h-8,h-4+l);f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+ -(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a= -a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(t){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)} -"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph,d=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var e=c.addClickHandler;c.addClickHandler=function(b,d,f){var g= -d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=g&&g(b,d)};e.call(this,b,d,f)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)}; -this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var l=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=g?g.getName():mxResources.get("pageNotFound"))}g=l.call(this, -d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var m=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?m.apply(this,arguments):(c.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS|| -!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable){var u=function(){window.setTimeout(function(){w.innerHTML=" ";w.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle"); -this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a, -f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(S){}}),!1);var w=document.createElement("div");w.style.position="absolute";w.style.whiteSpace="nowrap";w.style.overflow="hidden";w.style.display="block";w.contentEditable=!0;mxUtils.setOpacity(w,0);w.style.width="1px";w.style.height="1px";w.innerHTML= -" ";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||x||(w.style.left=c.container.scrollLeft+10+"px",w.style.top= -c.container.scrollTop+10+"px",c.container.appendChild(w),x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){w.focus();document.execCommand("selectAll",!1,null)},0):(w.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=b&&17!=b&&91!=b||(x=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),w.parentNode.removeChild(w))}),0)}));mxEvent.addListener(w, -"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(w),u())}));mxEvent.addListener(w,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(w,!0),u())}));mxEvent.addListener(w,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(w.innerHTML=" ",w.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,w);w.innerHTML=" "}),0))}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed= -function(a){return mxEvent.getSource(a)==w?!0:A.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}), -mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b= -0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<= -mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){y=document.createElement("div");y.style.position="absolute";y.style.top="95px";y.style.left="250px";y.style.width="2000px";y.style.height="30px";y.style.background= -"whiteSmoke";document.body.appendChild(y);var B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px";B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var H=document.createElement("div");H.style.position="absolute";H.style.top="95px";H.style.left="220px";H.style.width="30px";H.style.height="30px";H.style.background="whiteSmoke";document.body.appendChild(H);this.vRuler=new mxRuler(this.editor.graph, -B,!0);this.hRuler=new mxRuler(this.editor.graph,y,!1)}if("1"==urlParams.test){y=document.getElementById("geFooter");null!=y&&(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)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed; -this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null== -E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files, -f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var h=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=h;var l=null,d=b.getElementsByTagName("img"); -null!=d&&1==d.length?(h=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(l=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(h=b[0].getAttribute("href")));var m=!0,n=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(h,f,g,!0,l,null,m))});l&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;n()},mxEvent.isControlDown(a)):n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this, -function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"), -f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle= -mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged", -mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor); -mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(), -mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus(); -document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent), -f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(y){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(y){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&& -(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(y){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b), -b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(), -"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types, -"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this, -function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body; -var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container? -this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c= -0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(), -200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);null!=e&&".vssx"==e.toLowerCase().substring(e.length-5)&&(e=e.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b);else this.handleError({message:mxResources.get(413==a.status? -"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml, -this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile= -function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()? -this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]), -this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])), -c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&& -(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(), -this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct(): -this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified? -null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function h(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a= -decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(K){}return a}if(f.source==(window.opener||window.parent)){var k=f.data;if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(I){k=null}if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"== -k.action){this.spinner.stop();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==k.action){l=null;l="data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):h(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound", -[k.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}), -"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(I){g.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var l=1==k.enableRecent,m=1==k.enableSearch,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml, -name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;g.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;g.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container, -620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==k.action)this.searchReadyCallback(k.list,k.errorMsg);else if("recentDocsList"==k.action)this.recentReadyCallback(k.list,k.errorMsg);else{if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"== -k.action){var n=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var q=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var p=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0); -this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(q);g.postMessage(JSON.stringify(b),"*")}),v=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var p= -this.createTemporaryGraph(p.getStylesheet()),z=p.getGlobalVariable,C=this.pages[0];p.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:z.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){v(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){v(null)}),null,null,null,null,null,null,p)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+ -"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);n=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),n.xml=mxUtils.getXml(l),n.data=this.getFileData(null,null, -!0,null,null,null,l),n.format=k.format;else if("html"==k.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph),n.xml=mxUtils.getXml(q),n.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);n.xml=this.getFileData(!0);n.format="svg";if(k.embedImages||null==k.embedImages){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))this.editor.graph.setEnabled(!1), -"xmlsvg"==k.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),"*")}));return}l="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0), -this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));n.data=this.createSvgDataUri(l)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified),null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit),null!=k.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight= -"12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.xml&&"data:image/png;base64,"==k.xml.substring(0,22)?this.extractGraphModelFromPng(k.xml):k.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage", -data:JSON.stringify(k)}),"*");return}}}k=h(k);c=!0;try{a(k,f)}catch(I){this.handleError(I)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var F=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=F();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=F();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d, -"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged", -b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme? -"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"), -mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight= -"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}), -null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f=null,g="auto",h="auto",l=40,m=40,w=0,x=this.editor.graph;x.getGraphBounds();for(var A=function(){x.setSelectionCells(U);x.scrollCellToVisible(x.getSelectionCell())},B=x.getFreeInsertPoint(),H=B.x,D=B.y,B=D,E=null,G="auto",C=[],F=null,I=null,K=0;K<b.length&& -"#"==b[K].charAt(0);){a=b[K];for(K++;K<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[K].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[K].substring(1)),K++;if("#"!=a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),O=mxUtils.trim(a.substring(P+1));"label"==Q?E=x.sanitizeHtml(O):"style"==Q?e=O:"identity"==Q&&0<O.length&&"-"!=O?f=O:"width"==Q?g=O:"height"==Q?h=O:"ignore"==Q?I=O.split(","):"connect"==Q?C.push(JSON.parse(O)):"link"==Q?F=O:"padding"==Q?w=parseFloat(O): -"edgespacing"==Q?l=parseFloat(O):"nodespacing"==Q?m=parseFloat(O):"layout"==Q&&(G=O)}}}var S=this.editor.csvToArray(b[K]);a=null;if(null!=f)for(var M=0;M<S.length;M++)if(f==S[M]){a=M;break}null==E&&(E="%"+S[0]+"%");if(null!=C)for(var J=0;J<C.length;J++)null==d[C[J].to]&&(d[C[J].to]={});x.model.beginUpdate();try{for(M=K+1;M<b.length;M++){var T=this.editor.csvToArray(b[M]);if(T.length==S.length){var L=null,X=null!=a?T[a]:null;null!=X&&(L=x.model.getCell(X));null==L&&(L=new mxCell(E,new mxGeometry(H, -B,0,0),e||"whiteSpace=wrap;html=1;"),L.vertex=!0,L.id=X);for(var N=0;N<T.length;N++)x.setAttributeForCell(L,S[N],T[N]);x.setAttributeForCell(L,"placeholders","1");L.style=x.replacePlaceholders(L,L.style);for(J=0;J<C.length;J++)d[C[J].to][L.getAttribute(C[J].to)]=L;null!=F&&"link"!=F&&(x.setLinkForCell(L,L.getAttribute(F)),x.setAttributeForCell(L,F,null));x.fireEvent(new mxEventObject("cellsInserted","cells",[L]));var Y=this.editor.graph.getPreferredSizeForCell(L);L.geometry.width="auto"==g?Y.width+ -w:parseFloat(g);L.geometry.height="auto"==h?Y.height+w:parseFloat(h);B+=L.geometry.height+m;c.push(x.addCell(L))}}for(var V=c.slice(),U=c.slice(),J=0;J<C.length;J++)for(var R=C[J],M=0;M<c.length;M++){var L=c[M],Z=L.getAttribute(R.from);if(null!=Z){x.setAttributeForCell(L,R.from,null);for(var W=Z.split(","),N=0;N<W.length;N++){var ba=d[R.to][W[N]];null!=ba&&(E=R.label,null!=R.fromlabel&&(E=(L.getAttribute(R.fromlabel)||"")+(E||"")),null!=R.tolabel&&(E=(E||"")+(ba.getAttribute(R.tolabel)||"")),U.push(x.insertEdge(null, -null,E||"",R.invert?ba:L,R.invert?L:ba,R.style||x.createCurrentEdgeStyle())),mxUtils.remove(R.invert?L:ba,V))}}}if(null!=I)for(M=0;M<c.length;M++)for(L=c[M],N=0;N<I.length;N++)x.setAttributeForCell(L,mxUtils.trim(I[N]),null);var ca=new mxParallelEdgeLayout(x);ca.spacing=l;var ga=function(){ca.execute(x.getDefaultParent());for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==g&&(b.width=Math.round(x.snap(b.width)));"auto"==h&&(b.height= -Math.round(x.snap(b.height)))}};if("circle"==G){var da=new mxCircleLayout(x);da.resetEdges=!1;var ha=da.isVertexIgnored;da.isVertexIgnored=function(a){return ha.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(x.getDefaultParent());ga()},!0,A);A=null}else if("horizontaltree"==G||"verticaltree"==G||"auto"==G&&U.length==2*c.length-1&&1==V.length){x.view.validate();var ea=new mxCompactTreeLayout(x,"horizontaltree"==G);ea.levelDistance=m;ea.edgeRouting=!1;ea.resetEdges= -!1;this.executeLayout(function(){ea.execute(x.getDefaultParent(),0<V.length?V[0]:null)},!0,A);A=null}else if("horizontalflow"==G||"verticalflow"==G||"auto"==G&&1==V.length){x.view.validate();var fa=new mxHierarchicalLayout(x,"horizontalflow"==G?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fa.intraCellSpacing=m;fa.disableEdgeStyle=!1;this.executeLayout(function(){fa.execute(x.getDefaultParent(),U);x.moveCells(U,H,D)},!0,A);A=null}else if("organic"==G||"auto"==G&&U.length>c.length){x.view.validate(); -var aa=new mxFastOrganicLayout(x);aa.forceConstant=3*m;aa.resetEdges=!1;var ia=aa.isVertexIgnored;aa.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(x);ca.spacing=l;this.executeLayout(function(){aa.execute(x.getDefaultParent());ga()},!0,A);A=null}this.hideDialog()}finally{x.model.endUpdate()}null!=A&&A()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&& -null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&& -(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var h=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=h.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a= -this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2* -a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a, -8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat= -e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient|| -c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled(); -this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").setEnabled(c); -a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!= -this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var d=applicationCache;if(null!=d&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding= -"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var d=window.applicationCache,e=null,b=mxUtils.bind(this,function(){var a=d.status,b;a==d.CHECKING&&(a=d.DOWNLOADING);switch(a){case d.UNCACHED:b="";break;case d.IDLE:b= -'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case d.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case d.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case d.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+ -IMAGE_PATH+'/clear.gif"/>'}a!=e&&(this.offlineStatus.innerHTML=b,e=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){}; -EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b); -this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b); -this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted()); -a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);m.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"== -c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),k=g.getGraphBounds(),l=Math.floor(k.width*e/g.view.scale),m=Math.floor(k.height*e/g.view.scale);h.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+ -encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+m+"&border="+f+"&xml="+encodeURIComponent(h))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor}, +function(a){d--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[f].substring(0,k)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,k,l,m,u,w,x,A,B){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;A=null!=A?A:0;var g=m?null:x.background;g==mxConstants.NONE&&(g=null);null==g&&(g=d);null==g&&0==m&&(g=this.editor.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(g,null,null,B,null,null!=k?k:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this, +function(){try{var h=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*n),b/k)):b/k);k=Math.ceil(l*k)+2*A;n=Math.ceil(l*n)+2*A;h.setAttribute("width",k);h.setAttribute("height",n);var u=h.getContext("2d");null!=g&&(u.beginPath(),u.rect(0,0,k,n),u.fillStyle=g,u.fill());u.scale(l,l);u.drawImage(d,A/l,A/l);a(h)}catch(P){null!=e&&e(P)}});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.graph.addSvgShadow(c); +var h=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(C){null!=e&&e(C)}}),c,w)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert, +c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:e&&d.substring(0,a.baseUrl.length)!=a.baseUrl?d=PROXY_URL+"?url="+encodeURIComponent(d):"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments))}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,f){for(var h=a.getElementsByTagName(c), +k=0;k<h.length;k++)mxUtils.bind(this,function(c){var h=d.convert(c.getAttribute(f));if(null!=h&&"data:"!=h.substring(0,5)){var k=g[h];null==k?(e++,this.convertImageToDataUri(h,function(d){null!=d&&(g[h]=d,c.setAttribute(f,d));e--;0==e&&b(a)})):c.setAttribute(f,k)}else null!=h&&c.setAttribute(f,h)})(h[k])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,f){try{var g=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);e= +null!=e?e:!0;var h=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=String.fromCharCode(a[e]);d=d.join("")}f=null!=f?f:"data:image/png;base64,";d=f+this.base64Encode(d)}b(d)}}else null!= +c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0, +23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;c.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(v){b(d.svgBrokenImage.src)}}; +c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var g=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),k=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var n=k.getElementsByTagName("diagram");if(1==n.length)k=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){f.model.beginUpdate(); +try{for(a=0;a<n.length;a++){var l=this.updatePageRoot(new DiagramPage(n[a])),m=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,l,l,m))}}finally{f.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(g=f.importGraphModel(k,b,c,d))}}catch(A){throw e||this.handleError(A,mxResources.get("invalidOrMissingFile")),A;}return g};EditorUi.prototype.importVisio=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)}); +var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)try{this.doImportVisio(a,b,c)}catch(t){c(t)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(h){this.handleError(h)}});"undefined"===typeof VsdxExport|| +this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,d,e){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,e)}catch(v){this.handleError(v)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(g,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js", +g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.insertLucidChart=function(a,b,c,d,e){e=JSON.parse(a);a=[];if(null!=e.state){e=JSON.parse(e.state);for(var g in e.Pages)a.push(e.Pages[g]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(e);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,d),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(), +this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f,k){f=null!=f?f:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText, +b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var h=this.extractGraphModelFromPng(a),n=this.importXml(h,b,c,f,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(h=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(h=a.substring(a.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(a.substring(a.indexOf(",")+ +1)),n=this.importXml(h,b,c,f,!0),0<n.length)return n}catch(w){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/ +d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells", +[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,f);else{g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value= +a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+ +" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,k,l,m,u,w){u=null!=u?u:!0;var g=!1,h=null,n=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0, +10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,u);null!=l&&l(b)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=w?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(h=this.importXml(b,c,d,u),m=!0)),m||(h=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,u);null!=l&&l(a)})):null!=m&&null!=k&&(/(\.vsdx)($|\?)/i.test(k)||/(\.vssx)($|\?)/i.test(k))?(g=!0,this.importVisio(m,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(g=!0,this.parseFile(null!=m?m:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&& +299>=a.status?n(a.responseText):null!=l&&l(null))}),k)):/(\.vsd)($|\?)/i.test(k)||(h=this.insertTextAt(this.validateFileData(a),c,d,!0,null,u));g||null==l||l(h);return h};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+= +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f& +15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,k,l,m,u,w,x){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var g=null!=b&&null!=c,h=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=w||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>q){n=!0;break}var t=mxUtils.bind(this,function(){var n=this.editor.graph, +m=n.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,h,k,l){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,d,e,f,h,k,l,g,x)});f=null!=f?f:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,p=q,t=[],v=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--p){this.spinner.stop();if(null!=l)l(t);else{var c=[];n.getModel().beginUpdate(); +try{for(var d=0;d<t.length;d++){var e=t[d]();null!=e&&(c=c.concat(e))}}finally{n.getModel().endUpdate()}}f(c)}}),A=0;A<q;A++)mxUtils.bind(this,function(f){var g=a[f],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,q=l.indexOf(","),p=decodeURIComponent(escape(atob(l.substring(q+1)))),t=mxUtils.parseXml(p),p=t.getElementsByTagName("svg");if(0<p.length){var p=p[0],C=x?null:p.getAttribute("content"); +null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(l.substring(0,q+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var h=a[0],k=parseFloat(h.getAttribute("width")),u=parseFloat(h.getAttribute("height")),p=h.getAttribute("viewBox");if(null==p||0==p.length)h.setAttribute("viewBox", +"0 0 "+k+" "+u);else if(isNaN(k)||isNaN(u)){var w=p.split(" ");3<w.length&&(k=parseFloat(w[2]),u=parseFloat(w[3]))}l=this.createSvgDataUri(mxUtils.getXml(h));var C=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,u)),x=e(l,g.type,b+f*m,c+f*m,Math.max(1,Math.round(k*C)),Math.max(1,Math.round(u*C)),g.name);if(isNaN(k)||isNaN(u)){var v=new Image;v.onload=mxUtils.bind(this,function(){k=Math.max(1,v.width);u=Math.max(1,v.height);x[0].geometry.width=k;x[0].geometry.height=u;h.setAttribute("viewBox","0 0 "+ +k+" "+u);l=this.createSvgDataUri(mxUtils.getXml(h));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));n.setCellStyles("image",l,[x[0]])});v.src=this.createSvgDataUri(mxUtils.getXml(h))}return x}}}catch(aa){}return null})):v(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*m,c+f*m,0,0,g.name)}))}}else{p=!1;if("image/png"==g.type){var A=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var I=new Image;I.src=a.target.result;v(f,mxUtils.bind(this, +function(){return e(A,"text/xml",b+f*m,c+f*m,I.width,I.height,g.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,l,n){v(f,mxUtils.bind(this, +function(){if(null!=k&&k.length<u){var q=h&&this.isResampleImage(a.target.result,w)?Math.min(1,Math.min(d/l,d/n)):1;return e(k,g.type,b+f*m,c+f*m,Math.round(l*q),Math.round(n*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,w)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*m,c+f*m,240,160,g.name,function(a){v(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)|| +/(\.vssx)($|\?)/i.test(g.name)?e(null,g.type,b+f*m,c+f*m,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)})(A)});n?this.confirmImageResize(function(a){h=a;t()},m):t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d? +e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b, +c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),h=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var k=Math.max(g/e,h/e);if(1<k){var l=Math.round(g/ +k),n=Math.round(h/k),m=document.createElement("canvas");m.width=l;m.height=n;m.getContext("2d").drawImage(a,0,0,l,n);var q=m.toDataURL();if(q.length<b.length){var p=document.createElement("canvas");p.width=l;p.height=n;var t=p.toDataURL();q!==t&&(b=q,g=l,h=n)}}}catch(D){}c(b,g,h)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^ +b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a, +4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=h(c.length)+b+c+h(d^4294967295);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b= +null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(t){}null!= +b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph, +d=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var e=c.addClickHandler;c.addClickHandler=function(b,d,f){var g=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null== +d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=g&&g(b,d)};e.call(this,b,d,f)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var k=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"== +a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:k.apply(this,arguments)};var l=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=g?g.getName():mxResources.get("pageNotFound"))}g=l.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var m=c.labelLinkClicked;c.labelLinkClicked= +function(b,d,e){var f=d.getAttribute("href");null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?m.apply(this,arguments):(c.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable){var u= +function(){window.setTimeout(function(){w.innerHTML=" ";w.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste", +mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()}); +else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(S){}}),!1);var w=document.createElement("div");w.style.position="absolute";w.style.whiteSpace="nowrap";w.style.overflow="hidden";w.style.display="block";w.contentEditable=!0;mxUtils.setOpacity(w,0);w.style.width="1px";w.style.height="1px";w.innerHTML=" ";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86, +null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||x||(w.style.left=c.container.scrollLeft+10+"px",w.style.top=c.container.scrollTop+10+"px",c.container.appendChild(w),x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){w.focus();document.execCommand("selectAll", +!1,null)},0):(w.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=b&&17!=b&&91!=b||(x=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),w.parentNode.removeChild(w))}),0)}));mxEvent.addListener(w,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(w),u())}));mxEvent.addListener(w,"cut",mxUtils.bind(this, +function(a){c.isEnabled()&&(this.copyCells(w,!0),u())}));mxEvent.addListener(w,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(w.innerHTML=" ",w.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,w);w.innerHTML=" "}),0))}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==w?!0:A.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight|| +0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation(); +a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list"); +/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types, +"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="250px";z.style.width="2000px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);var B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px"; +B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var H=document.createElement("div");H.style.position="absolute";H.style.top="95px";H.style.left="220px";H.style.width="30px";H.style.height="30px";H.style.background="whiteSmoke";document.body.appendChild(H);this.vRuler=new mxRuler(this.editor.graph,B,!0);this.hRuler=new mxRuler(this.editor.graph,z,!1)}if("1"==urlParams.test){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(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&& +(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container, +"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")? +a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var l=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&& +(k=b[0].getAttribute("href")));var m=!0,n=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,l,null,m))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null, +null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()}; +EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged", +mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat= +mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave); +mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph; +if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"=== +c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(z){}try{var c=b.getElementsByTagName("span"),h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e); +this.isCompatibleString(h)&&(f=!0,e=h)}catch(z){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&& +this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(z){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&& +12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0); +else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))): +0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash= +"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth, +e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a); +var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!= +e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(w){this.handleError(w,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a, +e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})); +else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this, +c.target.result,a.name))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(), +e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"), +null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root, +a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW]))); +for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")}; +EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()): +(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))}; +EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))): +this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function k(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(K){}return a}if(f.source== +(window.opener||window.parent)){var h=f.data;if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(I){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var l=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey): +null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==h.action){l=null;l="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):k(h.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft", +result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()})); +try{l.init()}catch(I){g.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();var l=1==h.enableRecent,m=1==h.enableSearch,l=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null, +null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;g.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;g.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"== +h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var n=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body, +n):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var q=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var p=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(q); +g.postMessage(JSON.stringify(b),"*")}),v=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var p=this.createTemporaryGraph(p.getStylesheet()),y=p.getGlobalVariable,C=this.pages[0];p.getGlobalVariable=function(a){return"page"== +a?C.getName():"pagenumber"==a?1:y.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){v(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){v(null)}),null,null,null,null,null,null,p)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()? +t("data:image/png;base64,"+a.getText()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);n=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),n.xml=mxUtils.getXml(l),n.data=this.getFileData(null,null,!0,null,null,null,l),n.format=h.format;else if("html"==h.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph), +n.xml=mxUtils.getXml(q),n.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);n.xml=this.getFileData(!0);n.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0); +this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),"*")}));return}l="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));n.data=this.createSvgDataUri(l)}g.postMessage(JSON.stringify(n), +"*")}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop= +"6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}h=k(h);c=!0;try{a(h,f)}catch(I){this.handleError(I)}c=!1;null!=urlParams.modified&& +this.editor.setStatus("");var F=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=F();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=F();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged", +b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}})); +var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title", +mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding= +"4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b); +this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv= +function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f=null,g="auto",k="auto",l=40,m=40,w=0,x=this.editor.graph;x.getGraphBounds();for(var A=function(){x.setSelectionCells(U);x.scrollCellToVisible(x.getSelectionCell())},B=x.getFreeInsertPoint(),H=B.x,D=B.y,B=D,E=null,G="auto",C=[],F=null,I=null,K=0;K<b.length&&"#"==b[K].charAt(0);){a=b[K];for(K++;K<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[K].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[K].substring(1)),K++;if("#"!= +a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),O=mxUtils.trim(a.substring(P+1));"label"==Q?E=x.sanitizeHtml(O):"style"==Q?e=O:"identity"==Q&&0<O.length&&"-"!=O?f=O:"width"==Q?g=O:"height"==Q?k=O:"ignore"==Q?I=O.split(","):"connect"==Q?C.push(JSON.parse(O)):"link"==Q?F=O:"padding"==Q?w=parseFloat(O):"edgespacing"==Q?l=parseFloat(O):"nodespacing"==Q?m=parseFloat(O):"layout"==Q&&(G=O)}}}var S=this.editor.csvToArray(b[K]);a=null;if(null!=f)for(var M=0;M<S.length;M++)if(f== +S[M]){a=M;break}null==E&&(E="%"+S[0]+"%");if(null!=C)for(var J=0;J<C.length;J++)null==d[C[J].to]&&(d[C[J].to]={});x.model.beginUpdate();try{for(M=K+1;M<b.length;M++){var T=this.editor.csvToArray(b[M]);if(T.length==S.length){var L=null,X=null!=a?T[a]:null;null!=X&&(L=x.model.getCell(X));null==L&&(L=new mxCell(E,new mxGeometry(H,B,0,0),e||"whiteSpace=wrap;html=1;"),L.vertex=!0,L.id=X);for(var N=0;N<T.length;N++)x.setAttributeForCell(L,S[N],T[N]);x.setAttributeForCell(L,"placeholders","1");L.style=x.replacePlaceholders(L, +L.style);for(J=0;J<C.length;J++)d[C[J].to][L.getAttribute(C[J].to)]=L;null!=F&&"link"!=F&&(x.setLinkForCell(L,L.getAttribute(F)),x.setAttributeForCell(L,F,null));x.fireEvent(new mxEventObject("cellsInserted","cells",[L]));var Y=this.editor.graph.getPreferredSizeForCell(L);L.geometry.width="auto"==g?Y.width+w:parseFloat(g);L.geometry.height="auto"==k?Y.height+w:parseFloat(k);B+=L.geometry.height+m;c.push(x.addCell(L))}}for(var V=c.slice(),U=c.slice(),J=0;J<C.length;J++)for(var R=C[J],M=0;M<c.length;M++){var L= +c[M],Z=L.getAttribute(R.from);if(null!=Z){x.setAttributeForCell(L,R.from,null);for(var W=Z.split(","),N=0;N<W.length;N++){var ba=d[R.to][W[N]];null!=ba&&(E=R.label,null!=R.fromlabel&&(E=(L.getAttribute(R.fromlabel)||"")+(E||"")),null!=R.tolabel&&(E=(E||"")+(ba.getAttribute(R.tolabel)||"")),U.push(x.insertEdge(null,null,E||"",R.invert?ba:L,R.invert?L:ba,R.style||x.createCurrentEdgeStyle())),mxUtils.remove(R.invert?L:ba,V))}}}if(null!=I)for(M=0;M<c.length;M++)for(L=c[M],N=0;N<I.length;N++)x.setAttributeForCell(L, +mxUtils.trim(I[N]),null);var ca=new mxParallelEdgeLayout(x);ca.spacing=l;var ga=function(){ca.execute(x.getDefaultParent());for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==g&&(b.width=Math.round(x.snap(b.width)));"auto"==k&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==G){var da=new mxCircleLayout(x);da.resetEdges=!1;var ha=da.isVertexIgnored;da.isVertexIgnored=function(a){return ha.apply(this,arguments)||0>mxUtils.indexOf(c, +a)};this.executeLayout(function(){da.execute(x.getDefaultParent());ga()},!0,A);A=null}else if("horizontaltree"==G||"verticaltree"==G||"auto"==G&&U.length==2*c.length-1&&1==V.length){x.view.validate();var ea=new mxCompactTreeLayout(x,"horizontaltree"==G);ea.levelDistance=m;ea.edgeRouting=!1;ea.resetEdges=!1;this.executeLayout(function(){ea.execute(x.getDefaultParent(),0<V.length?V[0]:null)},!0,A);A=null}else if("horizontalflow"==G||"verticalflow"==G||"auto"==G&&1==V.length){x.view.validate();var fa= +new mxHierarchicalLayout(x,"horizontalflow"==G?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fa.intraCellSpacing=m;fa.disableEdgeStyle=!1;this.executeLayout(function(){fa.execute(x.getDefaultParent(),U);x.moveCells(U,H,D)},!0,A);A=null}else if("organic"==G||"auto"==G&&U.length>c.length){x.view.validate();var aa=new mxFastOrganicLayout(x);aa.forceConstant=3*m;aa.resetEdges=!1;var ia=aa.isVertexIgnored;aa.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,a)}; +ca=new mxParallelEdgeLayout(x);ca.spacing=l;this.executeLayout(function(){aa.execute(x.getDefaultParent());ga()},!0,A);A=null}this.hideDialog()}finally{x.model.endUpdate()}null!=A&&A()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b}; +EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container, +440,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/ +b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d= +this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ +a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&& +null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient|| +c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c); +this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").setEnabled(c);a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b); +this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var d=applicationCache;if(null!=d&&null==this.offlineStatus){this.offlineStatus=document.createElement("div"); +this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this, +function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var d=window.applicationCache,e=null,b=mxUtils.bind(this,function(){var a=d.status,b;a==d.CHECKING&&(a=d.DOWNLOADING);switch(a){case d.UNCACHED:b="";break;case d.IDLE:b='<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case d.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case d.UPDATEREADY:b= +'<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case d.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=e&&(this.offlineStatus.innerHTML=b,e=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d, +"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates= +function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&& +!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!= +c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog), +this.exportDialog=null);m.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),h=g.getGraphBounds(),l=Math.floor(h.width*e/g.view.scale), +m=Math.floor(h.height*e/g.view.scale);k.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+m+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor}, setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries= a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins= a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle}, @@ -6947,28 +6947,28 @@ Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as= mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(a,b,d,c,e){}; mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a}; mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,b,d,c){};mxAsyncCanvas.prototype.roundrect=function(a,b,d,c,e,f){};mxAsyncCanvas.prototype.ellipse=function(a,b,d,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a}; -mxAsyncCanvas.prototype.image=function(a,b,d,c,e,f,h,l){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){}; -mxAsyncCanvas.prototype.text=function(a,b,d,c,e,f,h,l,m,g,k,n){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[q]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null; +mxAsyncCanvas.prototype.image=function(a,b,d,c,e,f,k,l){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){}; +mxAsyncCanvas.prototype.text=function(a,b,d,c,e,f,k,l,m,g,h,n){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[q]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null; mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,d,c,e){return d+d+c+c+e+e});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++}; mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily}; mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b;this.ctx.translate(a,b)}; mxJsCanvas.prototype.rotate=function(a,b,d,c,e){c-=this.state.dx;e-=this.state.dy;this.ctx.translate(c,e);(b||d)&&this.ctx.scale(b?-1:1,d?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-c,-e)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a}; -mxJsCanvas.prototype.setGradient=function(a,b,d,c,e,f,h,l,m){d=this.ctx.createLinearGradient(0,c,0,c+f);c=this.state;c.fillColor=a;c.fillAlpha=null!=l?l:1;c.gradientColor=b;c.gradientAlpha=null!=m?m:1;c.gradientDirection=h;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+c.fillAlpha+")");null!=b&&d.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d}; +mxJsCanvas.prototype.setGradient=function(a,b,d,c,e,f,k,l,m){d=this.ctx.createLinearGradient(0,c,0,c+f);c=this.state;c.fillColor=a;c.fillAlpha=null!=l?l:1;c.gradientColor=b;c.gradientAlpha=null!=m?m:1;c.gradientDirection=k;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+c.fillAlpha+")");null!=b&&d.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d}; mxJsCanvas.prototype.setStrokeColor=function(a){null!=a&&(a==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=a,this.state.strokeColor=a))};mxJsCanvas.prototype.setStrokeWidth=function(a){this.ctx.lineWidth=a};mxJsCanvas.prototype.setDashed=function(a){if(this.state.dashed=a){a=this.state.dashPattern.split(" ");for(var b=0;b<a.length;b++)a[b]=parseInt(a[b],10);this.setLineDash(a)}else this.setLineDash([0])}; mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(b){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var b=0;b<a.length;b++)a[b]=parseInt(a[b],10);this.ctx.setLineDash(a)}};mxJsCanvas.prototype.setLineCap=function(a){this.ctx.lineCap=a};mxJsCanvas.prototype.setLineJoin=function(a){this.ctx.lineJoin=a}; mxJsCanvas.prototype.setMiterLimit=function(a){this.ctx.lineJoin=a};mxJsCanvas.prototype.setFontColor=function(a){this.ctx.fillStyle=a};mxJsCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxJsCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxJsCanvas.prototype.setFontSize=function(a){this.state.fontSize=a}; mxJsCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxJsCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxJsCanvas.prototype.setShadow=function(a){(this.state.shadow=a)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)}; mxJsCanvas.prototype.setShadowColor=function(a){if(null==a||a==mxConstants.NONE)a=null,this.ctx.shadowColor="transparent";this.state.shadowColor=a;if(this.state.shadow&&null!=a){var b=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;a=this.hexToRgb(a);this.ctx.shadowColor="rgba("+a.r+","+a.g+","+a.b+","+b+")"}};mxJsCanvas.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a;this.setShadowColor(this.state.shadowColor)}; mxJsCanvas.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b;this.state.shadow&&(this.ctx.shadowOffsetX=a,this.ctx.shadowOffsetY=b)};mxJsCanvas.prototype.moveTo=function(a,b){this.ctx.moveTo(a,b);this.lastMoveX=a;this.lastMoveY=b};mxJsCanvas.prototype.lineTo=function(a,b){this.ctx.lineTo(a,b);this.lastMoveX=a;this.lastMoveY=b};mxJsCanvas.prototype.quadTo=function(a,b,d,c){this.ctx.quadraticCurveTo(a,b,d,c);this.lastMoveX=d;this.lastMoveY=c}; -mxJsCanvas.prototype.arcTo=function(a,b,d,c,e,f,h){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,b,d,c,e,f,h);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxJsCanvas.prototype.curveTo=function(a,b,d,c,e,f){this.ctx.bezierCurveTo(a,b,d,c,e,f);this.lastMoveX=e;this.lastMoveY=f};mxJsCanvas.prototype.rect=function(a,b,d,c){this.begin();this.moveTo(a,b);this.lineTo(a+d,b);this.lineTo(a+d,b+c);this.lineTo(a,b+c);this.close()}; +mxJsCanvas.prototype.arcTo=function(a,b,d,c,e,f,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,b,d,c,e,f,k);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxJsCanvas.prototype.curveTo=function(a,b,d,c,e,f){this.ctx.bezierCurveTo(a,b,d,c,e,f);this.lastMoveX=e;this.lastMoveY=f};mxJsCanvas.prototype.rect=function(a,b,d,c){this.begin();this.moveTo(a,b);this.lineTo(a+d,b);this.lineTo(a+d,b+c);this.lineTo(a,b+c);this.close()}; mxJsCanvas.prototype.roundrect=function(a,b,d,c,e,f){this.begin();this.moveTo(a+e,b);this.lineTo(a+d-e,b);this.quadTo(a+d,b,a+d,b+f);this.lineTo(a+d,b+c-f);this.quadTo(a+d,b+c,a+d-e,b+c);this.lineTo(a+e,b+c);this.quadTo(a,b+c,a,b+c-f);this.lineTo(a,b+f);this.quadTo(a,b,a+e,b)};mxJsCanvas.prototype.ellipse=function(a,b,d,c){this.ctx.save();this.ctx.translate(a+d/2,b+c/2);this.ctx.scale(d/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()}; mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a}; -mxJsCanvas.prototype.image=function(a,b,d,c,e,f,h,l){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var m=this.ctx;m.save();if(f){f=e.width;var g=e.height,k=Math.min(d/f,c/g);a+=(d-f*k)/2;b+=(c-g*k)/2;d=f*k;c=g*k}h&&(m.translate(2*a+d,0),m.scale(-1,1));l&&(m.translate(0,2*b+c),m.scale(1,-1));m.drawImage(e,a,b,d,c);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()}; +mxJsCanvas.prototype.image=function(a,b,d,c,e,f,k,l){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var m=this.ctx;m.save();if(f){f=e.width;var g=e.height,h=Math.min(d/f,c/g);a+=(d-f*h)/2;b+=(c-g*h)/2;d=f*h;c=g*h}k&&(m.translate(2*a+d,0),m.scale(-1,1));l&&(m.translate(0,2*b+c),m.scale(1,-1));m.drawImage(e,a,b,d,c);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()}; mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var a=this.ctx.shadowColor,b=this.ctx.shadowOffsetX,d=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=b;this.ctx.shadowOffsetY=d}else this.ctx.fill(),this.ctx.stroke()}; -mxJsCanvas.prototype.text=function(a,b,d,c,e,f,h,l,m,g,k,n){if(null!=e&&0!=e.length){d=this.state.scale;0!=n&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(n*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==m){e=this.subCanvas[this.canvasIndex++];m=e.height;n=e.width;switch(h){case mxConstants.ALIGN_MIDDLE:b-=m/2/d;break;case mxConstants.ALIGN_BOTTOM:b-=m/d}switch(f){case mxConstants.ALIGN_CENTER:a-=n/2/d;break;case mxConstants.ALIGN_RIGHT:a-=n/d}this.ctx.save(); +mxJsCanvas.prototype.text=function(a,b,d,c,e,f,k,l,m,g,h,n){if(null!=e&&0!=e.length){d=this.state.scale;0!=n&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(n*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==m){e=this.subCanvas[this.canvasIndex++];m=e.height;n=e.width;switch(k){case mxConstants.ALIGN_MIDDLE:b-=m/2/d;break;case mxConstants.ALIGN_BOTTOM:b-=m/d}switch(f){case mxConstants.ALIGN_CENTER:a-=n/2/d;break;case mxConstants.ALIGN_RIGHT:a-=n/d}this.ctx.save(); if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(a)-.5,Math.round(b)-.5,Math.round(e.width/d),Math.round(e.height/d))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(b)-.5,Math.round(e.width/d),Math.round(e.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(e, -Math.round(a*d),Math.round(b*d))}else{this.ctx.save();this.updateFont();n=document.createElement("div");n.innerHTML=e;n.style.position="absolute";n.style.top="-9999px";n.style.left="-9999px";n.style.fontFamily=this.state.fontFamily;n.style.fontWeight="bold";n.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(n);m=[n.offsetWidth,n.offsetHeight];document.body.removeChild(n);e=e.split("\n");n=m[1];this.ctx.textBaseline="top";m=b;switch(h){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline= -"middle";b-=(e.length-1)*n/2;m=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=n*(e.length-1),m=b-this.state.fontSize}h=[];n=[];for(d=0;d<e.length;d++)n[d]=a,h[d]=this.ctx.measureText(e[d]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(n[d]-=h[d],f==mxConstants.ALIGN_CENTER&&(n[d]+=h[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=n[0];f=h[0];for(d=1;d<e.length;d++)a=Math.min(a,n[d]),f=Math.max(f,h[d]);this.ctx.save(); +Math.round(a*d),Math.round(b*d))}else{this.ctx.save();this.updateFont();n=document.createElement("div");n.innerHTML=e;n.style.position="absolute";n.style.top="-9999px";n.style.left="-9999px";n.style.fontFamily=this.state.fontFamily;n.style.fontWeight="bold";n.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(n);m=[n.offsetWidth,n.offsetHeight];document.body.removeChild(n);e=e.split("\n");n=m[1];this.ctx.textBaseline="top";m=b;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline= +"middle";b-=(e.length-1)*n/2;m=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=n*(e.length-1),m=b-this.state.fontSize}k=[];n=[];for(d=0;d<e.length;d++)n[d]=a,k[d]=this.ctx.measureText(e[d]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(n[d]-=k[d],f==mxConstants.ALIGN_CENTER&&(n[d]+=k[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=n[0];f=k[0];for(d=1;d<e.length;d++)a=Math.min(a,n[d]),f=Math.max(f,k[d]);this.ctx.save(); a=Math.round(a)-.5;m=Math.round(m)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,m,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,m,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(d=0;d<e.length;d++)this.ctx.fillText(e[d],n[d],b),b+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}}; mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,b){mxEventSource.call(this);this.ui=a;this.cookieName=b;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user}; DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}}; @@ -7070,7 +7070,7 @@ RealtimeMapping.prototype.installRealtimeCellListeners=function(a){a.addEventLis RealtimeMapping.prototype.handleValueChanged=function(a,b){var d=a.cell;if(!this.driveRealtime.isLocalEvent(b)&&null!=d){var c=b.newValue,e=b.property,f=this.beginUpdate();"type"==e?(d.vertex="vertex"==c,d.edge="edge"==c):"connectable"==e?d.connectable="1"==c:"source"==e||"target"==e?null==c?null!=b.oldValue&&f.setTerminal(d,null,"source"==e):null!=c.cell&&this.containsRealtimeCell(c)&&null!=f.getCell(c.cellId)?f.setTerminal(d,c.cell,"source"==e):(null!=a.parent&&(a.parent.children.removeValue(a),a.parent= null),f.setTerminal(d,null,"source"==e),f.remove(a.cell),a[e]=null):"value"==e?f.setValue(d,c):"xmlValue"==e?f.setValue(d,mxUtils.parseXml(c).documentElement):"style"==e?f.setStyle(d,c):"geometry"==e?(c=null!=c?this.driveRealtime.codec.decode(mxUtils.parseXml(c).documentElement):null,f.setGeometry(d,c)):"collapsed"==e?f.setCollapsed(d,"1"==c):"visible"==e?f.setVisible(d,"1"==c):"parent"==e&&(null!=b.oldValue?b.oldValue.children.removeValue(a):(this.createCell(a),this.restoreCell(a)),null==c?f.remove(d): (d=c.children.indexOf(a),0<=d&&f.add(c.cell,a.cell,d)))}}; -RealtimeMapping.prototype.handleValuesAdded=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var d=this.beginUpdate(),c=0;c<b.values.length;c++){var e=b.values[c];if(null!=e.parent)if(e.parent!=a)a.children.removeValue(e);else{if(null==e.cell||null==e.cell.parent)this.createCell(e),this.restoreCell(e);for(var f=a.children.indexOf(e),h=a.children.lastIndexOf(e);f!=h;)a.children.remove(h),h=a.children.lastIndexOf(e);e.parent==a&&d.add(a.cell,e.cell,Math.min(f,b.index+c))}}}; +RealtimeMapping.prototype.handleValuesAdded=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var d=this.beginUpdate(),c=0;c<b.values.length;c++){var e=b.values[c];if(null!=e.parent)if(e.parent!=a)a.children.removeValue(e);else{if(null==e.cell||null==e.cell.parent)this.createCell(e),this.restoreCell(e);for(var f=a.children.indexOf(e),k=a.children.lastIndexOf(e);f!=k;)a.children.remove(k),k=a.children.lastIndexOf(e);e.parent==a&&d.add(a.cell,e.cell,Math.min(f,b.index+c))}}}; RealtimeMapping.prototype.handleValuesRemoved=function(a,b){if(!this.driveRealtime.isLocalEvent(b))for(var d=this.beginUpdate(),c=0;c<b.values.length;c++){var e=b.values[c];if(null!=e.cell)if(null!=e.parent&&e.parent!=a&&e.cell.parent!=e.parent.cell){var f=e.parent.children.indexOf(e);d.add(e.parent.cell,e.cell,f)}else f=a.children.indexOf(e),0<=f&&d.add(a.cell,e.cell,f)}}; RealtimeMapping.prototype.realtimePageFormatChanged=function(a,b){if(null!=a){var d=a.split(",");1<d.length&&(this.isActive()?b?this.graph.pageFormat=new mxRectangle(0,0,parseInt(d[0]),parseInt(d[1])):(this.driveRealtime.ignorePageFormatChanged=!0,this.ui.setPageFormat(new mxRectangle(0,0,parseInt(d[0]),parseInt(d[1]))),this.driveRealtime.ignorePageFormatChanged=!1):null!=this.page.viewState&&(this.page.viewState.pageFormat=new mxRectangle(0,0,parseInt(d[0]),parseInt(d[1]))))}}; RealtimeMapping.prototype.realtimePageScaleChanged=function(a,b){null!=a&&(this.isActive()?b?this.graph.pageScale=parseFloat(a):(this.driveRealtime.ignorePageScaleChanged=!0,this.ui.setPageScale(parseFloat(a)),this.driveRealtime.ignorePageScaleChanged=!1):null!=this.page.viewState&&(this.page.viewState.pageScale=parseFloat(a)))}; @@ -7084,8 +7084,8 @@ RealtimeMapping.prototype.removeAllRealtimeCellListeners=function(a){if(null!=a) DriveFile.prototype.getPublicUrl=function(a){gapi.client.drive.permissions.list({fileId:this.desc.id}).execute(mxUtils.bind(this,function(b){if(null!=b&&null!=b.items)for(var d=0;d<b.items.length;d++)if("anyoneWithLink"===b.items[d].id||"anyone"===b.items[d].id){a(this.desc.webContentLink);return}a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};DriveFile.prototype.isAutosave=function(){return this.ui.editor.autosave||this.isAutosaveRevision()}; DriveFile.prototype.isAutosaveNow=function(){if(null!=this.realtime&&null!=this.realtime.root){var a=parseInt(this.realtime.root.get("backupDate")),b=parseInt(this.realtime.root.get("modifiedDate"));return isNaN(a)||isNaN(b)||a<b}return!0};DriveFile.prototype.autosaveCompleted=function(){null!=this.realtime&&null!=this.realtime.root&&this.realtime.root.set("backupDate",(new Date).getTime())}; DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.save=function(a,b,d,c){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(null,a,b,d,c)}; -DriveFile.prototype.saveFile=function(a,b,d,c,e){if(!this.isEditable())null!=d&&d();else if(!this.savingFile){this.savingFile=!0;var f=this.isModified,h=this.isModified();this.setModified(!1);this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;0!=a?(b&&(this.lastAutosaveRevision=(new Date).getTime()),this.desc=a,this.contentChanged(),null!=d&&d(a)):(this.setModified(h||this.isModified()),null!=c&&c())}),mxUtils.bind(this,function(a){this.savingFile=!1; -this.isModified=f;this.setModified(h||this.isModified());null!=c&&c(a)}),e,e)}};DriveFile.prototype.saveAs=function(a,b,d){this.ui.drive.copyFile(this.getId(),a,b,d)};DriveFile.prototype.rename=function(a,b,d){this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.desc=c,this.descriptorChanged(),null!=b&&b(c)):(this.desc=c,this.save(!0,b,d))}),d)}; +DriveFile.prototype.saveFile=function(a,b,d,c,e){if(!this.isEditable())null!=d&&d();else if(!this.savingFile){this.savingFile=!0;var f=this.isModified,k=this.isModified();this.setModified(!1);this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;0!=a?(b&&(this.lastAutosaveRevision=(new Date).getTime()),this.desc=a,this.contentChanged(),null!=d&&d(a)):(this.setModified(k||this.isModified()),null!=c&&c())}),mxUtils.bind(this,function(a){this.savingFile=!1; +this.isModified=f;this.setModified(k||this.isModified());null!=c&&c(a)}),e,e)}};DriveFile.prototype.saveAs=function(a,b,d){this.ui.drive.copyFile(this.getId(),a,b,d)};DriveFile.prototype.rename=function(a,b,d){this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.desc=c,this.descriptorChanged(),null!=b&&b(c)):(this.desc=c,this.save(!0,b,d))}),d)}; DriveFile.prototype.move=function(a,b,d){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=b&&b(a)}),d)};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id}; DriveFile.prototype.isEditable=function(){var a=DrawioFile.prototype.isEditable.apply(this,arguments);return null!=this.realtime?a&&!this.realtime.rtModel.isReadOnly:a&&this.desc.editable};DriveFile.prototype.open=function(){null!=this.realtime?this.realtime.start():DrawioFile.prototype.open.apply(this,arguments)};DriveFile.prototype.close=function(a){a=null!=a?a:!1;DrawioFile.prototype.close.apply(this,arguments);null!=this.realtime&&(this.realtime.destroy(a),this.realtime=null)};DriveLibrary=function(a,b,d){DriveFile.call(this,a,b);this.desc=d};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,b,d){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=b&&b(a)}),d)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);this.ui=a;this.ui.editor.chromeless&&"1"!=urlParams.rt?(this.appId="850530949725",this.clientId="850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","openid"],this.mimeType="all_types_supported"):this.ui.isDriveDomain()?(this.appId="671128082532",this.clientId="671128082532.apps.googleusercontent.com",this.mimeType="application/vnd.jgraph.mxfile.realtime"):(this.appId="420247213240",this.clientId="420247213240-hnbju1pt13seqrc1hhd5htpotk4g9q7u.apps.googleusercontent.com", this.mimeType="application/vnd.jgraph.mxfile.rtlegacy");this.mimeTypes="application/mxe,application/vnd.jgraph.mxfile,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy"};mxUtils.extend(DriveClient,mxEventSource); @@ -7098,9 +7098,9 @@ DriveClient.prototype.setUserId=function(a,b){if(b)if(isLocalStorage)localStorag DriveClient.prototype.getUserId=function(){var a=null;null!=this.user&&(a=this.user.id);null==a&&isLocalStorage&&(a=localStorage.getItem(".guid"));if(null==a&&"undefined"!=typeof Storage){for(var b=document.cookie.split(";"),d=0;d<b.length;d++){var c=mxUtils.trim(b[d]);if("GUID="==c.substring(0,5)){a=c.substring(5);break}}null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie="GUID=; expires="+b.toUTCString(),localStorage.setItem(".guid",a))}return a}; DriveClient.prototype.execute=function(a){var b=mxUtils.bind(this,function(b){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,d){this.authorize(!1,function(){null!=d&&d();a()},mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.ui.drive.clearUserId();this.ui.drive.setUser(null);gapi.auth.signOut();this.ui.showError(mxResources.get("error"), b,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,b)}; -DriveClient.prototype.executeRequest=function(a,b,d){var c=!0,e=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var h=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){c=!1;null!=d&&d({code:App.ERROR_TIMEOUT,retry:h})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(l){window.clearTimeout(e);c&&(null!=l&&null==l.error?null!=b&&b(l):null!=d&&null!=l&&null!=l.error&& -403==l.error.code&&("The requested mime type change is forbidden."==l.error.message||null!=l.error.data&&"domainPolicy"==l.error.data[0].reason)?d(l):null==l||null==l.error||401!=l.error.code&&403!=l.error.code?null!=l&&null!=l.error&&404!=l.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(h,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*1E3))):null!=d&&d(l):403==l.error.code&&null!=this.user?null!=d&&d(l):this.execute(h))}))});null==gapi.auth.getToken()? -this.execute(h):h()};DriveClient.prototype.authorize=function(a,b,d,c){var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=d&&d();else{var f={scope:this.scopes,client_id:this.clientId};a&&null!=e?(f.immediate=!0,f.user_id=e):(f.immediate=!1,f.authuser=-1);gapi.auth.authorize(f,mxUtils.bind(this,function(f){null!=f&&null==f.error?null!=this.user&&a&&this.user.id==e?null!=b&&b():this.updateUser(b,d,c):null!=d&&d(f);this.resetTokenRefresh(f)}))}}; +DriveClient.prototype.executeRequest=function(a,b,d){var c=!0,e=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){c=!1;null!=d&&d({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(l){window.clearTimeout(e);c&&(null!=l&&null==l.error?null!=b&&b(l):null!=d&&null!=l&&null!=l.error&& +403==l.error.code&&("The requested mime type change is forbidden."==l.error.message||null!=l.error.data&&"domainPolicy"==l.error.data[0].reason)?d(l):null==l||null==l.error||401!=l.error.code&&403!=l.error.code?null!=l&&null!=l.error&&404!=l.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*1E3))):null!=d&&d(l):403==l.error.code&&null!=this.user?null!=d&&d(l):this.execute(k))}))});null==gapi.auth.getToken()? +this.execute(k):k()};DriveClient.prototype.authorize=function(a,b,d,c){var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=d&&d();else{var f={scope:this.scopes,client_id:this.clientId};a&&null!=e?(f.immediate=!0,f.user_id=e):(f.immediate=!1,f.authuser=-1);gapi.auth.authorize(f,mxUtils.bind(this,function(f){null!=f&&null==f.error?null!=this.user&&a&&this.user.id==e?null!=b&&b():this.updateUser(b,d,c):null!=d&&d(f);this.resetTokenRefresh(f)}))}}; DriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=a&&null==a.error&&0<a.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(a.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*a.expires_in))}; DriveClient.prototype.checkToken=function(a){var b=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();b&&this.fireEvent(new mxEventObject("disconnected"))})):a()}; DriveClient.prototype.updateUser=function(a,b,d){var c=gapi.auth.getToken().access_token;this.ui.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json&access_token="+c,mxUtils.bind(this,function(c){var e=JSON.parse(c);this.executeRequest(gapi.client.drive.about.get(),mxUtils.bind(this,function(b){this.setUser(new DrawioUser(e.id,b.user.emailAddress,b.user.displayName,null!=b.user.picture?b.user.picture.url:null,e.locale));this.setUserId(e.id,d);null!=a&&a()}),b)}),b)}; @@ -7111,22 +7111,22 @@ a.downloadUrl+"&access_token="+gapi.auth.getToken().access_token,this.ui.convert a,c))}catch(m){d(m)}}),d)}else d({message:mxResources.get("loggedOut")})}),d)}; DriveClient.prototype.loadRealtime=function(a,b,d){if("1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType)if("850530949725"!=this.appId&&(a.editable||"application/mxe"!=a.mimeType&&"application/vnd.jgraph.mxfile"!=a.mimeType)){var c=mxUtils.bind(this,function(){var e=!0,f=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT,retry:c})}),this.ui.timeout);gapi.drive.realtime.load(a.id,mxUtils.bind(this, function(a){window.clearTimeout(f);e&&b(a)}))});c()}else b();else this.redirectToNewApp(d,a.id)}; -DriveClient.prototype.getXmlFile=function(a,b,d,c,e,f){var h=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+h,mxUtils.bind(this,function(h){if(null==h)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||f)a.mimeType!=this.libraryMimeType||f?d(new DriveLibrary(this.ui,h,a)):c({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var l=h.lastIndexOf(",");0<l&&(l=this.ui.extractGraphModelFromPng(h.substring(l+ -1)),null!=l&&0<l.length&&(h=l))}var g=new DriveFile(this.ui,h,a,b);!e&&"850530949725"!=this.appId&&g.isEditable()&&a.mimeType!=this.mimeType?this.saveFile(g,!0,mxUtils.bind(this,function(a){g.desc=a;d(g)}),c,!0):d(g)}}),c,"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))}; -DriveClient.prototype.saveFile=function(a,b,d,c,e,f){if(a.isEditable()){var h=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;f=null!=f?f:!1;var l=mxUtils.bind(this,function(e,k,l){var g={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null!=e||f||(e=this.placeholderThumbnail,k=this.placeholderMimeType),null!=e&&null!=k&&(g.thumbnail={image:e,mimeType:k}));var m=function(){a.saveDelay=(new Date).getTime()-h; +DriveClient.prototype.getXmlFile=function(a,b,d,c,e,f){var k=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+k,mxUtils.bind(this,function(k){if(null==k)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||f)a.mimeType!=this.libraryMimeType||f?d(new DriveLibrary(this.ui,k,a)):c({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var l=k.lastIndexOf(",");0<l&&(l=this.ui.extractGraphModelFromPng(k.substring(l+ +1)),null!=l&&0<l.length&&(k=l))}var g=new DriveFile(this.ui,k,a,b);!e&&"850530949725"!=this.appId&&g.isEditable()&&a.mimeType!=this.mimeType?this.saveFile(g,!0,mxUtils.bind(this,function(a){g.desc=a;d(g)}),c,!0):d(g)}}),c,"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))}; +DriveClient.prototype.saveFile=function(a,b,d,c,e,f){if(a.isEditable()){var k=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;f=null!=f?f:!1;var l=mxUtils.bind(this,function(e,h,l){var g={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null!=e||f||(e=this.placeholderThumbnail,h=this.placeholderMimeType),null!=e&&null!=h&&(g.thumbnail={image:e,mimeType:h}));var m=function(){a.saveDelay=(new Date).getTime()-k; d.apply(this,arguments)},n=mxUtils.bind(this,function(d,e){this.executeRequest(this.createUploadRequest(a.getId(),g,d,b||a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,e),m,c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(a,!0)}),c,this.ui.getCurrentFile()!=a?a.getData():null):n(a.getData(),!1)}),m=mxUtils.bind(this,function(){!f&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=urlParams.thumb&&this.ui.getThumbnail(this.thumbnailWidth, mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(n){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");l(b,"image/png")}))||l(null,null,a.constructor!=DriveLibrary)});e||!b?m():this.verifyMimeType(a.getId(),m,!0)}else this.ui.editor.graph.reset(),null!=c&&c({message:mxResources.get("readOnly")})}; DriveClient.prototype.verifyMimeType=function(a,b,d,c){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var e=(new Date).getTime();if(d||e-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=e,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(d){this.checkingMimeType=!1;null!=d&&"application/vnd.jgraph.mxfile.realtime"==d.mimeType?this.redirectToNewApp(c,a):null!= b&&b()})))}; DriveClient.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash".split(" "))+"#G"+b;null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=d}),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"), mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=d}))}}; -DriveClient.prototype.insertFile=function(a,b,d,c,e,f,h,l){f=null!=f?f:this.mimeType;l=null!=l?l:!0;a={mimeType:f,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,h),mxUtils.bind(this,function(a){f==this.libraryMimeType?c(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):l?this.loadRealtime(a,mxUtils.bind(this,function(d){null!=this.user?(d=new DriveFile(this.ui,b,a,d),d.lastAutosaveRevision= +DriveClient.prototype.insertFile=function(a,b,d,c,e,f,k,l){f=null!=f?f:this.mimeType;l=null!=l?l:!0;a={mimeType:f,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,k),mxUtils.bind(this,function(a){f==this.libraryMimeType?c(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):l?this.loadRealtime(a,mxUtils.bind(this,function(d){null!=this.user?(d=new DriveFile(this.ui,b,a,d),d.lastAutosaveRevision= (new Date).getTime(),c(d)):null!=e&&e({message:mxResources.get("loggedOut")})}),e):c(a)}),e)}; DriveClient.prototype.createUploadRequest=function(a,b,d,c,e){e=null!=e?e:!1;a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:{"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'},body:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(b)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!= d?e?d:Base64.encode(d):"")+"\r\n---------314159265358979323846--"};c||(a.params.newRevision=!1);a.params.supportsTeamDrives=!0;return gapi.client.request(a)}; DriveClient.prototype.pickFile=function(a,b){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,c=b?"genericPicker":"filePicker",e=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"== -mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[c].setVisible(!1))});if(null==this[c]||this[c+"Token"]!=a){this[c+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),h=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),f.setMimeTypes("*/*"),h.setMimeTypes("*/*")): -(a.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),h.setMimeTypes(this.mimeTypes));this[c]=(new google.picker.PickerBuilder).setOAuthToken(this[c+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(f).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document, +mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[c].setVisible(!1))});if(null==this[c]||this[c+"Token"]!=a){this[c+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),k=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),f.setMimeTypes("*/*"),k.setMimeTypes("*/*")): +(a.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes));this[c]=(new google.picker.PickerBuilder).setOAuthToken(this[c+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(f).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document, "click",e);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",e);this[c].setVisible(!0)}))}; DriveClient.prototype.pickFolder=function(a){this.folderPickerCallback=a;this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&mxUtils.bind(this,function(){this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,d=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",d),this.folderPicker.setVisible(!1))});if(null==this.folderPicker||this.folderPickerToken!= a){this.folderPickerToken=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),e=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");this.folderPicker= @@ -7137,119 +7137,119 @@ DriveClient.prototype.pickLibrary=function(a){this.filePickerCallback=a;this.fil e=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),f=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(this.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(d).addView(c).addView(e).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f).setCallback(mxUtils.bind(this, function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",a);this.libraryPicker.setVisible(!0)}))};DriveClient.prototype.showPermissions=function(a){this.checkToken(mxUtils.bind(this,function(){var b=new gapi.drive.share.ShareClient(this.appId);b.setOAuthToken(gapi.auth.getToken().access_token);b.setItemIds([a]);b.showSettingsDialog()}))};DropboxFile=function(a,b,d){DrawioFile.call(this,a,b);this.stat=d};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.stat.path_display.substring(1))};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};DropboxFile.prototype.isRenamable=function(){return!0}; DropboxFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};DropboxFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};DropboxFile.prototype.doSave=function(a,b,d){var c=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,arguments);this.stat.name=c;this.saveFile(a,!1,b,d)}; -DropboxFile.prototype.saveFile=function(a,b,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,h=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return h}});l();var m=mxUtils.bind(this,function(b){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile= -!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(h||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}c(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null):m(this.getData())}else null!= +DropboxFile.prototype.saveFile=function(a,b,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,k=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return k}});l();var m=mxUtils.bind(this,function(b){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile= +!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(k||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}c(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null):m(this.getData())}else null!= c&&c()}),this.getTitle()==a?b(!0):this.ui.dropbox.checkExists(a,b)):null!=d&&d()};DropboxFile.prototype.rename=function(a,b,d){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=b&&b()):(this.stat=c,this.descriptorChanged(),this.save(!0,b,d))}),d)};DropboxLibrary=function(a,b,d){DropboxFile.call(this,a,b,d)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".html";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4; DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))}; DropboxClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.usersGetCurrentAccount();f.then(mxUtils.bind(this,function(b){window.clearTimeout(e);c&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),a())}));f["catch"](mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(null==f||401!==f.status||d?b({message:mxResources.get("accessDenied")}):(this.setUser(null), this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)))}))}; -DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(h,l){if(c){window.onDropboxCallback=null;c=!1;try{null==h?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.client.setAccessToken(h), -this.setUser(null),e&&this.setPersistentToken(h),a())}catch(m){b(m)}finally{null!=l&&l.close()}}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onDropboxCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})}; -DropboxClient.prototype.executePromise=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(l);h&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);h&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null), +DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(k,l){if(c){window.onDropboxCallback=null;c=!1;try{null==k?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.client.setAccessToken(k), +this.setUser(null),e&&this.setPersistentToken(k),a())}catch(m){b(m)}finally{null!=l&&l.close()}}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onDropboxCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})}; +DropboxClient.prototype.executePromise=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(l);k&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null), f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},d):e(!1)};DropboxClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!0)}; -DropboxClient.prototype.getFile=function(a,b,d,c){c=null!=c?c:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e)if(null!=this.token){var f=a.split("/");this.ui.convertFile(a,0<f.length?f[f.length-1]:a,null,this.extension,b,d)}else d({message:mxResources.get("accessDenied")});else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(d,f){var h=e?d.lastIndexOf(","):-1,g=null; -0<h&&(h=this.ui.extractGraphModelFromPng(d.substring(h+1)),null!=h&&0<h.length?d=h:g=new LocalFile(this,d,a,!0));b(null!=g?g:c?new DropboxLibrary(this.ui,d,f):new DropboxFile(this.ui,d,f))}),d,e)}; -DropboxClient.prototype.readFile=function(a,b,d,c){var e=mxUtils.bind(this,function(h){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(a){}));g["catch"](function(a){window.clearTimeout(m);l&&null!=a&&409==a.status&&(l=!1,d({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(a);g.then(mxUtils.bind(this, -function(a){window.clearTimeout(m);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});c?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(q){d(q)}}}));g["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),h?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)}, +DropboxClient.prototype.getFile=function(a,b,d,c){c=null!=c?c:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var f=mxUtils.bind(this,function(){var c=a.split("/");this.ui.convertFile(a,0<c.length?c[c.length-1]:a,null,this.extension,b,d)});null!=this.token?f():this.authenticate(f,d)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(d,f){var k=e?d.lastIndexOf(","): +-1,g=null;0<k&&(k=this.ui.extractGraphModelFromPng(d.substring(k+1)),null!=k&&0<k.length?d=k:g=new LocalFile(this,d,a,!0));b(null!=g?g:c?new DropboxLibrary(this.ui,d,f):new DropboxFile(this.ui,d,f))}),d,e)}; +DropboxClient.prototype.readFile=function(a,b,d,c){var e=mxUtils.bind(this,function(k){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(a){}));g["catch"](function(a){window.clearTimeout(m);l&&null!=a&&409==a.status&&(l=!1,d({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(a);g.then(mxUtils.bind(this, +function(a){window.clearTimeout(m);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});c?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(q){d(q)}}}));g["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)}, d)})}):this.authenticate(function(){e(!0)},d)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},d,a):e(a)});null===this.client.getAccessToken()?this.authenticate(function(){f(!0)},d):f(!1)}; DropboxClient.prototype.checkExists=function(a,b,d){var c=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(c,mxUtils.bind(this,function(c){d?b(!1,!0,c):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){b(!0,!0,c)},function(){b(!1,!0,c)})}),function(a){b(!0,!1)})}; DropboxClient.prototype.renameFile=function(a,b,d,c){if(/[\\\/:\?\*"\|]/.test(b))c({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=b){var e=a.stat.path_display.substring(1),f=e.lastIndexOf("/");0<f&&(b=e.substring(0,f+1)+b)}null!=a&&null!=b&&a.stat.path_lower.substring(1)!==b.toLowerCase()?this.checkExists(b,mxUtils.bind(this,function(e,f,m){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+b,autorename:!1});this.executePromise(e, d,c)}),f&&m.path_lower.substring(1)!==b.toLowerCase()?(f=this.client.filesDelete({path:"/"+b.toLowerCase()}),this.executePromise(f,e,c)):e()):c()})):c({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,b,d,c){this.insertFile(a,b,d,c,!0)}; DropboxClient.prototype.insertFile=function(a,b,d,c,e){e=null!=e?e:!1;this.checkExists(a,mxUtils.bind(this,function(f){f?this.saveFile(a,b,mxUtils.bind(this,function(a){e?d(new DropboxLibrary(this.ui,b,a)):d(new DropboxFile(this.ui,b,a))}),c):c()}))}; DropboxClient.prototype.saveFile=function(a,b,d,c,e){/[\\\/:\?\*"\|]/.test(a)?c({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=b.length?c({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=e?e:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([b],{type:"text/plain"})}),this.executePromise(a,d,c))}; -DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(b){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),c=b[0].link.indexOf(this.appPath);if(0<c){var e=decodeURIComponent(b[0].link.substring(c+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(c,h){if(null!=h&&h.id==b[0].id)try{this.ui.spinner.stop(), -a(e.substring(1),new DropboxLibrary(this.ui,c,h))}catch(l){this.ui.handleError(l)}else this.createLibrary(b[0],a,d)}),d)}else this.createLibrary(b[0],a,d)}})})}; +DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(b){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),c=b[0].link.indexOf(this.appPath);if(0<c){var e=decodeURIComponent(b[0].link.substring(c+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(c,k){if(null!=k&&k.id==b[0].id)try{this.ui.spinner.stop(), +a(e.substring(1),new DropboxLibrary(this.ui,c,k))}catch(l){this.ui.handleError(l)}else this.createLibrary(b[0],a,d)}),d)}else this.createLibrary(b[0],a,d)}})})}; DropboxClient.prototype.createLibrary=function(a,b,d){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.loadUrl(a.link,mxUtils.bind(this,function(c){this.insertFile(a.name,c,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),b(a.getHash().substring(1),a)}catch(f){d(f)}}),d,!0)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))}; DropboxClient.prototype.pickFile=function(a,b){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,b){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):b.getHash(),null,b)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(b)this.ui.spinner.stop(),a(d[0].link);else{var c=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),e=mxUtils.bind(this, -function(b,c){this.ui.spinner.stop();a(b,c)}),f=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&f)e(d[0].link);else{var h=d[0].link.indexOf(this.appPath);if(0<h){var l=decodeURIComponent(d[0].link.substring(h+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(b,g){if(null!=g&&g.id==d[0].id){var h=f?b.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<h&&(h=this.ui.extractGraphModelFromPng(b.substring(h+ -1)),null!=h&&0<h.length?b=h:m=new LocalFile(this,b,l,!0));a(l.substring(1),null!=m?m:new DropboxFile(this.ui,b,g))}else this.createFile(d[0],e,c)}),c,f)}else this.createFile(d[0],e,c)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}; +function(b,c){this.ui.spinner.stop();a(b,c)}),f=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&f)e(d[0].link);else{var k=d[0].link.indexOf(this.appPath);if(0<k){var l=decodeURIComponent(d[0].link.substring(k+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(b,g){if(null!=g&&g.id==d[0].id){var k=f?b.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<k&&(k=this.ui.extractGraphModelFromPng(b.substring(k+ +1)),null!=k&&0<k.length?b=k:m=new LocalFile(this,b,l,!0));a(l.substring(1),null!=m?m:new DropboxFile(this.ui,b,g))}else this.createFile(d[0],e,c)}),c,f)}else this.createFile(d[0],e,c)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}; DropboxClient.prototype.createFile=function(a,b,d){var c=/(\.png)$/i.test(a.name);this.ui.loadUrl(a.link,mxUtils.bind(this,function(e){null!=e&&0<e.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var f=c?e.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(e.substring(f+1)),null!=f&&0<f.length&&(e=f));this.insertFile(a.name,e,mxUtils.bind(this,function(c){b(a.name,c)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})): (this.ui.spinner.stop(),d({message:mxResources.get("errorLoadingFile")}))}),d,c)};OneDriveFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.meta.id)};OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0}; OneDriveFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};OneDriveFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};OneDriveFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)}; -OneDriveFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});h();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile= -!1;this.isModified=e;this.setModified(f||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(a)}}))}else this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}));else null!=d&&d()}; +OneDriveFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});k();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile= +!1;this.isModified=e;this.setModified(f||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}c(a)}}))}else this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}));else null!=d&&d()}; OneDriveFile.prototype.rename=function(a,b,d){this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.meta=c,this.descriptorChanged(),null!=b&&b()):(this.meta=c,this.save(!0,b,d))}),d)};OneDriveFile.prototype.move=function(a,b,d){this.ui.oneDrive.moveFile(this.meta.id,a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=b&&b(a)}),d)};OneDriveLibrary=function(a,b,d){OneDriveFile.call(this,a,b,d)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"odauth");this.token=this.token};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId="test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395";OneDriveClient.prototype.scopes="user.read";OneDriveClient.prototype.redirectUri="https://"+window.location.hostname+"/onedrive3.html";OneDriveClient.prototype.extension=".html";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0"; OneDriveClient.prototype.get=function(a,b,d){a=new mxXmlRequest(a,null,"GET");a.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Authorization","Bearer "+this.token)});a.send(b,d);return a}; OneDriveClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(200>f.getStatus()||300<=f.getStatus()?d?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):(f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,null,f.displayName)), a()))}),b)}; -OneDriveClient.prototype.authenticate=function(a,b){if(null==window.onOneDriveCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){var h="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=token&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&response_mode=fragment",h=window.open(h,"odauth",["width=525,height=525","top="+(window.screenY+ -Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=h&&(window.onOneDriveCallback=mxUtils.bind(this,function(h,m){if(c){window.onOneDriveCallback=null;c=!1;try{null==h?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.setUser(null),this.token=h,e&&this.setPersistentToken(h),a())}catch(g){b(g)}finally{null!=m&&m.close()}}else null!=m&&m.close()}),h.focus())}), +OneDriveClient.prototype.authenticate=function(a,b){if(null==window.onOneDriveCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=token&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&response_mode=fragment",k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+ +Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,m){if(c){window.onOneDriveCallback=null;c=!1;try{null==k?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.setUser(null),this.token=k,e&&this.setPersistentToken(k),a())}catch(g){b(g)}finally{null!=m&&m.close()}}else null!=m&&m.close()}),k.focus())}), mxUtils.bind(this,function(){c&&(window.onOneDriveCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})}; -OneDriveClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);h&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this, +OneDriveClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this, function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d)):d(this.parseRequestText(a)))}),d)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};OneDriveClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!1,!0)}; OneDriveClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;this.executeRequest(this.baseUrl+"/me/drive/items/"+a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var c=JSON.parse(a.getText()),f=/\.png$/i.test(c.name);if(/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(c["@microsoft.graph.downloadUrl"],c.name,null!=c.file?c.file.mimeType:null,this.extension,b,d);else{var m=!0,g=window.setTimeout(mxUtils.bind(this, -function(){m=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(c["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(g);if(m){var d=f?a.lastIndexOf(","):-1,h=null;0<d&&(d=this.ui.extractGraphModelFromPng(a.substring(d+1)),null!=d&&0<d.length?a=d:h=new LocalFile(this.ui,a,c.name,!0));null!=h?b(h):e?b(new OneDriveLibrary(this.ui,a,c)):b(new OneDriveFile(this.ui,a,c))}}),mxUtils.bind(this,function(a){window.clearTimeout(g);m&&d(this.parseRequestText(a))}), +function(){m=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(c["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(g);if(m){var d=f?a.lastIndexOf(","):-1,k=null;0<d&&(d=this.ui.extractGraphModelFromPng(a.substring(d+1)),null!=d&&0<d.length?a=d:k=new LocalFile(this.ui,a,c.name,!0));null!=k?b(k):e?b(new OneDriveLibrary(this.ui,a,c)):b(new OneDriveFile(this.ui,a,c))}}),mxUtils.bind(this,function(a){window.clearTimeout(g);m&&d(this.parseRequestText(a))}), f||null!=c.file&&null!=c.file.mimeType&&"image/"==c.file.mimeType.substring(0,6))}}else d(this.parseRequestText(a))}),d)};OneDriveClient.prototype.renameFile=function(a,b,d,c){null!=a&&null!=b&&this.checkExists(a.meta.parentReference.id,b,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.baseUrl+"/me/drive/items/"+a.meta.id,JSON.stringify({name:b}),"PATCH","application/json",d,c):c()}))}; OneDriveClient.prototype.moveFile=function(a,b,d,c){this.writeFile(this.baseUrl+"/me/drive/items/"+a,JSON.stringify({parentReference:{id:b}}),"PATCH","application/json",d,c)};OneDriveClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)}; -OneDriveClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;this.checkExists(f,a,!0,mxUtils.bind(this,function(h){h?this.writeFile(this.baseUrl+(null!=f?"/me/drive/items/"+f:"/me/drive/root")+"/children/"+a+"/content",b,"PUT",null,mxUtils.bind(this,function(a){e?d(new OneDriveLibrary(this.ui,b,a)):d(new OneDriveFile(this.ui,b,a))}),c):c()}))}; +OneDriveClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;this.checkExists(f,a,!0,mxUtils.bind(this,function(k){k?this.writeFile(this.baseUrl+(null!=f?"/me/drive/items/"+f:"/me/drive/root")+"/children/"+a+"/content",b,"PUT",null,mxUtils.bind(this,function(a){e?d(new OneDriveLibrary(this.ui,b,a)):d(new OneDriveFile(this.ui,b,a))}),c):c()}))}; OneDriveClient.prototype.checkExists=function(a,b,d,c){this.executeRequest(this.baseUrl+(null!=a?"/me/drive/items/"+a:"/me/drive/root")+"/children/"+b,mxUtils.bind(this,function(a){404==a.getStatus()?c(!0):d?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[b]),function(){c(!0)},function(){c(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)}))}),function(a){c(!1)},!0)}; OneDriveClient.prototype.saveFile=function(a,b,d){var c=mxUtils.bind(this,function(c){this.writeFile(this.baseUrl+"/me/drive/items/"+a.meta.id+"/content/",c,"PUT",null,b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){c(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=a?a.getData():null):c(a.getData())}; -OneDriveClient.prototype.writeFile=function(a,b,d,c,e,f){if(null!=a&&null!=b){var h=mxUtils.bind(this,function(m){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout),n=new mxXmlRequest(a,b,d);n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",c||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});n.send(mxUtils.bind(this,function(a){window.clearTimeout(k);g&&(200<=a.getStatus()&&299>=a.getStatus()? -e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,m?f({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){l(!0)},f)})}):this.authenticate(function(){h(!0)},f)):f(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(k);g&&f(this.parseRequestText(a))}))}),l=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){l(!0)},f,a):h(a)});null==this.token? +OneDriveClient.prototype.writeFile=function(a,b,d,c,e,f){if(null!=a&&null!=b){var k=mxUtils.bind(this,function(m){var g=!0,h=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout),n=new mxXmlRequest(a,b,d);n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",c||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});n.send(mxUtils.bind(this,function(a){window.clearTimeout(h);g&&(200<=a.getStatus()&&299>=a.getStatus()? +e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,m?f({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){l(!0)},f)})}):this.authenticate(function(){k(!0)},f)):f(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(h);g&&f(this.parseRequestText(a))}))}),l=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){l(!0)},f,a):k(a)});null==this.token? this.authenticate(function(){l(!0)},f):l(!1)}else f({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var b={message:mxResources.get("unknownError")};try{b=JSON.parse(a.getText())}catch(d){}return b};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(a)}; OneDriveClient.prototype.pickFolder=function(a){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{redirectUri:this.redirectUri},success:mxUtils.bind(this,function(b){this.token=b.accessToken;a(b)}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})}; OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{redirectUri:this.redirectUri},success:mxUtils.bind(this,function(b){null!=b&&null!=b.value&&0<b.value.length&&(this.token=b.accessToken,a(b.value[0].id,b))}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})}; OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}this.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):""))}; GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(b){a(200<=b.getStatus()&&299>=b.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1}; GitHubFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};GitHubFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};GitHubFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)}; -GitHubFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});h();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url; -this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(f||this.isModified());this.isModified()&&this.addUnsavedStatus();if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(a)}}))}else this.ui.pickFolder(App.MODE_GITHUB,mxUtils.bind(this,function(b){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile= +GitHubFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});k();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url; +this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(f||this.isModified());this.isModified()&&this.addUnsavedStatus();if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}c(a)}}))}else this.ui.pickFolder(App.MODE_GITHUB,mxUtils.bind(this,function(b){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile= !1;null!=c&&c()}),!1,b)}));else null!=d&&d()};GitHubLibrary=function(a,b,d){GitHubFile.call(this,a,b,d)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a){DrawioClient.call(this,a,"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".xml";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6; GitHubClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(401===f.getStatus()?d?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):200>f.getStatus()||300<=f.getStatus()?b({message:mxResources.get("accessDenied")}): (f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,f.email,f.name)),a()))}))}; -GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(h,l){if(c)if(window.onGitHubCallback=null,c=!1,null==h)b({message:mxResources.get("accessDenied"),retry:d});else{var m=mxUtils.bind(this,function(){var c= -!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+h,mxUtils.bind(this,function(g){window.clearTimeout(d);if(c)try{if(200>g.getStatus()||300<=g.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=f&&f();var h=g.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(t){b(t)}finally{null!=l&& +GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,l){if(c)if(window.onGitHubCallback=null,c=!1,null==k)b({message:mxResources.get("accessDenied"),retry:d});else{var m=mxUtils.bind(this,function(){var c= +!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(g){window.clearTimeout(d);if(c)try{if(200>g.getStatus()||300<=g.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=f&&f();var k=g.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(t){b(t)}finally{null!=l&& l.close()}}))});m()}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onGitHubCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})}; -GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(h)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this, -function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var g=!1;try{var k=JSON.parse(a.getText());null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code)}catch(n){}d({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:mxResources.get("fileNotFound")}):409===a.getStatus()?d({status:409}):d({message:mxResources.get("error")+" "+a.getStatus()})}),d)}),e=mxUtils.bind(this, +GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(k)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this, +function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var g=!1;try{var h=JSON.parse(a.getText());null!=h&&null!=h.errors&&0<h.errors.length&&(g="too_large"==h.errors[0].code)}catch(n){}d({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:mxResources.get("fileNotFound")}):409===a.getStatus()?d({status:409}):d({message:mxResources.get("error")+" "+a.getStatus()})}),d)}),e=mxUtils.bind(this, function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};GitHubClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!0)}; -GitHubClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;var f=a.split("/"),h=f[0],l=f[1],m=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);!e&&(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&f)?null!=this.token?(e=this.baseUrl+"/repos/"+h+"/"+l+"/contents/"+a+"?ref="+m+"&token="+this.token,f=a.split("/"),this.ui.convertFile(e,0<f.length?f[f.length-1]:a,null,this.extension,b,d)):d({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+ -"/repos/"+h+"/"+l+"/contents/"+a+"?ref="+m,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(h,l,m,JSON.parse(a.getText()),c))}catch(k){d(k)}}),d))}; +GitHubClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;var f=a.split("/"),k=f[0],l=f[1],m=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);!e&&(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&f)?null!=this.token?(e=this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+m+"&token="+this.token,f=a.split("/"),this.ui.convertFile(e,0<f.length?f[f.length-1]:a,null,this.extension,b,d)):d({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+ +"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+m,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(k,l,m,JSON.parse(a.getText()),c))}catch(h){d(h)}}),d))}; GitHubClient.prototype.createGitHubFile=function(a,b,d,c,e){a={org:a,repo:b,ref:d,name:c.name,path:c.path,sha:c.sha,html_url:c.html_url,download_url:c.download_url};b=c.content;"base64"===c.encoding&&(/\.jpe?g$/i.test(c.name)?b="data:image/jpeg;base64,"+b:/\.gif$/i.test(c.name)?b="data:image/gif;base64,"+b:/\.png$/i.test(c.name)?(c=this.ui.extractGraphModelFromPng(b),b=null!=c&&0<c.length?c:"data:image/png;base64,"+b):b=Base64.decode(b));return e?new GitHubLibrary(this.ui,b,a):new GitHubFile(this.ui, b,a)};GitHubClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e,!1)}; -GitHubClient.prototype.insertFile=function(a,b,d,c,e,f,h){e=null!=e?e:!1;f=f.split("/");var l=f[0],m=f[1],g=f[2],k=f.slice(3,f.length).join("/");0<k.length&&(k+="/");k+=a;this.checkExists(l+"/"+m+"/"+g+"/"+k,!0,mxUtils.bind(this,function(f,q){f?e?(h||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,m,g,k,a,b,q,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(l,m,g,b.content,e))}catch(z){c(z)}}),c)}),c)):d(new GitHubFile(this.ui, -b,{org:l,repo:m,ref:g,name:a,path:k,sha:q,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,b,d,c){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}; -GitHubClient.prototype.writeFile=function(a,b,d,c,e,f,h,l,m){f.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(d={path:c,branch:decodeURIComponent(d),message:e,content:f},null!=h&&(d.sha=h),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+c,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),m))}; +GitHubClient.prototype.insertFile=function(a,b,d,c,e,f,k){e=null!=e?e:!1;f=f.split("/");var l=f[0],m=f[1],g=f[2],h=f.slice(3,f.length).join("/");0<h.length&&(h+="/");h+=a;this.checkExists(l+"/"+m+"/"+g+"/"+h,!0,mxUtils.bind(this,function(f,q){f?e?(k||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,m,g,h,a,b,q,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(l,m,g,b.content,e))}catch(y){c(y)}}),c)}),c)):d(new GitHubFile(this.ui, +b,{org:l,repo:m,ref:g,name:a,path:h,sha:q,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,b,d,c){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}; +GitHubClient.prototype.writeFile=function(a,b,d,c,e,f,k,l,m){f.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(d={path:c,branch:decodeURIComponent(d),message:e,content:f},null!=k&&(d.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+c,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),m))}; GitHubClient.prototype.checkExists=function(a,b,d){this.getFile(a,mxUtils.bind(this,function(c){if(b&&null!=c.meta){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();d(!0,c.meta.sha)},function(){e();d(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)})}),mxUtils.bind(this,function(a){d(!0)}),null,!0)}; -GitHubClient.prototype.saveFile=function(a,b,d){var c=a.meta.org,e=a.meta.repo,f=a.meta.ref,h=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(g,k){this.writeFile(c,e,f,h,l,k,g,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"), -mxResources.get("cancel"),mxUtils.bind(this,function(){d()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(c+"/"+e+"/"+f+"/"+h,mxUtils.bind(this,function(a){m(a.meta.sha,k)}),mxUtils.bind(this,function(){m(null,k)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):d(a)}))});this.ui.useCanvasForExport&&/(\.png)$/i.test(h)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):m(a.meta.sha, +GitHubClient.prototype.saveFile=function(a,b,d){var c=a.meta.org,e=a.meta.repo,f=a.meta.ref,k=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(g,h){this.writeFile(c,e,f,k,l,h,g,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"), +mxResources.get("cancel"),mxUtils.bind(this,function(){d()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(c+"/"+e+"/"+f+"/"+k,mxUtils.bind(this,function(a){m(a.meta.sha,h)}),mxUtils.bind(this,function(){m(null,h)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):d(a)}))});this.ui.useCanvasForExport&&/(\.png)$/i.test(k)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):m(a.meta.sha, Base64.encode(a.getData()))}),mxUtils.bind(this,function(){d()}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)}; -GitHubClient.prototype.showGitHubDialog=function(a,b){var d=null,c=null,e=null,f=null,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";h.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height="194px"; -h.appendChild(m);var g=new CustomDialog(this.ui,h,mxUtils.bind(this,function(){b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+f)}));this.ui.showDialog(g.container,340,270,!0,!0);a&&g.okButton.parentNode.removeChild(g.okButton);var k=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(k(d+ -"/"+c,mxUtils.bind(this,function(){f=null;y()})));a||(mxUtils.write(b," / "),b.appendChild(k(decodeURIComponent(e),mxUtils.bind(this,function(){f=null;z()}))));if(null!=f&&0<f.length){var g=f.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(k(g[a],mxUtils.bind(this,function(){f=g.slice(0,a+1).join("/");t()})))})(a)}m.appendChild(b)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()? -(f=e=c=d=null,y()):this.ui.hideDialog()}))}),t=mxUtils.bind(this,function(){var h=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(e),null,"GET");g.okButton.removeAttribute("disabled");m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(h,mxUtils.bind(this,function(g){n();this.ui.spinner.stop();var h=JSON.parse(g.getText());m.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,y();else{var a=f.split("/"); -f=a.slice(0,a.length-1).join("/");t()}})));mxUtils.br(m);null==h||0==h.length?mxUtils.write(m,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var l=0;l<h.length;l++)mxUtils.bind(this,function(h){g==("dir"==h.type)&&(m.appendChild(k(h.name+("dir"==h.type?"/":""),mxUtils.bind(this,function(){"dir"==h.type?(f=h.path,t()):a&&"file"==h.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+h.path))}))),mxUtils.br(m))})(h[l])}),g(!0),a&&g(!1))}),q)}),p=null,v=null,z=mxUtils.bind(this, -function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/branches?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(m, -"scroll",v);z(a+1)});mxEvent.addListener(p,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),m.appendChild(k("../ [Up]",mxUtils.bind(this,function(){f=null;y()}))),mxUtils.br(m));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){m.appendChild(k(a.name,mxUtils.bind(this,function(){e=a.name;f="";t()})));mxUtils.br(m)})(b[c]);100==b.length&&(m.appendChild(p), -v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&h()},mxEvent.addListener(m,"scroll",v))}}),q)}),y=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);"); -mxUtils.write(p,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",v);y(a+1)});mxEvent.addListener(p,"click",h);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(k(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this, -function(a){if(null!=a){var b=a.split("/");if(1<b.length){a=b[0];var g=b[1];3>b.length?(d=a,c=g,f=e=null,z()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+g+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;e=decodeURIComponent(a.meta.ref);f="";t()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(), -this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){m.appendChild(k(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;e=a.default_branch;f="";t()})));mxUtils.br(m)})(b[g])}100==b.length&&(m.appendChild(p),v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&h()},mxEvent.addListener(m,"scroll", -v))}),q)});y()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1}; +GitHubClient.prototype.showGitHubDialog=function(a,b){var d=null,c=null,e=null,f=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height="194px"; +k.appendChild(m);var g=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+f)}));this.ui.showDialog(g.container,340,270,!0,!0);a&&g.okButton.parentNode.removeChild(g.okButton);var h=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(h(d+ +"/"+c,mxUtils.bind(this,function(){f=null;z()})));a||(mxUtils.write(b," / "),b.appendChild(h(decodeURIComponent(e),mxUtils.bind(this,function(){f=null;y()}))));if(null!=f&&0<f.length){var g=f.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(h(g[a],mxUtils.bind(this,function(){f=g.slice(0,a+1).join("/");t()})))})(a)}m.appendChild(b)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()? +(f=e=c=d=null,z()):this.ui.hideDialog()}))}),t=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(e),null,"GET");g.okButton.removeAttribute("disabled");m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(g){n();this.ui.spinner.stop();var k=JSON.parse(g.getText());m.appendChild(h("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,z();else{var a=f.split("/"); +f=a.slice(0,a.length-1).join("/");t()}})));mxUtils.br(m);null==k||0==k.length?mxUtils.write(m,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var l=0;l<k.length;l++)mxUtils.bind(this,function(k){g==("dir"==k.type)&&(m.appendChild(h(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(f=k.path,t()):a&&"file"==k.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+k.path))}))),mxUtils.br(m))})(k[l])}),g(!0),a&&g(!1))}),q)}),p=null,v=null,y=mxUtils.bind(this, +function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/branches?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m, +"scroll",v);y(a+1)});mxEvent.addListener(p,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),m.appendChild(h("../ [Up]",mxUtils.bind(this,function(){f=null;z()}))),mxUtils.br(m));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){m.appendChild(h(a.name,mxUtils.bind(this,function(){e=a.name;f="";t()})));mxUtils.br(m)})(b[c]);100==b.length&&(m.appendChild(p), +v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",v))}}),q)}),z=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);"); +mxUtils.write(p,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",v);z(a+1)});mxEvent.addListener(p,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(h(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this, +function(a){if(null!=a){var b=a.split("/");if(1<b.length){a=b[0];var g=b[1];3>b.length?(d=a,c=g,f=e=null,y()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+g+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;e=decodeURIComponent(a.meta.ref);f="";t()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(), +this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){m.appendChild(h(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;e=a.default_branch;f="";t()})));mxUtils.br(m)})(b[g])}100==b.length&&(m.appendChild(p),v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll", +v))}),q)});z()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1}; TrelloFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};TrelloFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};TrelloFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)}; -TrelloFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),h=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});h();this.ui.trello.saveFile(this,mxUtils.bind(this,function(f){this.savingFile=!1;this.isModified=e;this.meta=f;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&& -(this.saveNeededCounter--,this.saveFile(a,b,d,c))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(f||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){h();b()}}c(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a, +TrelloFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(f){this.savingFile=!1;this.isModified=e;this.meta=f;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&& +(this.saveNeededCounter--,this.saveFile(a,b,d,c))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(f||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}c(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a, b,d,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,e)}));else null!=d&&d()};TrelloLibrary=function(a,b,d){TrelloFile.call(this,a,b,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml"; TrelloClient.prototype.authenticate=function(a,b,d){d&&this.logout();d=mxUtils.bind(this,function(c,d){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=d&&d();a()},error:function(){null!=d&&d();null!=b&&b(mxResources.get("loggedOut"))}})});this.isAuthorized()?d(!0):this.ui.showAuthDialog(this,!0,d)};TrelloClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!1,!0)}; TrelloClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;var f=mxUtils.bind(this,function(){var c=a.split(this.SEPARATOR),l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(m);if(l){var g=/\.png$/i.test(c.name);/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url), c.name,c.mimeType,this.extension,b,d):(l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(m);if(l){c.compoundId=a;var f=g?d.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(d.substring(f+1)),null!=f&&0<f.length&&(d=f));e?b(new TrelloLibrary(this.ui,d,c)):b(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(a,b){window.clearTimeout(m); l&&(401==b.status?this.authenticate(f,d,!0):d())}),g||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(401==a.status?this.authenticate(f,d,!0):d())}))});this.authenticate(f,d)};TrelloClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)}; -TrelloClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;var h=mxUtils.bind(this,function(){var h=mxUtils.bind(this,function(h){this.writeFile(a,h,f,mxUtils.bind(this,function(a){e?d(new TrelloLibrary(this.ui,b,a)):d(new TrelloFile(this.ui,b,a))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){h(this.ui.base64ToBlob(a,"image/png"))}),c,b):h(b)});this.authenticate(h,c)}; +TrelloClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;var k=mxUtils.bind(this,function(){var k=mxUtils.bind(this,function(k){this.writeFile(a,k,f,mxUtils.bind(this,function(a){e?d(new TrelloLibrary(this.ui,b,a)):d(new TrelloFile(this.ui,b,a))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(this.ui.base64ToBlob(a,"image/png"))}),c,b):k(b)});this.authenticate(k,c)}; TrelloClient.prototype.saveFile=function(a,b,d){var c=a.meta.compoundId.split(this.SEPARATOR),e=mxUtils.bind(this,function(e){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){this.writeFile(a.meta.name,e,c[0],b,d)}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(f,d,!0):d()}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}), d,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())});this.authenticate(f,d)}; -TrelloClient.prototype.writeFile=function(a,b,d,c,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var h=!0,l=window.setTimeout(mxUtils.bind(this,function(){h=!1;e({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof b?new Blob([b]):b,a);m.append("name", -a);var g=new XMLHttpRequest;g.responseType="json";g.onreadystatechange=mxUtils.bind(this,function(){if(4===g.readyState&&(window.clearTimeout(l),h))if(200==g.status){var a=g.response;a.compoundId=d+this.SEPARATOR+a.id;c(a)}else 401==g.status?this.authenticate(f,e,!0):e()});g.open("POST",this.baseUrl+"cards/"+d+"/attachments");g.send(m)});this.authenticate(f,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)}; +TrelloClient.prototype.writeFile=function(a,b,d,c,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;e({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof b?new Blob([b]):b,a);m.append("name", +a);var g=new XMLHttpRequest;g.responseType="json";g.onreadystatechange=mxUtils.bind(this,function(){if(4===g.readyState&&(window.clearTimeout(l),k))if(200==g.status){var a=g.response;a.compoundId=d+this.SEPARATOR+a.id;c(a)}else 401==g.status?this.authenticate(f,e,!0):e()});g.open("POST",this.baseUrl+"cards/"+d+"/attachments");g.send(m)});this.authenticate(f,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)}; TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))}; -TrelloClient.prototype.showTrelloDialog=function(a,b){var d=null,c="@me",e=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var h=document.createElement("h3");mxUtils.write(h,a?mxResources.get("selectFile"):mxResources.get("selectCard"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(h);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height= +TrelloClient.prototype.showTrelloDialog=function(a,b){var d=null,c="@me",e=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height= "194px";f.appendChild(l);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var m=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");if(null!=c){var g=document.createElement("img");g.src=c.url;g.width=c.width;g.height= -c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),g=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),k=mxUtils.bind(this,function(){e=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"}, +c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),g=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),h=mxUtils.bind(this,function(){e=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"}, mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(m("../ [Up]",mxUtils.bind(this,function(){t()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){l.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[c])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,g,!0): -null!=g&&g(b)}))});a()}),n=null,q=null,t=mxUtils.bind(this,function(f){null==f&&(e=0,l.innerHTML="",f=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var h=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",q);t(f+1)});mxEvent.addListener(n,"click",h);var p=mxUtils.bind(this,function(){Trello.get("search", +null!=g&&g(b)}))});a()}),n=null,q=null,t=mxUtils.bind(this,function(f){null==f&&(e=0,l.innerHTML="",f=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",q);t(f+1)});mxEvent.addListener(n,"click",k);var p=mxUtils.bind(this,function(){Trello.get("search", {query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==f&&(l.appendChild(m(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(c=a,t())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards"); -this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var g=0;g<e.length;g++)mxUtils.bind(this,function(c){l.appendChild(m(c.name,mxUtils.bind(this,function(){a?(d=c.id,k()):(this.ui.hideDialog(),b(c.id))})))})(e[g]);100==e.length&&(l.appendChild(n),q=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&h()},mxEvent.addListener(l,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(p,g,!0):null!=g&&g({message:a.responseText})}))});p()});t()}; -TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};function ChatWindow(a,b,d,c,e,f,h,l){this.editorUi=a;this.doc=l.doc;this.rtModel=l.rt;this.chatHistory=l.chatHistory;this.chatMap=l.chatMap;this.configCollabInfo();d=document.createElement("div");d.id="mainDiv";l=document.createElement("div");l.style.padding="3px";d.appendChild(l);var m=document.createElement("div");m.style.paddingLeft="3px";m.style.paddingRight="15px";a.editor.graph.isEnabled()&&d.appendChild(m);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white"; +this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var g=0;g<e.length;g++)mxUtils.bind(this,function(c){l.appendChild(m(c.name,mxUtils.bind(this,function(){a?(d=c.id,h()):(this.ui.hideDialog(),b(c.id))})))})(e[g]);100==e.length&&(l.appendChild(n),q=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(p,g,!0):null!=g&&g({message:a.responseText})}))});p()});t()}; +TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};function ChatWindow(a,b,d,c,e,f,k,l){this.editorUi=a;this.doc=l.doc;this.rtModel=l.rt;this.chatHistory=l.chatHistory;this.chatMap=l.chatMap;this.configCollabInfo();d=document.createElement("div");d.id="mainDiv";l=document.createElement("div");l.style.padding="3px";d.appendChild(l);var m=document.createElement("div");m.style.paddingLeft="3px";m.style.paddingRight="15px";a.editor.graph.isEnabled()&&d.appendChild(m);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white"; this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";l.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat= -"right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));m.appendChild(this.chatLineArea);m.appendChild(this.sendBtn);this.window=new mxWindow(b,d,c,e,f,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0); +"right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));m.appendChild(this.chatLineArea);m.appendChild(this.sendBtn);this.window=new mxWindow(b,d,c,e,f,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0); this.handleResize();this.window.addListener(mxEvent.RESIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.MAXIMIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,this.handleResize));if(null!=this.chatHistory){for(a=Math.max(0,this.chatHistory.length-this.chatHistoryShow);a<this.chatHistory.length;a++)this.updateChatArea(this.chatHistory.get(a));this.chatHistory.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED,mxUtils.bind(this, function(a){this.updateChatArea(a.target.get(a.index))}))}this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_JOINED,mxUtils.bind(this,this.collaboratorListener));this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_LEFT,mxUtils.bind(this,this.collaboratorListener));null!=this.chatMap&&this.chatMap.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,mxUtils.bind(this,function(a){this.updateChatArea(a.target.get(a.property))}))} ChatWindow.prototype.window=null;ChatWindow.prototype.doc=null;ChatWindow.prototype.chatHistory=null;ChatWindow.prototype.chatMap=null;ChatWindow.prototype.chatHistoryShow=10;ChatWindow.prototype.chatHistorySize=0;ChatWindow.prototype.setChatMap=function(a){this.chatMap=a}; @@ -7268,16 +7268,16 @@ App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage "#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js",null,null,null,mxClient.IS_SVG):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"== window.location.hash.substring(0,2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient= null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})(); -App.main=function(a,b){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,e,f){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var g=new Image,h=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";g.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+h+"&v="+encodeURIComponent(EditorUi.VERSION)+ -"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(v){}});if(null!=window.mxscript){if("1"==urlParams.offline){mxscript("js/shapes.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height","0");c.setAttribute("src","offline.html");document.body.appendChild(c)}if("0"!=urlParams.plugins&& -"1"!=urlParams.offline){var c=mxSettings.getPlugins(),e=urlParams.p;App.initPluginCallback();if(null!=e){var f="";"1"==urlParams.drawdev&&(f=document.location.protocol+"//drawhost.jgraph.com/");for(var h=e.split(";"),e=0;e<h.length;e++){var l=App.pluginRegistry[h[e]];null!=l?mxscript(f+l):null!=window.console&&console.log("Unknown plugin:",h[e])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);if(null!=c&&0<c.length&&"0"!=urlParams.plugins){f= -window.location.protocol+"//"+window.location.host;h=!0;for(e=0;e<c.length&&h;e++)"/"!=c[e].charAt(0)&&c[e].substring(0,f.length)!=f&&(h=!1);if(h||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[c.join("\n")]).replace(/\\n/g,"\n")))for(e=0;e<c.length;e++)try{mxscript(c[e])}catch(m){}}}"function"=== -typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();mxResources.loadDefaultBundle=!1;c=mxResources.getDefaultBundle(RESOURCE_BASE, -mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[c]:[c,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText());1<c.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=c[1].getDocumentElement());c=null!=b?b():new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&& -("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&& -("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")|| -10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))}, -function(){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; +App.main=function(a,b){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,e,f){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var g=new Image,k=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";g.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+ +"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(v){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height", +"0");c.setAttribute("src","offline.html");document.body.appendChild(c)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var c=mxSettings.getPlugins(),e=urlParams.p;App.initPluginCallback();if(null!=e){var f="";"1"==urlParams.drawdev&&(f=document.location.protocol+"//drawhost.jgraph.com/");for(var k=e.split(";"),e=0;e<k.length;e++){var l=App.pluginRegistry[k[e]];null!=l?mxscript(f+l):null!=window.console&&console.log("Unknown plugin:",k[e])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL, +null,null,null,mxClient.IS_SVG);if(null!=c&&0<c.length&&"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;k=!0;for(e=0;e<c.length&&k;e++)"/"!=c[e].charAt(0)&&c[e].substring(0,f.length)!=f&&(k=!1);if(k||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[c.join("\n")]).replace(/\\n/g, +"\n")))for(e=0;e<c.length;e++)try{mxscript(c[e])}catch(m){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath(); +mxResources.loadDefaultBundle=!1;c=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[c]:[c,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText());1<c.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=c[1].getDocumentElement());c=null!=b?b():new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"=== +typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"=== +typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!= +urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:", +"1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=": IMAGE_PATH+"/chevron-up.png"; App.prototype.chevronDownImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC":IMAGE_PATH+ @@ -7298,9 +7298,9 @@ IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.ge App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname}; App.prototype.checkLicense=function(){var a=this.drive.getUser(),b=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=b){var d=b.lastIndexOf("@"),c=b;0<=d&&(c=b.substring(d+1));mxUtils.post("/license","domain="+encodeURIComponent(c)+"&email="+encodeURIComponent(b)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var b= a.getText();if(0<b.length){var d=JSON.parse(b);null!=d&&this.handleLicense(d,c)}}}catch(l){}}))}}; -App.prototype.handleLicense=function(a,b){var d=document.getElementById("geFooter"),c=null;if(null!=d&&null!=a)if(c=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=c&&"never"!=c){var e=new Date(Date.parse(c)),f=Math.round((e-Date.now())/864E5);if(90>f){var h="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(b);d.style.height="100%";d.style.margin="0px";d.style.display= -"";0>f?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+h+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[b,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+ -h+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[b,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return c};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.chromeless&&this.editor.graph.lightbox&&null==a.realtime?a.getData():this.getFileData(!0)}; +App.prototype.handleLicense=function(a,b){var d=document.getElementById("geFooter"),c=null;if(null!=d&&null!=a)if(c=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=c&&"never"!=c){var e=new Date(Date.parse(c)),f=Math.round((e-Date.now())/864E5);if(90>f){var k="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(b);d.style.height="100%";d.style.margin="0px";d.style.display= +"";0>f?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+k+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[b,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+ +k+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[b,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return c};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.chromeless&&this.editor.graph.lightbox&&null==a.realtime?a.getData():this.getFileData(!0)}; App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null}; App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var b=this.getRecent();if(null==b)b=[];else for(var d=0;d<b.length;d++)b[d].id==a.id&&b.splice(d,1);null!=b&&(b.unshift(a),b=b.slice(0,5),localStorage.setItem(".recent",JSON.stringify(b)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(b){}return null}}; App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(b){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}}; @@ -7308,9 +7308,9 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var a=this.editor.appName,b=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=b&&(a=(null!=b.getTitle()?b.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],b,d=0;256>d;d++){b=d;for(var c=0;8>c;c++)b=b&1?3988292384^b>>>1:b>>>1;a[d]=b}return a}; App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0}; App.prototype.getThumbnail=function(a,b){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,f=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(f.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this, -function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var h=document.createElement("canvas"),l=c.getGraphBounds(),m=a/l.width,m=Math.min(1,Math.min(3*a/(4*l.height),m)),g=Math.floor(l.x),k=Math.floor(l.y);h.setAttribute("width",Math.ceil(m*(l.width+4)));h.setAttribute("height",Math.ceil(m*(l.height+4)));var n=h.getContext("2d"); -n.scale(m,m);n.translate(-g,-k);var q=c.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";n.save();n.fillStyle=q;n.fillRect(g,k,Math.ceil(l.width+4),Math.ceil(l.height+4));n.restore();var t=new mxJsCanvas(h),p=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var v=new mxImageExport;v.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};v.drawText=function(a, -b){};v.drawState(c.getView().getState(c.model.root),p);p.finish(mxUtils.bind(this,function(){v.drawState(c.getView().getState(c.model.root),t);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(h)}));d=!0}}catch(z){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d}; +function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),l=c.getGraphBounds(),m=a/l.width,m=Math.min(1,Math.min(3*a/(4*l.height),m)),g=Math.floor(l.x),h=Math.floor(l.y);k.setAttribute("width",Math.ceil(m*(l.width+4)));k.setAttribute("height",Math.ceil(m*(l.height+4)));var n=k.getContext("2d"); +n.scale(m,m);n.translate(-g,-h);var q=c.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";n.save();n.fillStyle=q;n.fillRect(g,h,Math.ceil(l.width+4),Math.ceil(l.height+4));n.restore();var t=new mxJsCanvas(k),p=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var v=new mxImageExport;v.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};v.drawText=function(a, +b){};v.drawState(c.getView().getState(c.model.root),p);p.finish(mxUtils.bind(this,function(){v.drawState(c.getView().getState(c.model.root),t);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(k)}));d=!0}}catch(y){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d}; App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a}; (function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(b,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",b);else if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie="MODE="+b+"; expires="+c.toUTCString()}null!=this.appIcon&&(c=this.getCurrentFile(),b=null!=c?c.getMode():null,b==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt", [mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):b==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):b==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})(); @@ -7344,39 +7344,39 @@ gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.sou App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var b=this.getPeerForMode(a);if(null!=b)b.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var d= Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var c=this.dialog,e=c.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(c,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var f= document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&this.openFiles(f.files)}));f.click()}}}; -App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var b=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=b&&b.pickLibrary(mxUtils.bind(this,function(a,c){if(null!=c)try{this.loadLibrary(c)}catch(h){this.handleError(h,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body, +App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var b=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=b&&b.pickLibrary(mxUtils.bind(this,function(a,c){if(null!=c)try{this.loadLibrary(c)}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body, mxResources.get("loading"))&&b.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile= -new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(h){this.handleError(h,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}else{var c=document.createElement("input"); +new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}else{var c=document.createElement("input"); c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files)for(var a=0;a<c.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(c.files[a])}));c.click()}}; -App.prototype.saveLibrary=function(a,b,d,c,e,f,h){c=null!=c?c:this.mode;e=null!=e?e:!1;f=null!=f?f:!1;var l=this.createLibraryDataFromImages(b),m=mxUtils.bind(this,function(a){this.spinner.stop();null!=h&&h();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,l,a));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a, +App.prototype.saveLibrary=function(a,b,d,c,e,f,k){c=null!=c?c:this.mode;e=null!=e?e:!1;f=null!=f?f:!1;var l=this.createLibraryDataFromImages(b),m=mxUtils.bind(this,function(a){this.spinner.stop();null!=k&&k();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,l,a));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a, l,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,l,mxUtils.bind(this, function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop(); this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,l,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,b)}),m)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(l);var g=mxUtils.bind(this, -function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(d,b);null!=h&&h()}),m)});if(a!=d.getTitle()){var k=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&k!=d.getHash()&&(mxSettings.removeCustomLibrary(k),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(k);g()}),m)}else g()}}; -App.prototype.saveFile=function(a){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==b.getTitle()||null==this.mode){var c=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,f=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var h=4>=a?2:6<a?4:3,c=new CreateDialog(this, +function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(d,b);null!=k&&k()}),m)});if(a!=d.getTitle()){var h=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&h!=d.getHash()&&(mxSettings.removeCustomLibrary(h),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(h);g()}),m)}else g()}}; +App.prototype.saveFile=function(a){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==b.getTitle()||null==this.mode){var c=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,f=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var k=4>=a?2:6<a?4:3,c=new CreateDialog(this, c,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==f&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):f!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a), -/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,h);this.showDialog(c.container,460,a>h?390:270,!0,!0);c.init()}else this.save(b.getTitle(),d)}}; -EditorUi.prototype.loadTemplate=function(a,b,d){var c=a;this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+c);this.loadUrl(c,mxUtils.bind(this,function(c){!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&b(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&& -(c=this.extractGraphModelFromPng(c)),b(c))}),d,/(\.png)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null}; -App.prototype.createFile=function(a,b,d,c,e,f,h,l){c=l?null:null!=c?c:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});c==App.MODE_GOOGLE&&null!=this.drive?(h=null!=this.stateArg?this.stateArg.folderId:h,this.drive.insertFile(a,b,h,mxUtils.bind(this, -function(a){m();this.fileCreated(a,d,f,e)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(c,mxUtils.bind(this,function(c){this.gitHub.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,c)})):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,h):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g): -c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,h):c==App.MODE_BROWSER?(m(),c=mxUtils.bind(this,function(){var c=new StorageFile(this,b,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(c,d,f,e)}),g)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(m(),this.fileCreated(new LocalFile(this, +/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,k);this.showDialog(c.container,460,a>k?390:270,!0,!0);c.init()}else this.save(b.getTitle(),d)}}; +EditorUi.prototype.loadTemplate=function(a,b,d){var c=a;this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+c);this.loadUrl(c,mxUtils.bind(this,function(c){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(a){b(a)}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&& +200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&b(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(c=this.extractGraphModelFromPng(c)),b(c))}),d,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null}; +App.prototype.createFile=function(a,b,d,c,e,f,k,l){c=l?null:null!=c?c:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});c==App.MODE_GOOGLE&&null!=this.drive?(k=null!=this.stateArg?this.stateArg.folderId:k,this.drive.insertFile(a,b,k,mxUtils.bind(this, +function(a){m();this.fileCreated(a,d,f,e)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(c,mxUtils.bind(this,function(c){this.gitHub.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,c)})):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,k):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g): +c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,k):c==App.MODE_BROWSER?(m(),c=mxUtils.bind(this,function(){var c=new StorageFile(this,b,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(c,d,f,e)}),g)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(m(),this.fileCreated(new LocalFile(this, b,a,null==c),d,f,e))}}; -App.prototype.fileCreated=function(a,b,d,c){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var f=a.getData(),f=0<f.length?this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0):null,h=window.location.protocol+"//"+window.location.hostname+e,l=f,m=null;null!=f&&/\.svg$/i.test(a.getTitle())&&(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container), -l=this.decodeNodeIntoGraph(l,m));a.setData(this.createFileData(f,m,a,h));null!=m&&m.container.parentNode.removeChild(m.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=b&&this.sidebar.showEntries(b)}), -k=mxUtils.bind(this,function(){d||null==f||!f.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=c&&c(),window.openWindow(e,null,k))});a.constructor==LocalFile||a.constructor==DriveFile?k():a.saveFile(a.getTitle(),!1,mxUtils.bind(this, -function(){k()}),mxUtils.bind(this,function(a){g();this.handleError(a)}))}}; +App.prototype.fileCreated=function(a,b,d,c){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var f=a.getData(),f=0<f.length?this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0):null,k=window.location.protocol+"//"+window.location.hostname+e,l=f,m=null;null!=f&&/\.svg$/i.test(a.getTitle())&&(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container), +l=this.decodeNodeIntoGraph(l,m));a.setData(this.createFileData(f,m,a,k));null!=m&&m.container.parentNode.removeChild(m.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),h=mxUtils.bind(this,function(){g();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=b&&this.sidebar.showEntries(b)}), +h=mxUtils.bind(this,function(){d||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?h():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=c&&c(),window.openWindow(e,null,h))});a.constructor==LocalFile||a.constructor==DriveFile?h():a.saveFile(a.getTitle(),!1,mxUtils.bind(this, +function(){h()}),mxUtils.bind(this,function(a){g();this.handleError(a)}))}}; App.prototype.loadFile=function(a,b,d){this.hideDialog();var c=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var c=localStorage.getItem(a);if(null!=c)this.fileLoaded(new StorageFile(this,c,a));else throw{message:mxResources.get("fileNotFound")};}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"), mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=d)this.spinner.stop(),this.fileLoaded(d);else if("R"==a.charAt(0))this.spinner.stop(),c=decodeURIComponent(a.substring(1)),"<"!=c.charAt(0)&&(c=this.editor.graph.decompress(c)), -c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),c.getHash=function(){return a},this.fileLoaded(c);else if("U"==a.charAt(0)){var e=decodeURIComponent(a.substring(1));this.loadTemplate(e,mxUtils.bind(this,function(c){this.spinner.stop();if(null!=c&&0<c.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=e,h=e.lastIndexOf("."),l=f.lastIndexOf("/");h>l&&0<l&&(f=f.substring(l+1,h),h=e.substring(h),this.useCanvasForExport|| -".png"!=h||(h=".xml"),".svg"===h||".xml"===h||".html"===h||".png"===h)&&(d=f+h)}c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):d,!0);c.getHash=function(){return a};this.fileLoaded(c)||"https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),c=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+e.substring(31,e.lastIndexOf("&")),b),!0):!1}),!c()&&this.spinner.spin(document.body, +c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),c.getHash=function(){return a},this.fileLoaded(c);else if("U"==a.charAt(0)){var e=decodeURIComponent(a.substring(1));this.loadTemplate(e,mxUtils.bind(this,function(c){this.spinner.stop();if(null!=c&&0<c.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=e,k=e.lastIndexOf("."),l=f.lastIndexOf("/");k>l&&0<l&&(f=f.substring(l+1,k),k=e.substring(k),this.useCanvasForExport|| +".png"!=k||(k=".xml"),".svg"===k||".xml"===k||".html"===k||".png"===k)&&(d=f+k)}c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):d,!0);c.getHash=function(){return a};this.fileLoaded(c)||"https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),c=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+e.substring(31,e.lastIndexOf("&")),b),!0):!1}),!c()&&this.spinner.spin(document.body, mxResources.get("loading"))&&this.addListener("clientLoaded",c))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else c=null,"G"==a.charAt(0)?c=this.drive:"D"==a.charAt(0)?c=this.dropbox:"W"==a.charAt(0)?c=this.oneDrive:"H"==a.charAt(0)?c=this.gitHub:"T"==a.charAt(0)&&(c=this.trello),null==c?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"), mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),c.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()): window.location.hash=a.getHash()}))})))}),e=this.getCurrentFile(),f=mxUtils.bind(this,function(){null!=e&&e.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=e&&(window.location.hash=e.getHash())}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null==a||0==a.length?f():null!=e&&e.isModified()&&!b?window.openWindow(this.getUrl()+"#"+a,null,f):f()}; App.prototype.getLibraryStorageHint=function(a){var b=a.getTitle();a.constructor!=LocalLibrary&&(b+="\n"+a.getHash());a.constructor==DriveLibrary?b+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?b+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?b+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?b+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?b+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?b+=" ("+ mxResources.get("browser")+")":a.constructor==LocalLibrary&&(b+=" ("+mxResources.get("device")+")");return b}; App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=mxUtils.bind(this,function(b){if(null!=b)for(var c=0;c<b.length;c++){var d=encodeURIComponent(decodeURIComponent(b[c]));mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var c=b.substring(0, -1);if("L"==c){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var d=decodeURIComponent(b.substring(1));this.getLocalData(d,mxUtils.bind(this,function(c){".scratchpad"==d&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,d)):a(b)}))}catch(k){a(b)}}else if("U"==c){var e=decodeURIComponent(b.substring(1));this.isOffline()||(c=e,this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(e)+"&"+c),mxUtils.get(c,mxUtils.bind(this,function(c){if(200<= +1);if("L"==c){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var d=decodeURIComponent(b.substring(1));this.getLocalData(d,mxUtils.bind(this,function(c){".scratchpad"==d&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,d)):a(b)}))}catch(h){a(b)}}else if("U"==c){var e=decodeURIComponent(b.substring(1));this.isOffline()||(c=e,this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(e)+"&"+c),mxUtils.get(c,mxUtils.bind(this,function(c){if(200<= c.getStatus()&&299>=c.getStatus())try{this.loadLibrary(new UrlLibrary(this,c.getText(),e)),delete this.pendingLibraries[b]}catch(n){a(b)}else a(b)}),function(){a(b)}))}else{var f=null;"G"==c?null!=this.drive&&null!=this.drive.user&&(f=this.drive):"H"==c?null!=this.gitHub&&null!=this.gitHub.getUser()&&(f=this.gitHub):"T"==c?null!=this.trello&&this.trello.isAuthorized()&&(f=this.trello):"D"==c?null!=this.dropbox&&null!=this.dropbox.getUser()&&(f=this.dropbox):"W"==c&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&& (f=this.oneDrive);null!=f?f.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(c){try{this.loadLibrary(c),delete this.pendingLibraries[b]}catch(n){a(b)}}),function(c){a(b)}):delete this.pendingLibraries[b]}}})(d)}});b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"))}}; App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth= @@ -7392,11 +7392,11 @@ function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop d():this.confirm(mxResources.get("replaceIt",[b]),d))}; App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var b=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,b);this.fname.setAttribute("title",b+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash= ""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var b=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),b,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}}; -App.prototype.showAuthDialog=function(a,b,d,c){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,b,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(h){this.editor.setStatus(mxUtils.htmlEntities(h.message))}}))).container,300,b?180:140,!0,!0,mxUtils.bind(this,function(a){null!=c&&c();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}; -App.prototype.convertFile=function(a,b,d,c,e,f){var h=b;/\.svg$/i.test(h)||(h=h.substring(0,b.lastIndexOf("."))+c);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.vsdx$/i.test(b)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);l||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(m.responseText),a=this.base64ToBlob(a.content, -"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,h,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),b)});m.send()}else{var g=mxUtils.bind(this,function(c){try{/\.png$/i.test(b)?(temp=this.extractGraphModelFromPng(c),null!=temp?e(new LocalFile(this,temp,h,!0)):e(new LocalFile(this,c,b,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&& -this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,h,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,h,!0))}catch(n){null!=f&&f(n)}});d=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=d&&"image/"==d.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!= -e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?"data:image/png;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));g(c)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,g,f,d)}}; +App.prototype.showAuthDialog=function(a,b,d,c){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,b,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,b?180:140,!0,!0,mxUtils.bind(this,function(a){null!=c&&c();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}; +App.prototype.convertFile=function(a,b,d,c,e,f){var k=b;/\.svg$/i.test(k)||(k=k.substring(0,b.lastIndexOf("."))+c);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.vsdx$/i.test(b)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);l||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(m.responseText),a=this.base64ToBlob(a.content, +"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,k,!0))}),f)});m.send()}else{var g=mxUtils.bind(this,function(c){try{/\.png$/i.test(b)?(temp=this.extractGraphModelFromPng(c),null!=temp?e(new LocalFile(this,temp,k,!0)):e(new LocalFile(this,c,b,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this, +function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,k,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,k,!0))}catch(n){null!=f&&f(n)}});d=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=d&&"image/"==d.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?"data:image/png;base64,"+ +c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));g(c)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,g,f,d)}}; App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)": "url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX? this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a})); @@ -7429,12 +7429,12 @@ function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){va mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser()); null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;"; var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};var b=Menus.prototype.init;Menus.prototype.init=function(){b.apply(this, -arguments);var a=this.editorUi,d=a.editor.graph,f=mxUtils.bind(d,d.isEnabled),h=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),m=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname|| +arguments);var a=this.editorUi,d=a.editor.graph,f=mxUtils.bind(d,d.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),m=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname|| "drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),g=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png"); -a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/ -100,c,d,e,f,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c? +a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/ +100,c,d,e,f,g,k,!h,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c? "compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"), -!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,h,k,l,m){a.createHtml(b,c,d,e,f,g,h,k,l,m,mxUtils.bind(this,function(b,c){var d= +!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,k,h,l,m){a.createHtml(b,c,d,e,f,g,k,h,l,m,mxUtils.bind(this,function(b,c){var d= a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container, 360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport|| mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells(); @@ -7442,85 +7442,84 @@ if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);nul mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+ "?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(D){a.handleError(D)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length- 1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+ -"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var k=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled= -!a.isMathEnabled();d.model.execute(b)});k.setToggleAction(!0);k.setSelectedCallback(function(){return a.isMathEnabled()});k.isEnabled=f}isLocalStorage&&(k=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var n=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return n.isEnabled()&& +"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var h=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled= +!a.isMathEnabled();d.model.execute(b)});h.setToggleAction(!0);h.setSelectedCallback(function(){return a.isMathEnabled()});h.isEnabled=f}isLocalStorage&&(h=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),h.setToggleAction(!0),h.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var n=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return n.isEnabled()&& a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var q="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" "); a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&& -null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<q.length;f++){var g=q[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container, -320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this, -function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"), -null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));k=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return d.shadowVisible});var t=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){t||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){t=!1}),t=!0)},null,null,"F1"));a.actions.addAction("userManual...", +null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<q.length;f++){var g=q[f],k=a.copiedStyle[g];e.style[g]!=k&&d.setCellStyles(g,k,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container, +320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,k,!h,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this, +function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,k,!h,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"), +null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));h=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));h.setToggleAction(!0);h.setSelectedCallback(function(){return d.shadowVisible});var t=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){t||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){t=!1}),t=!0)},null,null,"F1"));a.actions.addAction("userManual...", function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"): -a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});k=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show", -function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));k=a.actions.addAction("find...",mxUtils.bind(this,function(){null== -this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,204,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!= -this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=mxUtils.bind(this,function(){if("undefined"!==typeof VsdxExport)try{(new VsdxExport(a)).exportCurrentDiagrams()}catch(w){}});"undefined"!==typeof VsdxExport||this.loadingVsdx||a.isOffline()?window.setTimeout(b,0):(this.loadingVsdx=!0,mxscript("js/vsdx.min.js",b))}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language", -new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c); -for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=p.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px", -c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search:",null,null,c,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px"; -mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)}, -function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support","-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES); -this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS); -this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})), -mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport", -mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var k=e.restore;e.restore=function(){g--;k.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);l.apply(this,arguments);mxLog.debug("leaving shape", -a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&& -(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&& -(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&& -this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage? -mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...", -function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,h,k,l,m){a.createHtml(b,c,d,e,f,g,h,k,l,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>"); -d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+ -window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&& -a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop(); -b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0); -b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,h,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(), -function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+k+';" src="'+a.createLink(b,c,d,e,f,g,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a, -a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)k=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}), -k.setToggleAction(!0),k.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,156,!0,!1)});k=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});k.setToggleAction(!0);k.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct= -function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}), -a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b, -["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"], -c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function e(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files, -null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!= -urlParams.embed&&a.showSplash()}}}function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");k(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var k=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(), -h=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),k=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,c,h,k,Math.round(l*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}), -g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!= -typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){}, -c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+ -"...",null,function(){e(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){e(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){k(a,c,b)},function(){a.spinner.stop(); -a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&b.addCheckmark(d, -Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this, -function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}), -b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&f.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle(): -a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this, -function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this, -function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")})); -a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()|| -this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var v="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),z=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}), -c)},y=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.container.focus();d.setSelectionCell(a);d.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(y("Text",40,20, -"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=f;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}, -null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<v.length;c++)"-"==v[c]?a.addSeparator(b):z(a,b,mxResources.get(v[c])+"...",v[c])}))); -this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)}, -c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null, -function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)}, -c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))}, -mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null, -function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+ -mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+ -"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)}, -c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...", -null,function(){a.pickLibrary(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b= -new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(D){a.handleError(D,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))}, -function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b, -(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b, -"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&& -this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||(d=this.addMenuItem(b,"plugins",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000056430"));b.addSeparator(c);d=this.addMenuItem(b,"tags",c);a.isOffline()||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966"); -b.addSeparator(c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b, -["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom", -b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c); -this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated; -Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")}; +a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});h=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show", +function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));h.setToggleAction(!0);h.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));h=a.actions.addAction("find...",mxUtils.bind(this,function(){null== +this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,204,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));h.setToggleAction(!0);h.setSelectedCallback(mxUtils.bind(this,function(){return null!= +this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language= +d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=p.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")), +c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search:",null,null,c,null, +null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}), +window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support", +"-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER); +this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"], +c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(), +mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f); +e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,k=e.save;e.save=function(){g++;k.apply(this,arguments)};var h=e.restore;e.restore=function(){g--;h.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);l.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"], +c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})), +this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this, +arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole", +function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...", +function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542", +b,function(b,c,d,e,f,g,k,h,l,m){a.createHtml(b,c,d,e,f,g,k,h,l,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>"); +d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src= +/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})})); +a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+ +"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b= +d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,k,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+h+';" src="'+a.createLink(b,c,d,e,f,g,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink", +new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,k));a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body, +mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)h=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),h.setToggleAction(!0),h.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,156,!0,!1)});h=a.actions.addAction("search", +function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});h.setToggleAction(!0);h.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save"); +e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b, +"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b, +["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi, +this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function e(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b, +c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&& +(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");h(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var h=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),h=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g= +!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,c,k,h,Math.round(l*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,h,0,0, +e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)", +null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){}, +c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){e(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){e(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b= +new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){h(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()}, +c)})).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage); +d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!= +a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok")); +return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&f.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d= +App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this, +function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this, +function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a= +this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var v="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "), +y=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},z=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted", +"cells",[a]))}finally{d.getModel().endUpdate()}d.container.focus();d.setSelectionCell(a);d.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&& +z("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=f;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a, +"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<v.length;c++)"-"==v[c]?a.addSeparator(b):y(a,b,mxResources.get(v[c])+"...",v[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]); +b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+ +"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+ +" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&& +(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null, +null,null,null,App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null, +function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){}, +c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...", +null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive? +b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+ +"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<= +c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(D){a.handleError(D,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))}))); +this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c); +mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d, +"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||(d=this.addMenuItem(b,"plugins",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000056430"));b.addSeparator(c);d=this.addMenuItem(b, +"tags",c);a.isOffline()||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966");b.addSeparator(c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&& +(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b, +["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b, +["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c); +mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")}; DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,d){this.ui=a;this.page=b;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(a,b,d){this.ui=a;this.oldIndex=b;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))} @@ -7532,8 +7531,8 @@ EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mx null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var d=!1,c=null,e=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft= a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=!0}))):"undefined"===typeof Editor.MathJaxClear|| this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,d=0;d<c.length;d++)if(c[d]instanceof SelectPage||c[d]instanceof RenamePage||c[d]instanceof MovePage||c[d]instanceof mxRootChange){e();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}; -Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),d=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),e=a.getAttribute("pageHeight"),f=a.getAttribute("background"),h=a.getAttribute("backgroundImage"),h=null!=h&&0<h.length?JSON.parse(h):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"== -a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=f&&0<f.length?f:this.defaultGraphBackground,backgroundImage:null!=h?new mxImage(h.src,h.width,h.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=e?new mxRectangle(0,0,parseFloat(c),parseFloat(e)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"), +Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),d=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),e=a.getAttribute("pageHeight"),f=a.getAttribute("background"),k=a.getAttribute("backgroundImage"),k=null!=k&&0<k.length?JSON.parse(k):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"== +a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=f&&0<f.length?f:this.defaultGraphBackground,backgroundImage:null!=k?new mxImage(k.src,k.width,k.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=e?new mxRectangle(0,0,parseFloat(c),parseFloat(e)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"), selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}}; Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(), arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}}; @@ -7551,9 +7550,9 @@ EditorUi.prototype.createTabContainer=function(){var a=document.createElement("d EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var d=this.editor.chromeless?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- d)/this.pages.length)+1),e=null,f=0;f<this.pages.length;f++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),e=c):mxEvent.consume(b)}));mxEvent.addListener(d, "dragend",mxUtils.bind(this,function(a){e=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=e&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=e&&c!=e&&this.movePage(e,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(f,this.createTabForPage(this.pages[f],c,this.pages[f]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b); -c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var h=this.createControlTab(4," ❮ ");h.style.position="absolute";h.style.right=this.editor.chromeless?"29px":"55px";h.style.fontSize="13pt";this.tabContainer.appendChild(h);var l=this.createControlTab(4, -" ❯");l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=m+"px";mxEvent.addListener(h,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,m-20);mxUtils.setOpacity(h,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(h, -0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,m-20);mxUtils.setOpacity(h,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; +c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var k=this.createControlTab(4," ❮ ");k.style.position="absolute";k.style.right=this.editor.chromeless?"29px":"55px";k.style.fontSize="13pt";this.tabContainer.appendChild(k);var l=this.createControlTab(4, +" ❯");l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=m+"px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,m-20);mxUtils.setOpacity(k,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(k, +0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,m-20);mxUtils.setOpacity(k,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor; b.style.cursor="default";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b}; EditorUi.prototype.createControlTab=function(a,b){var d=this.createTab(!0);d.style.paddingTop=a+"px";d.style.cursor="pointer";d.style.width="30px";d.style.lineHeight="30px";d.innerHTML=b;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d}; @@ -7563,37 +7562,37 @@ null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSepar mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a}; EditorUi.prototype.createTabForPage=function(a,b,d){d=this.createTab(d);var c=a.getName();d.setAttribute("title",c);mxUtils.write(d,c);d.style.maxWidth=b+"px";d.style.width=b+"px";this.addTabListeners(a,d);42<b&&(d.style.textOverflow="ellipsis");return d}; EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var d=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,e=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;e=a==this.currentPage;d.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(f){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(f)&&e||mxEvent.isPopupTrigger(f))){d.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!c){var h=new mxPopupMenu(this.createPageMenu(a));h.div.className+=" geMenubarMenu";h.smartSeparators=!0;h.showDisabled=!0;h.autoExpand=!0;h.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(h,arguments);this.resetCurrentMenu();h.destroy()});var l=mxEvent.getClientX(f),m=mxEvent.getClientY(f);h.popup(l,m,null,f);this.setCurrentMenu(h,b)}mxEvent.consume(f)}}))}; +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!c){var k=new mxPopupMenu(this.createPageMenu(a));k.div.className+=" geMenubarMenu";k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);this.resetCurrentMenu();k.destroy()});var l=mxEvent.getClientX(f),m=mxEvent.getClientY(f);k.popup(l,m,null,f);this.setCurrentMenu(k,b)}mxEvent.consume(f)}}))}; EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(d,c){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);d.addSeparator(c);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a, mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};mxCodecRegistry.register(a)})(); (function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,d,c){c.setAttribute("page",d.page.getId());return c};a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.page=a.ui.getPageById(d.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})(); (function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,d,c){c.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(c.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,c));return c};a.beforeDecode=function(a,d,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(d.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",d.getAttribute("relatedPage")); b.setAttribute("name",d.getAttribute("name"));c.relatedPage=new DiagramPage(b);d=d.cloneNode(!0);b=d.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var f=b.getAttribute("id");null==a.lookup(f)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return d};a.afterDecode=function(a,d,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells; -Graph.prototype.foldCells=function(a,c,d,l,m){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],h=0;h<d.length;h++){var q=this.view.getState(d[h]),t=null!=q?q.style:this.getCellStyle(d[h]);"1"==mxUtils.getValue(t,"treeFolding","0")&&(this.traverse(d[h],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[h]&&f.push(a);return a==d[h]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[h], -a))}for(h=0;h<f.length;h++)this.model.setVisible(f[h],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=v.getParent(a),b=p.view.getState(a),p.view.getState(a),b="tree"==(null!=b?b.style:p.getCellStyle(a)).containerType); +Graph.prototype.foldCells=function(a,c,d,l,m){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],k=0;k<d.length;k++){var q=this.view.getState(d[k]),t=null!=q?q.style:this.getCellStyle(d[k]);"1"==mxUtils.getValue(t,"treeFolding","0")&&(this.traverse(d[k],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[k]&&f.push(a);return a==d[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[k], +a))}for(k=0;k<f.length;k++)this.model.setVisible(f[k],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=v.getParent(a),b=p.view.getState(a),p.view.getState(a),b="tree"==(null!=b?b.style:p.getCellStyle(a)).containerType); return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=p.view.getState(a),p.view.getState(a),b=null!=(null!=b?b.style:p.getCellStyle(a)).childLayout);return b}function l(a){a=p.view.getState(a);if(null!=a){var b=p.getIncomingEdges(a.cell);if(0<b.length&&(b=p.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())< a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function m(a,b){b=null!=b?b:!0;p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=p.cloneCells([d[0],a]);p.model.setTerminal(e[0],p.model.getTerminal(d[0],!0),!0);var f=l(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+ -10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);p.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=p.view.getState(a),k=p.view.scale;if(null!=h){var m=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=p.getOutgoingEdges(p.model.getTerminal(d[0], -!0));if(null!=n){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,C=g=d=0;C<n.length;C++){var t=p.model.getTerminal(n[C],!1);if(f==l(t)){var u=p.view.getState(t);t!=a&&null!=u&&(q&&b!=u.getCenterX()<h.getCenterX()||!q&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(m,u)&&(d=10+Math.max(d,(Math.min(m.x+m.width,u.x+u.width)-Math.max(m.x,u.x))/k),g=10+Math.max(g,(Math.min(m.y+m.height,u.y+u.height)-Math.max(m.y,u.y))/k))}}q?g=0:d=0;for(C=0;C<n.length;C++)if(t=p.model.getTerminal(n[C], -!1),f==l(t)&&(u=p.view.getState(t),t!=a&&null!=u&&(q&&b!=u.getCenterX()<h.getCenterX()||!q&&b!=u.getCenterY()<h.getCenterY()))){var v=[];p.traverse(u.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});p.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return p.addCells(e,c)}finally{p.model.endUpdate()}}function g(a){p.model.beginUpdate();try{var b=l(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(c[0],d[1],!1);p.model.setTerminal(d[0],d[1],!0);p.model.setTerminal(d[0],a,!1); -var e=p.model.getParent(a),f=e.geometry,g=[];p.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);p.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);p.moveCells(g,h,k);return p.addCells(d,e)}finally{p.model.endUpdate()}}function k(a){p.model.beginUpdate();try{var b= -p.model.getParent(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(d[0],a,!0);var c=p.getOutgoingEdges(a),e=b.geometry,f=[];p.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=p.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=p.view.getBounds(f),m=l(a),n=p.view.translate,q=p.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/q-n.x-e.x+10,d[1].geometry.y+=a.geometry.height- -e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/q-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/q-n.y+-e.y+10);return p.addCells(d,b)}finally{p.model.endUpdate()}}function n(a, +10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);p.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=p.view.getState(a),h=p.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*h:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*h;var n=p.getOutgoingEdges(p.model.getTerminal(d[0], +!0));if(null!=n){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<n.length;t++){var C=p.model.getTerminal(n[t],!1);if(f==l(C)){var u=p.view.getState(C);C!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,u)&&(d=10+Math.max(d,(Math.min(m.x+m.width,u.x+u.width)-Math.max(m.x,u.x))/h),g=10+Math.max(g,(Math.min(m.y+m.height,u.y+u.height)-Math.max(m.y,u.y))/h))}}q?g=0:d=0;for(t=0;t<n.length;t++)if(C=p.model.getTerminal(n[t], +!1),f==l(C)&&(u=p.view.getState(C),C!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY()))){var v=[];p.traverse(u.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});p.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return p.addCells(e,c)}finally{p.model.endUpdate()}}function g(a){p.model.beginUpdate();try{var b=l(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(c[0],d[1],!1);p.model.setTerminal(d[0],d[1],!0);p.model.setTerminal(d[0],a,!1); +var e=p.model.getParent(a),f=e.geometry,g=[];p.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);p.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,h=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,h=-40):b==mxConstants.DIRECTION_WEST?(k=-40,h=0):b==mxConstants.DIRECTION_EAST&&(h=0);p.moveCells(g,k,h);return p.addCells(d,e)}finally{p.model.endUpdate()}}function h(a){p.model.beginUpdate();try{var b= +p.model.getParent(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(d[0],a,!0);var c=p.getOutgoingEdges(a),e=b.geometry,f=[];p.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=p.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var h=p.view.getBounds(f),m=l(a),n=p.view.translate,q=p.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/q-n.x-e.x+10,d[1].geometry.y+=a.geometry.height- +e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/q-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==h?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(h.y+h.height)/q-n.y+-e.y+10);return p.addCells(d,b)}finally{p.model.endUpdate()}}function n(a, b,c){a=p.getOutgoingEdges(a);c=p.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=p.view.getState(p.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=l(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():c==b?(d=p.getOutgoingEdges(a),null!=d&&0<d.length&&p.setSelectionCell(p.model.getTerminal(d[0],!1))):(c=p.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(p.model.getTerminal(c[0],!0),d,a),c=p.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&p.setSelectionCell(d[c].cell)))))}var t=this,p=t.editor.graph,v=p.getModel();mxResources.parse("selectChildren=Select Children"); -mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var z=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){z.apply(this,arguments);if(1==p.getSelectionCount()){c=p.getSelectionCell();var e=p.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(p.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(p.getSelectionCell())&& +mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==p.getSelectionCount()){c=p.getSelectionCell();var e=p.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(p.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(p.getSelectionCell())&& (a.addSeparator(),0<p.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};t.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(), a=p.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=p.getOutgoingEdges(p.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);null!=a&&0<a.length&&p.setSelectionCell(p.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants", -function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),b=[];p.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});p.setSelectionCells(b)}},null,null,"Alt+Shift+T");var y=p.removeCells;p.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];v.isEdge(g)&&c(g)&&(e.push(g),g=v.getTerminal(g,!1));b(g)?(p.traverse(g,!0, -function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=p.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return y.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var u=p.duplicateCells;p.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=p.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=p.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f], -a)}this.model.beginUpdate();try{var h=u.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=p.getIncomingEdges(h[e]),g=p.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,p.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var w=p.moveCells;p.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f); -if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||p.model.isEdge(a[q])&&null==p.model.getTerminal(a[q],!0)){f=p.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var t=p.getIncomingEdges(a[0]);if(0<t.length){var u=p.view.getState(p.model.getTerminal(t[0],!0));if(null!=u){var v=p.view.getState(l);null!=v&&(c=(v.getCenterX()-u.getCenterX())/p.view.scale,d=(v.getCenterY()-u.getCenterY())/p.view.scale)}}}}k=w.apply(this,arguments); -if(null!=k&&null!=a&&k.length==a.length)for(q=0;q<k.length;q++)if(this.model.isEdge(k[q]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[q],!0))&&this.model.setTerminal(k[q],l,!0);else if(b(a[q])&&(t=p.getIncomingEdges(a[q]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==p.getIncomingEdges(k[q]).length){m=l;if(null==m||m==p.model.getParent(a[q]))m=p.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e, -p.getDefaultParent(),m,k[q])}}finally{this.model.endUpdate()}return k};if(null!=t.sidebar){var x=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(a,c,d,e){var f=p.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=p.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var A={88:t.actions.get("selectChildren"), -84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},B=t.onKeyDown;t.onKeyDown=function(a){try{if(p.isEnabled()&&!p.isEditing()&&b(p.getSelectionCell())&&1==p.getSelectionCount()){var c=null;0<p.getIncomingEdges(p.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?g(p.getSelectionCell()):k(p.getSelectionCell()):13==a.which&&(c=m(p.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&p.model.isEdge(c[0])?p.setSelectionCell(p.model.getTerminal(c[0], +function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),b=[];p.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});p.setSelectionCells(b)}},null,null,"Alt+Shift+T");var z=p.removeCells;p.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];v.isEdge(g)&&c(g)&&(e.push(g),g=v.getTerminal(g,!1));b(g)?(p.traverse(g,!0, +function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=p.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return z.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var u=p.duplicateCells;p.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=p.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=p.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f], +a)}this.model.beginUpdate();try{var k=u.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var h=p.getIncomingEdges(k[e]),g=p.getIncomingEdges(a[e]);if(0==h.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,p.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var w=p.moveCells;p.moveCells=function(a,c,d,e,f,g,k){var h=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f); +if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||p.model.isEdge(a[q])&&null==p.model.getTerminal(a[q],!0)){f=p.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var t=p.getIncomingEdges(a[0]);if(0<t.length){var u=p.view.getState(p.model.getTerminal(t[0],!0));if(null!=u){var v=p.view.getState(l);null!=v&&(c=(v.getCenterX()-u.getCenterX())/p.view.scale,d=(v.getCenterY()-u.getCenterY())/p.view.scale)}}}}h=w.apply(this,arguments); +if(null!=h&&null!=a&&h.length==a.length)for(q=0;q<h.length;q++)if(this.model.isEdge(h[q]))b(l)&&0>mxUtils.indexOf(h,this.model.getTerminal(h[q],!0))&&this.model.setTerminal(h[q],l,!0);else if(b(a[q])&&(t=p.getIncomingEdges(a[q]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==p.getIncomingEdges(h[q]).length){m=l;if(null==m||m==p.model.getParent(a[q]))m=p.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e, +p.getDefaultParent(),m,h[q])}}finally{this.model.endUpdate()}return h};if(null!=t.sidebar){var x=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(a,c,d,e){var f=p.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var h=p.getCellGeometry(g[k]);h.points=null;null!=h.getTerminalPoint(!0)&&h.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var A={88:t.actions.get("selectChildren"), +84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},B=t.onKeyDown;t.onKeyDown=function(a){try{if(p.isEnabled()&&!p.isEditing()&&b(p.getSelectionCell())&&1==p.getSelectionCount()){var c=null;0<p.getIncomingEdges(p.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?g(p.getSelectionCell()):h(p.getSelectionCell()):13==a.which&&(c=m(p.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&p.model.isEdge(c[0])?p.setSelectionCell(p.model.getTerminal(c[0], !1)):p.setSelectionCell(c[c.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(p.view.getState(p.getSelectionCell())),p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=A[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(p.getSelectionCell(), -mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(K){console.log("error",K)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var H=p.connectVertex;p.connectVertex=function(a,c,d,e,f,h){var n=p.getIncomingEdges(a);return b(a)&&0<n.length?(d=l(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?k(a):e==f?g(a):m(a,c!=mxConstants.DIRECTION_NORTH&& -c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,d,e,f,h)};p.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&p.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"), +mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(K){console.log("error",K)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var H=p.connectVertex;p.connectVertex=function(a,c,d,e,f,k){var n=p.getIncomingEdges(a);return b(a)&&0<n.length?(d=l(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?h(a):e==f?g(a):m(a,c!=mxConstants.DIRECTION_NORTH&& +c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,d,e,f,k)};p.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&p.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"), this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells); this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var E=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){E.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top= this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container", diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js index e287f3c6df44aedeffe5b31655886edfd65886c0..24ca3e4f56e445370df3c935b689d206aa3975c5 100644 --- a/src/main/webapp/js/atlas-viewer.min.js +++ b/src/main/webapp/js/atlas-viewer.min.js @@ -317,7 +317,7 @@ mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this. mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))}; mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null; mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a}; -mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)}; +mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&"file://"!=a.substring(0,7)}; mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a}; function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.stop()});mxEvent.addListener(document,"mouseup",this.mouseUpListener);var b=mxUtils.bind(this, function(){this.scrollbars=mxUtils.hasScrollbars(a.container);this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;this.scrollbars?(a.panGraph(-a.container.scrollLeft-Math.ceil(this.dx),-a.container.scrollTop-Math.ceil(this.dy)),a.panDx=this.scrollLeft-a.container.scrollLeft,a.panDy=this.scrollTop-a.container.scrollTop,a.fireEvent(new mxEventObject(mxEvent.PAN))):a.panGraph(this.getDx(), @@ -1945,8 +1945,8 @@ b,d,e){0>a&&(a=0);6<a&&(a=6);0>b&&(b=0);1<b&&(b=1);0>d&&(d=0);1<d&&(d=1);this.rg 0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/ 255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),y=!1,A=!1,z=1,v=2,B=4,C=8;u&&(q=function(){r.fromString(u.value,z);p()},jscolor.addEvent(u,"keyup", q),jscolor.addEvent(u,"input",q),jscolor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,color:x.style.color});switch(t){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}jscolor.requireImage("cross.gif");jscolor.requireImage("arrow.gif");this.importColor()}};jscolor.install(); -Editor=function(a,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus= -function(){return this.status};this.graphChangeListener=function(a,d){var b=null!=d?d.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; +Editor=function(a,b,e,c,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=c||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus= +function(){return this.status};this.graphChangeListener=function(a,c){var b=null!=c?c.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; (function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS; Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ5NeoVcKDAZs+//PXLKI8YKlWvaRU7jXuFpb9qsbdK05XILUiE8JHQox1Pv3OgFUzf1AGqWqUg+QBwLF0YAeegBlCNgRWOpB5vUfTCmeoHQ/wNdy0jLH/cM+b+wLTw4n/7ACEmHVVy8h6qy8V7MNcGowWpsNbvUFcGUEdSi1s/oAAAAASUVORK5CYII=":IMAGE_PATH+ "/help.png"; @@ -1965,7 +1965,7 @@ Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAgM Editor.nextLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFRJREFUOMvd0skRgCAQBVEFwQ0V7fxzNQP6wI05v6pZ/kyj1b7FNgik2gQzzLcAwiUAigHOTwDHK4A1CmB5BJANJG1hQ9qafYcqFlZP3IFc9eVGrR+iIgkDQRUXIAAAAABJRU5ErkJggg==";Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO; Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title; Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.init=function(){};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a}; -Editor.prototype.editAsNew=function(a,b){var e=null!=b?"?title="+encodeURIComponent(b):"";null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(d){"ready"==d.data&&d.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=window.open(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"))): +Editor.prototype.editAsNew=function(a,b){var e=null!=b?"?title="+encodeURIComponent(b):"";null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){"ready"==c.data&&c.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=window.open(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"))): this.editorWindow=window.open(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e}; Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!this.chromeless||"1"==urlParams.grid;this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=this.graph.defaultGraphBackground;this.graph.pageScale= mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)}; @@ -1977,14 +1977,14 @@ this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView")) Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize", this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width); a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a}; -Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],r=0;r<e.length;r++)(k.isVertex(e[r])||k.isEdge(e[r]))&&null!=a.view.getState(e[r])&& -q.push(e[r]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()}; +Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(c,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],t=0;t<e.length;t++)(k.isVertex(e[t])||k.isEdge(e[t]))&&null!=a.view.getState(e[t])&& +q.push(e[t]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()}; OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)}; -function Dialog(a,b,e,d,k,l,p,q){var r=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(r=80);e+=r;d+=r;var c=e,f=d,h=Math.max(document.body.clientHeight,document.documentElement.clientHeight),m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),n=Math.max(1,Math.round((h-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d=Math.min(d,h-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&& -(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=h+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var g=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=g.x+"px";this.bg.style.top=g.y+"px";m+=g.x;n+=g.y;k&&document.body.appendChild(this.bg);var x=a.createDiv("geDialog");k=this.getPosition(m,n, -e,d);m=k.x;n=k.y;x.style.width=e+"px";x.style.height=d+"px";x.style.left=m+"px";x.style.top=n+"px";x.style.zIndex=this.zIndex;x.appendChild(b);document.body.appendChild(x);!q&&b.clientHeight>x.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=n+14+"px",l.style.left=m+e+38-r+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click", -mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){h=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=h+"px";m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));n=Math.max(1,Math.round((h-d-a.footerHeight)/3));e=Math.min(c,document.body.scrollWidth-64);d= -Math.min(f,h-64);var g=this.getPosition(m,n,e,d);m=g.x;n=g.y;x.style.left=m+"px";x.style.top=n+"px";x.style.width=e+"px";x.style.height=d+"px";!q&&b.clientHeight>x.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=n+14+"px",this.dialogImg.style.left=m+e+38-r+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=x;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white"; +function Dialog(a,b,e,c,k,l,p,q){var t=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(t=80);e+=t;c+=t;var d=e,f=c,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((g-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,g-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&& +(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var h=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=h.x+"px";this.bg.style.top=h.y+"px";n+=h.x;m+=h.y;k&&document.body.appendChild(this.bg);var w=a.createDiv("geDialog");k=this.getPosition(n,m, +e,c);n=k.x;m=k.y;w.style.width=e+"px";w.style.height=c+"px";w.style.left=n+"px";w.style.top=m+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=m+14+"px",l.style.left=n+e+38-t+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click", +mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){g=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=g+"px";n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));m=Math.max(1,Math.round((g-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c= +Math.min(f,g-64);var h=this.getPosition(n,m,e,c);n=h.x;m=h.y;w.style.left=n+"px";w.style.top=m+"px";w.style.width=e+"px";w.style.height=c+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=m+14+"px",this.dialogImg.style.left=n+e+38-t+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white"; Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; @@ -1995,114 +1995,114 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+ "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; var PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var d=q.checked||c.checked,b=parseInt(h.value)/100;isNaN(b)&&(b=1,h.value="100%");var b=.75*b,m=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(d){var t=q.checked?1:parseInt(f.value);isNaN(t)||(n=mxUtils.getScaleForPageCount(t,e,m))}e.getGraphBounds();var k=t=0,m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*b);m.height=Math.ceil(m.height*b);n*=b;!d&&e.pageVisible?(b=e.getPageLayout(),t-=b.x*m.width,k-=b.y*m.height): -d=!0;d=PrintDialog.createPrintPreview(e,n,m,0,t,k,d);d.open();a&&PrintDialog.printPreview(d)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var r=document.createElement("span");mxUtils.write(r," "+mxResources.get("fitPage")); -k.appendChild(r);mxEvent.addListener(r,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.checked});d.appendChild(k);p.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);r=document.createElement("span");mxUtils.write(r," "+mxResources.get("posterPrint")+":");k.appendChild(r);mxEvent.addListener(r, -"click",function(a){c.checked=!c.checked;q.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);p.appendChild(d);mxEvent.addListener(c,"change", -function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.checked=!c.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var h=document.createElement("input");h.setAttribute("value","100 %");h.setAttribute("size","5");h.style.width="50px";k.appendChild(h);d.appendChild(k);p.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2; -k.style.paddingTop="20px";k.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&k.appendChild(r);if(PrintDialog.previewEnabled){var m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});m.className="geBtn";k.appendChild(m)}m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});m.className="geBtn gePrimaryBtn";k.appendChild(m);a.editor.cancelFirst|| -k.appendChild(r);d.appendChild(k);p.appendChild(d);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}; -PrintDialog.createPrintPreview=function(a,b,e,d,k,l,p){b=new mxPrintPreview(a,b,e,d,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; +PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||d.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,n=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var r=q.checked?1:parseInt(f.value);isNaN(r)||(m=mxUtils.getScaleForPageCount(r,e,n))}e.getGraphBounds();var k=r=0,n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*b);n.height=Math.ceil(n.height*b);m*=b;!c&&e.pageVisible?(b=e.getPageLayout(),r-=b.x*n.width,k-=b.y*n.height): +c=!0;c=PrintDialog.createPrintPreview(e,m,n,0,r,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");c=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage")); +k.appendChild(t);mxEvent.addListener(t,"click",function(a){q.checked=!q.checked;d.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){d.checked=!q.checked});c.appendChild(k);p.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");k.appendChild(t);mxEvent.addListener(t, +"click",function(a){d.checked=!d.checked;q.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);p.appendChild(c);mxEvent.addListener(d,"change", +function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.checked=!d.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);c.appendChild(k);p.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2; +k.style.paddingTop="20px";k.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst|| +k.appendChild(t);c.appendChild(k);p.appendChild(c);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}; +PrintDialog.createPrintPreview=function(a,b,e,c,k,l,p){b=new mxPrintPreview(a,b,e,c,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==n?(m.removeAttribute("title"),m.style.fontSize="",m.innerHTML=mxResources.get("change")+"..."):(m.setAttribute("title",n.src),m.style.fontSize="11px",m.innerHTML=n.src.substring(0,42)+"...")}var d=a.editor.graph,k,l,p=document.createElement("table");p.style.width= -"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var r=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td"); -mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var c=document.createElement("button");c.style.width="18px";c.style.height="18px";c.style.marginRight="20px";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";var f=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(c)}); -l.appendChild(c);mxUtils.write(l,mxResources.get("gridSize")+":");var h=document.createElement("input");h.setAttribute("type","number");h.setAttribute("min","0");h.style.width="40px";h.style.marginLeft="6px";h.value=d.getGridSize();l.appendChild(h);mxEvent.addListener(h,"change",function(){var a=parseInt(h.value);h.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+ -":");k.appendChild(l);l=document.createElement("td");var m=document.createElement("a");m.style.textDecoration="underline";m.style.cursor="pointer";m.style.color="#a0a0a0";var n=d.backgroundImage;mxEvent.addListener(m,"click",function(c){a.showBackgroundImageDialog(function(a){n=a;e()});mxEvent.consume(c)});e();l.appendChild(m);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var g= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&l.appendChild(g);var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==h.value&&d.setGridSize(parseInt(h.value));var c=new ChangePageSetup(a,f,n,r.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=n?n.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&& -c.ignoreColor&&c.ignoreImage||d.model.execute(c)});x.className="geBtn gePrimaryBtn";l.appendChild(x);a.editor.cancelFirst||l.appendChild(g);k.appendChild(l);q.appendChild(k);p.appendChild(q);this.container=p}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,c,b){if(b||h!=document.activeElement&&m!=document.activeElement){a=!1;for(c=0;c<g.length;c++)b=g[c],t?"custom"==b.key&&(q.value=b.key,t=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&& -e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(r.style.display="",f.style.display="none"):(h.value=e.width/100,m.value=e.height/100,v.setAttribute("selected","selected"), -l.setAttribute("checked","checked"),l.defaultChecked=!0,r.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var r=document.createElement("div");r.style.marginLeft= -"4px";r.style.width="210px";r.style.height="24px";l.style.marginRight="6px";r.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));r.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";r.appendChild(p);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));r.appendChild(c);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height= -"24px";var h=document.createElement("input");h.setAttribute("size","7");h.style.textAlign="right";f.appendChild(h);mxUtils.write(f," in x ");var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";f.appendChild(m);mxUtils.write(f," in");r.style.display="none";f.style.display="none";for(var n={},g=PageSetupDialog.getFormats(),x=0;x<g.length;x++){var u=g[x];n[u.key]=u;var v=document.createElement("option");v.setAttribute("value",u.key);mxUtils.write(v,u.title);q.appendChild(v)}var t= -!1;k();a.appendChild(q);mxUtils.br(a);a.appendChild(r);a.appendChild(f);var A=e,y=function(){var a=n[q.value];null!=a.format?(h.value=a.format.width/100,m.value=a.format.height/100,f.style.display="none",r.style.display=""):(r.style.display="none",f.style.display="");isNaN(parseFloat(h.value))&&(h.value=e.width/100);isNaN(parseFloat(m.value))&&(m.value=e.height/100);a=new mxRectangle(0,0,Math.floor(100*parseFloat(h.value)),Math.floor(100*parseFloat(m.value)));"custom"!=q.value&&p.checked&&(a=new mxRectangle(0, -0,a.height,a.width));if(a.width!=A.width||a.height!=A.height)A=a,null!=d&&d(A)};mxEvent.addListener(b,"click",function(a){l.checked=!0;y();mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;y();mxEvent.consume(a)});mxEvent.addListener(h,"blur",y);mxEvent.addListener(h,"click",y);mxEvent.addListener(m,"blur",y);mxEvent.addListener(m,"click",y);mxEvent.addListener(p,"change",y);mxEvent.addListener(l,"change",y);mxEvent.addListener(q,"change",function(){t="custom"==q.value;y()}); -y();return{set:function(a){e=a;k(null,null,!0)},get:function(){return A},widthInput:h,heightInput:m}}; +var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function e(){null==m?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",m.src),n.style.fontSize="11px",n.innerHTML=m.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,p=document.createElement("table");p.style.width= +"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var t=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td"); +mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var f=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(d)}); +l.appendChild(d);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=c.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+ +":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var m=c.backgroundImage;mxEvent.addListener(n,"click",function(d){a.showBackgroundImageDialog(function(a){m=a;e()});mxEvent.consume(d)});e();l.appendChild(n);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h= +mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==g.value&&c.setGridSize(parseInt(g.value));var d=new ChangePageSetup(a,f,m,t.get());d.ignoreColor=c.background==f;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=m?m.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&& +d.ignoreColor&&d.ignoreImage||c.model.execute(d)});w.className="geBtn gePrimaryBtn";l.appendChild(w);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);q.appendChild(k);p.appendChild(q);this.container=p}; +PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,d,b){if(b||g!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<h.length;d++)b=h[d],r?"custom"==b.key&&(q.value=b.key,r=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&& +e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(t.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,v.setAttribute("selected","selected"), +l.setAttribute("checked","checked"),l.defaultChecked=!0,t.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var t=document.createElement("div");t.style.marginLeft= +"4px";t.style.width="210px";t.style.height="24px";l.style.marginRight="6px";t.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));t.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";t.appendChild(p);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));t.appendChild(d);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height= +"24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");t.style.display="none";f.style.display="none";for(var m={},h=PageSetupDialog.getFormats(),w=0;w<h.length;w++){var u=h[w];m[u.key]=u;var v=document.createElement("option");v.setAttribute("value",u.key);mxUtils.write(v,u.title);q.appendChild(v)}var r= +!1;k();a.appendChild(q);mxUtils.br(a);a.appendChild(t);a.appendChild(f);var A=e,x=function(){var a=m[q.value];null!=a.format?(g.value=a.format.width/100,n.value=a.format.height/100,f.style.display="none",t.style.display=""):(t.style.display="none",f.style.display="");isNaN(parseFloat(g.value))&&(g.value=e.width/100);isNaN(parseFloat(n.value))&&(n.value=e.height/100);a=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(a=new mxRectangle(0, +0,a.height,a.width));if(a.width!=A.width||a.height!=A.height)A=a,null!=c&&c(A)};mxEvent.addListener(b,"click",function(a){l.checked=!0;x();mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){p.checked=!0;x();mxEvent.consume(a)});mxEvent.addListener(g,"blur",x);mxEvent.addListener(g,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"change",x);mxEvent.addListener(l,"change",x);mxEvent.addListener(q,"change",function(){r="custom"==q.value;x()}); +x();return{set:function(a){e=a;k(null,null,!0)},get:function(){return A},widthInput:g,heightInput:n}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)", format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect= -mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}), -mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape= -null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",h="";if(a.isGridEnabled()){h=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",h=a.gridSize*this.scale*this.gridSteps): -d="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);h=-Math.round(h-mxUtils.mod(this.translate.x*this.scale-c,h))+"px "+-Math.round(h-mxUtils.mod(this.translate.y*this.scale-e,h))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=h,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor= -b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=h,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],h=1;h<this.gridSteps;h++){var e=h*b;d.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+ -c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var c= -this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+d,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,h=this.view.translate,e=this.pageFormat,n=d*this.pageScale,g=this.view.getBackgroundPageBounds();b=g.width;c=g.height;var k= -new mxRectangle(d*h.x,d*h.y,e.width*n,e.height*n),u=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,v=a?Math.ceil(b/k.width)-1:0,t=g.x+b,q=g.y+c;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?u:v,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(g.x),Math.round(g.y+(b+1)*k.height)), -new mxPoint(Math.round(t),Math.round(g.y+(b+1)*k.height))]:[new mxPoint(Math.round(g.x+(b+1)*k.width),Math.round(g.y)),new mxPoint(Math.round(g.x+(b+1)*k.width),Math.round(q))];null!=a[b]?(a[b].points=d,a[b].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[b]=d)}for(b=c;b<a.length;b++)a[b].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; -var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var f=0;f<d.length;f++)if(this.graph.getModel().isVertex(d[f])){var h=this.graph.getCellGeometry(d[f]);if(null!=h&&h.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()? -!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,h=this.graph.pageScale,e=d.width*h,d=d.height*h,h=Math.floor(Math.min(0,b)/e),n=Math.floor(Math.min(0, -c)/d);return new mxRectangle(this.scale*(this.translate.x+h*e),this.scale*(this.translate.y+n*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/e)-h)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-n)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft= -a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,h,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=l.apply(this,arguments),h=b.getParent(d); -if(null==c||c!=d&&c!=h)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(h)&&b.isVertex(h)&&!this.graph.isContainer(h);)d=h,h=this.graph.getModel().getParent(d);return d};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=p.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),h=d.getParent(a);null!=h;){if(this.graph.isCellSelected(h)&&d.isVertex(h)){c=!0;break}h=d.getParent(h)}return c};mxGraphHandler.prototype.selectDelayed= -function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&& -(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src); -this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||d.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown= -k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var c=mxEvent.getSource(a); -if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer); -0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var l=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return l||p.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()|| -mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&& -(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var r=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return r.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var c=!1,f=null,h=null,m=null,n=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a= -this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==m)this.toolbar.createTextToolbar();else{for(var g=0;g<m.length;g++)this.toolbar.container.appendChild(m[g]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=h}c=d.cellEditor.isContentEditing();f=a;h=e;m=b}}),g=this,x=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){x.apply(this, -arguments);n();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=g.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));g.toolbar.setFontName(b);g.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea, -"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var u=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){u.apply(this,arguments);n()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(G){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c, -b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "), -A="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],h;for(h in c.style)a[h]!=c.style[h]&&(b.push(c.style[h]),f.push(h));h=d.getModel().getStyle(c.cell);for(var e=null!=h?h.split(";"):[],g=0;g<e.length;g++){var m=e[g],n=m.indexOf("=");0<=n&&(h=m.substring(0,n),m=m.substring(n+1),null!=a[h]&&"none"==m&&(b.push(m),f.push(h)))}d.getModel().isEdge(c.cell)? -d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],w="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "), -F=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)t.push(F[a][b]);for(a=0;a<A.length;a++)0>mxUtils.indexOf(t,A[a])&&t.push(A[a]);var B=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(m),h=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var g= -h[f[e]];null!=g&&d.setCellStyles(f[e],g,a)}else for(g=0;g<a.length;g++){for(var m=a[g],n=b.getStyle(m),u=null!=n?n.split(";"):[],K=t.slice(),e=0;e<u.length;e++){var v=u[e],k=v.indexOf("=");if(0<=k){var x=v.substring(0,k),q=mxUtils.indexOf(K,x);0<=q&&K.splice(q,1);for(var w=0;w<F.length;w++){var l=F[w];if(0<=mxUtils.indexOf(l,x))for(var p=0;p<l.length;p++){var y=mxUtils.indexOf(K,l[p]);0<=y&&K.splice(y,1)}}}}for(var h=(f=b.isEdge(m))?d.currentEdgeStyle:d.currentVertexStyle,r=b.getStyle(m),e=0;e<K.length;e++){var x= -K[e],G=h[x];null==G||"shape"==x&&!f||f&&!(0>mxUtils.indexOf(A,x))||(r=mxUtils.setStyle(r,x,G))}b.setStyle(m,r)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){B(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){B(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));B(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a, -c){var b=c.getProperty("cells"),f=!1,h=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(h=d.getModel().isEdge(b[e])||h)||!f);e++);else h=f=!0;for(var b=c.getProperty("keys"),g=c.getProperty("values"),e=0;e<b.length;e++){var m=0<=mxUtils.indexOf(y,b[e]);if("strokeColor"!=b[e]||null!=g[e]&&"none"!=g[e])if(0<=mxUtils.indexOf(A,b[e]))h||0<=mxUtils.indexOf(w,b[e])?null==g[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=g[e]:f&&0<=mxUtils.indexOf(t,b[e])&&(null== -g[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=g[e]);else if(0<=mxUtils.indexOf(t,b[e])){if(f||m)null==g[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=g[e];if(h||m||0<=mxUtils.indexOf(w,b[e]))null==g[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=g[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!= -this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+ -("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape? -"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW], -mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||"12"),b=d.getView().getState(d.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,c=b.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE, -a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var b=c.getProperty("cells"),f=c.getProperty("parent");d.getModel().isLayer(f)&&!d.isCellVisible(f)&&null!=b&&0<b.length&&d.getModel().setVisible(f,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}), +(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect= +mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),d.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,d),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){a.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}), +mxUtils.bind(this,function(d){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(d)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape= +null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,d=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",c="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(d))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",g=a.gridSize*this.scale*this.gridSteps): +c="url("+this.gridImage+")";var e=d=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),d=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-d,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,a.view.backgroundPageShape.node.style.backgroundImage=c,a.view.backgroundPageShape.node.style.backgroundColor= +b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=g,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],g=1;g<this.gridSteps;g++){var e=g*b;c.push("M 0 "+e+" L "+d+" "+e+" M "+e+" 0 L "+e+" "+d)}return'<svg width="'+ +d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d= +this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+c,f))+"px";d.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,g=this.view.translate,e=this.pageFormat,m=c*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;d=h.height;var k= +new mxRectangle(c*g.x,c*g.y,e.width*m,e.height*m),u=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(d/k.height)-1:0,v=a?Math.ceil(b/k.width)-1:0,r=h.x+b,q=h.y+d;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?u:v,b=0;b<=d;b++){var c=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(b+1)*k.height)), +new mxPoint(Math.round(r),Math.round(h.y+(b+1)*k.height))]:[new mxPoint(Math.round(h.x+(b+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(b+1)*k.width),Math.round(q))];null!=a[b]?(a[b].points=c,a[b].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),a[b]=c)}for(b=d;b<a.length;b++)a[b].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; +var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var f=0;f<c.length;f++)if(this.graph.getModel().isVertex(c[f])){var g=this.graph.getCellGeometry(c[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,d){return this.isConnecting()? +!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,g=this.graph.pageScale,e=c.width*g,c=c.height*g,g=Math.floor(Math.min(0,b)/e),m=Math.floor(Math.min(0, +d)/c);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+m*c),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/c)-m)*c)};var c=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){c.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft= +a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,d,c,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),d=b.getParent(this.graph.getSelectionCell()),c=l.apply(this,arguments),g=b.getParent(c); +if(null==d||d!=c&&d!=g)for(;!this.graph.isCellSelected(c)&&!this.graph.isCellSelected(g)&&b.isVertex(g)&&!this.graph.isContainer(g);)c=g,g=this.graph.getModel().getParent(c);return c};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var d=p.apply(this,arguments);if(!d)for(var c=this.graph.getModel(),g=c.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&c.isVertex(g)){d=!0;break}g=c.getParent(g)}return d};mxGraphHandler.prototype.selectDelayed= +function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var d=this.graph.view.getState(b);if(null==d||!a.isSource(d.control))for(var d=this.graph.getModel(),c=d.getParent(b);!this.graph.isCellSelected(c)&&d.isVertex(c);)b=c,c=d.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),d=b.getParent(a);b.isVertex(d)&&!this.graph.isContainer(d);)this.graph.isCellSelected(d)&& +(a=d),d=b.getParent(d);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var c=this.editor.graph;c.lightbox=e;mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src); +this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,c.isEnabled=function(){return!1},c.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||c.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown= +k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var d=mxEvent.getSource(a); +if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer); +0<mxEvent.getClientX(a)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var l=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return l||p.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()|| +mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&& +(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var t=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return t.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var d=!1,f=null,g=null,n=null,m=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a= +this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var h=0;h<n.length;h++)this.toolbar.container.appendChild(n[h]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}d=c.cellEditor.isContentEditing();f=a;g=e;n=b}}),h=this,w=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){w.apply(this, +arguments);m();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=h.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));h.toolbar.setFontName(b);h.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea, +"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var u=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){u.apply(this,arguments);m()};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(G){}var v=c.fireMouseEvent;c.fireMouseEvent=function(a,d, +b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,d,b){this.menus.createPopupMenu(a,d,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var r="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "), +A="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],f=[],g;for(g in d.style)a[g]!=d.style[g]&&(b.push(d.style[g]),f.push(g));g=c.getModel().getStyle(d.cell);for(var e=null!=g?g.split(";"):[],n=0;n<e.length;n++){var h=e[n],m=h.indexOf("=");0<=m&&(g=h.substring(0,m),h=h.substring(m+1),null!=a[g]&&"none"==h&&(b.push(h),f.push(g)))}c.getModel().isEdge(d.cell)? +c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "), +F=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)r.push(F[a][b]);for(a=0;a<A.length;a++)0>mxUtils.indexOf(r,A[a])&&r.push(A[a]);var B=function(a,d){var b=c.getModel();b.beginUpdate();try{if(d)for(var f=b.isEdge(h),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var n= +g[f[e]];null!=n&&c.setCellStyles(f[e],n,a)}else for(n=0;n<a.length;n++){for(var h=a[n],m=b.getStyle(h),u=null!=m?m.split(";"):[],K=r.slice(),e=0;e<u.length;e++){var v=u[e],k=v.indexOf("=");if(0<=k){var w=v.substring(0,k),q=mxUtils.indexOf(K,w);0<=q&&K.splice(q,1);for(var z=0;z<F.length;z++){var l=F[z];if(0<=mxUtils.indexOf(l,w))for(var p=0;p<l.length;p++){var x=mxUtils.indexOf(K,l[p]);0<=x&&K.splice(x,1)}}}}for(var g=(f=b.isEdge(h))?c.currentEdgeStyle:c.currentVertexStyle,t=b.getStyle(h),e=0;e<K.length;e++){var w= +K[e],G=g[w];null==G||"shape"==w&&!f||f&&!(0>mxUtils.indexOf(A,w))||(t=mxUtils.setStyle(t,w,G))}b.setStyle(h,t)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){B(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){B(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));B(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a, +d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),n=d.getProperty("values"),e=0;e<b.length;e++){var h=0<=mxUtils.indexOf(x,b[e]);if("strokeColor"!=b[e]||null!=n[e]&&"none"!=n[e])if(0<=mxUtils.indexOf(A,b[e]))g||0<=mxUtils.indexOf(z,b[e])?null==n[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=n[e]:f&&0<=mxUtils.indexOf(r,b[e])&&(null== +n[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=n[e]);else if(0<=mxUtils.indexOf(r,b[e])){if(f||h)null==n[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=n[e];if(g||h||0<=mxUtils.indexOf(z,b[e]))null==n[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=n[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!= +this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle||"none"==c.currentEdgeStyle.edgeStyle||null==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+ +("vertical"==c.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==c.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==c.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==c.currentEdgeStyle.shape? +"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(c.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_ENDARROW], +mxUtils.getValue(c.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=c.currentVertexStyle.fontFamily||"Helvetica",d=String(c.currentVertexStyle.fontSize||"12"),b=c.getView().getState(c.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,d=b.style[mxConstants.STYLE_FONTSIZE]||d,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(d)}),c.getSelectionModel().addListener(mxEvent.CHANGE,a),c.getModel().addListener(mxEvent.CHANGE, +a));c.addListener(mxEvent.CELLS_ADDED,function(a,d){var b=d.getProperty("cells"),f=d.getProperty("parent");c.getModel().isLayer(f)&&!c.isCellVisible(f)&&null!=b&&0<b.length&&c.getModel().setVisible(f,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}), 0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged", -mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30; +mxUtils.bind(this,function(){c.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){c.view.validateBackground()}));c.addListener("gridSizeChanged",mxUtils.bind(this,function(){c.isGridEnabled()&&c.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30; EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?118:208;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4; EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()})); var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9==a.which&&b.isEnabled()&&!mxEvent.isAltDown(a)&&(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))}; EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a)))}; EditorUi.prototype.isImmediateEditingEvent=function(a){return!0}; -EditorUi.prototype.getCssClassForMarker=function(a,b,e,d){return"flexArrow"==b?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":e==mxConstants.ARROW_CLASSIC?"1"==d?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==d?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+ -a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==d?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==d?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==d?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":e==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond": -"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==d||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+ +EditorUi.prototype.getCssClassForMarker=function(a,b,e,c){return"flexArrow"==b?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":e==mxConstants.ARROW_CLASSIC?"1"==c?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==c?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+ +a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==c?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==c?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==c?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==c?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":e==mxConstants.ARROW_DIAMOND_THIN?"1"==c?"geSprite geSprite-"+a+"thindiamond": +"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==c?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==c||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+ a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null}; EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())}; -EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste", -!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()}; -EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale* -a.width*c.width,this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,f){if(null!=a.container){d=null!=d?d:0;f=null!=f?f:0;var h=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),g=a.view.translate,m=a.view.scale,n=mxRectangle.fromRectangle(h); -n.x=n.x/m-g.x;n.y=n.y/m-g.y;n.width/=m;n.height/=m;var g=a.container.scrollTop,u=a.container.scrollLeft,v=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)v+=3;var t=a.container.offsetWidth-v,v=a.container.offsetHeight-v;c=c?Math.max(.3,Math.min(b||1,t/n.width)):m;b=(t-c*n.width)/2/c;var k=0==this.lightboxVerticalDivider?0:(v-c*n.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),k=Math.max(k,0));if(e||h.width<t||h.height<v)a.view.scaleAndTranslate(c, -Math.floor(b-n.x),Math.floor(k-n.y)),a.container.scrollTop=g*c/m,a.container.scrollLeft=u*c/m;else if(0!=d||0!=f)h=a.view.translate,a.view.setTranslate(Math.floor(h.x+d/m),Math.floor(h.y+f/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView", -mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace= -"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]|| -0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var l=0,k=mxUtils.bind(this,function(a,c,b){l++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=b&&d.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d); -return d}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var r=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")), -c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";r.style.paddingLeft="4px";r.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(r.style.display="",p.style.display="",q.style.display="inline-block"):(r.style.display="none",p.style.display= -"none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(c){a.lightbox?(1==a.view.scale? -this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var h=null,m=null,n=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);h=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);h=null;m=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";m= -null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=k(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog, -"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff"; -mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){x.style.display=1<u.getChildCount(u.root)? +EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(c){c.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var c=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste", +!1,null):e=c.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()}; +EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*d.width),this.scale*(this.translate.y+a.y*d.height),this.scale* +a.width*d.width,this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),n=a.view.translate,h=a.view.scale,m=mxRectangle.fromRectangle(g); +m.x=m.x/h-n.x;m.y=m.y/h-n.y;m.width/=h;m.height/=h;var n=a.container.scrollTop,u=a.container.scrollLeft,r=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)r+=3;var v=a.container.offsetWidth-r,r=a.container.offsetHeight-r;d=d?Math.max(.3,Math.min(b||1,v/m.width)):h;b=(v-d*m.width)/2/d;var k=0==this.lightboxVerticalDivider?0:(r-d*m.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),k=Math.max(k,0));if(e||g.width<v||g.height<r)a.view.scaleAndTranslate(d, +Math.floor(b-m.x),Math.floor(k-m.y)),a.container.scrollTop=n*d/h,a.container.scrollLeft=u*d/h;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/h),Math.floor(g.y+f/h))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView", +mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace= +"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]|| +0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var l=0,k=mxUtils.bind(this,function(a,d,b){l++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c); +return c}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var t=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")), +d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";t.style.paddingLeft="4px";t.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(t.style.display="",p.style.display="",q.style.display="inline-block"):(t.style.display="none",p.style.display= +"none",q.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(d){a.lightbox?(1==a.view.scale? +this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var g=null,n=null,m=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";n= +null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var w=k(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog, +"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=w.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff"; +mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){w.style.display=1<u.getChildCount(u.root)? "":"none"})}this.addChromelessToolbarItems(k);null!=this.editor.editButtonLink&&k(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage, -mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||g(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)}); -mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX= -b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var t= -a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}t.apply(this,arguments)};var A=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*b.x+c.width* -d.width),h=Math.ceil(2*b.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=h)a.minimumGraphSize=new mxRectangle(0,0,f,h);f=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?A.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale), -this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var y=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= -(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,f=0;null!=y&&(d=a.container.offsetWidth/2-y.x+c.x,f=a.container.offsetHeight/2-y.y+c.y);c=this.view.scale; -this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==f||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((mxEvent.isAltDown(c)||mxEvent.isControlDown(c)&&!mxClient.IS_MAC|| -a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(c);null!=d;){if(d==a.container){y=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}d=d.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; +mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||h(30),m())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)}); +mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():h(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX= +b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?m():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var r= +a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}r.apply(this,arguments)};var A=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width* +c.width),g=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?A.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale), +this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var x=null;a.lazyZoom=function(d){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);d?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= +(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var d=mxUtils.getOffset(a.container),c=0,f=0;null!=x&&(c=a.container.offsetWidth/2-x.x+d.x,f=a.container.offsetHeight/2-x.y+d.y);d=this.view.scale; +this.zoom(this.cumulativeZoomFactor);this.view.scale!=d&&(null!=b&&e.chromelessResize(!1,null,c*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==c&&0==f||(a.container.scrollLeft-=c*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b){if((mxEvent.isAltDown(d)||mxEvent.isControlDown(d)&&!mxClient.IS_MAC|| +a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var c=mxEvent.getSource(d);null!=c;){if(c==a.container){x=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d));a.lazyZoom(b);mxEvent.consume(d);break}c=c.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a}; EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))}; EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))}; EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.chromeless)return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")}; -EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange(); +EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange(); this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())}; EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}}; EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(e){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()}; @@ -2113,27 +2113,27 @@ EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.e 0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,a.scrollTileSize.height* a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-b.height)/ 4))-b.y)))}; -EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,k=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y* -b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=d;this.ignoreImage=this.ignoreColor=!1} +EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),c=0,k=0;e&&(c=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-c,b.container.scrollTop=b.view.translate.y* +b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,c){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=c;this.ignoreImage=this.ignoreColor=!1} ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(this.image=this.previousImage,b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat), -this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})(); +this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);return c};mxCodecRegistry.register(a)})(); EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))}; EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))}; EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))}; -EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing; -this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);d()};d()}; -EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var p=k[l];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(e=!0);if(d&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l= -0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()|| -d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())|| +EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,c=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,c);e.addListener(mxEvent.UNDO,c);e.addListener(mxEvent.REDO,c);e.addListener(mxEvent.CLEAR,c);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);c()};var l=this.editor.graph.cellEditor.stopEditing; +this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);c()};c()}; +EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,c=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var p=k[l];a.getModel().isEdge(p)&&(c=!0);a.getModel().isVertex(p)&&(e=!0);if(c&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l= +0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(c);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);c=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()|| +c&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||c&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(c&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())|| 0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1== a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount()); this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()}; -EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&& -(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var r= -this.footerHeight+k,q=Math.max(0,Math.min(d-p-r,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=r+"px"}r=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=r+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left= +EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,c=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,c=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&& +(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var t= +this.footerHeight+k,q=Math.max(0,Math.min(c-p-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=t+"px"}t=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=t+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left= null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width, -b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-r)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom= -this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=r+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom= +b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-t)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom= +this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=t+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom= this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand")); this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom= @@ -2143,106 +2143,106 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit, !0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};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,e,d){function k(a){if(null!=p){var h=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?h.x-p.x:p.y-h.y)-e));mxEvent.consume(a);q!=f()&&(r=!0,c=null)}}function l(a){k(a);p=q=null}var p=null,q=null,r=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));q=f();r=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!r){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,d,k,l,p){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,p);this.dialogs.push(this.dialog)}; +EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,q+(b?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(t=!0,d=null)}}function l(a){k(a);p=q=null}var p=null,q=null,t=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));q=f();t=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!t){var b=null!=d?d-e:0;d=f();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,p){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,p);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),this.editor.fireEvent(new mxEventObject("hideDialog")))}; -EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(k.container,230,430,!0,!1);k.init()}; +EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),k=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(k.container,230,430,!0,!1);k.init()}; EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})}; -EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("<mxGraphModel ");if(0<=e){var d=a.lastIndexOf("</mxGraphModel>");d>e&&(b=a.substring(e,d+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(k){}return b}; +EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("<mxGraphModel ");if(0<=e){var c=a.lastIndexOf("</mxGraphModel>");c>e&&(b=a.substring(e,c+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(k){}return b}; EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&& (b=e);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(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.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, "_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}}; -EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}}; -EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=l&&0<l.length){var p=new Image;p.onload=function(){e(l,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()}; +EditorUi.prototype.executeLayout=function(a,b,e){var c=this.editor.graph;if(c.isEnabled()){c.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(c),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(c.getModel().endUpdate(),null!=e&&e())}}}; +EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var k=c.saveSelection(),l=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=l&&0<l.length){var p=new Image;p.onload=function(){e(l,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()}; EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else a(null)}; EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()}; EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b}; -EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),h=0;h<f.length;h++)if(d.getModel().isVertex(f[h])&&d.isCellResizable(f[h])){var e=d.getCellGeometry(f[h]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[h],e))}}finally{d.getModel().endUpdate()}}else f= -d.getSelectionCell(),h=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(h)),null!=e&&e.constructor==mxStackLayout?(e=h.getIndex(f),37==a||38==a?d.model.add(h,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(h,f,Math.min(d.model.getChildCount(h),e+1))):(h=f=0,37==a?f=-c:38==a?h=-c:39==a?f=c:40==a&&(h=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,h))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0< -p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&& -!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,r={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction,f={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),80:this.actions.get("connectionPoints")}; -mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var h=f[a.keyCode];if(null!=h)return h.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=r[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),r[a.keyCode], -d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return c.apply(this,arguments)};k.bindAction=mxUtils.bind(this, -function(a,c,b,d){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):d?k.bindShiftKey(a,b):k.bindKey(a,b))});var h=k.escape;k.escape=function(a){h.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut"); -k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72, +EditorUi.prototype.createKeyHandler=function(a){function b(a,d,b){p.push(function(){if(!c.isSelectionEmpty()&&c.isEnabled())if(d=null!=d?d:1,b){c.getModel().beginUpdate();try{for(var f=c.getSelectionCells(),g=0;g<f.length;g++)if(c.getModel().isVertex(f[g])&&c.isCellResizable(f[g])){var e=c.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-d):38==a?e.height=Math.max(0,e.height-d):39==a?e.width+=d:40==a&&(e.height+=d),c.getModel().setGeometry(f[g],e))}}finally{c.getModel().endUpdate()}}else f= +c.getSelectionCell(),g=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?c.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(g,f,Math.min(c.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0< +p.length){c.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{c.getModel().endUpdate()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&& +!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,t={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=k.getFunction,f={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),80:this.actions.get("connectionPoints")}; +mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var g=f[a.keyCode];if(null!=g)return g.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=t[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=c.connectVertex(c.getSelectionCell(),t[a.keyCode], +c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(c.view.getState(c.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null)}}return d.apply(this,arguments)};k.bindAction=mxUtils.bind(this, +function(a,d,b,c){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},d?c?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):c?k.bindShiftKey(a,b):k.bindKey(a,b))});var g=k.escape;k.escape=function(a){g.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){c.exitGroup()});k.bindControlShiftKey(35,function(){c.enterGroup()});k.bindKey(36,function(){c.home()});k.bindKey(35,function(){c.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut"); +k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){c.isEnabled()&&c.foldCells(!0)}),k.bindControlKey(35,function(){c.isEnabled()&&c.foldCells(!1)}),k.bindControlKey(13,function(){c.isEnabled()&&c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72, !0,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0, "toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0, -"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),k.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k}; +"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){c.isEnabled()&&c.startEditingAtCell()}),k.bindKey(113,function(){c.isEnabled()&&c.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k}; EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&& (mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window, "scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1; (function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1; mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]"; -Graph=function(a,b,e,d,k){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a); -return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,r=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var f=d.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=d,null!= -f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY())?r=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(r=f.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&& -!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var h=this.selectionCellsHandler.getHandler(d.cell);if(null!=h&&null!=h.bends&&0<h.bends.length){var e=h.getHandleForEvent(p),g=this.view.getEdgeStyle(d);f=g==mxEdgeStyle.EntityRelation;c||r!=mxEvent.LABEL_HANDLE||(e=r);if(f&&0!=e&&e!=h.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f|| -null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=d.visibleSourceState||e==h.bends.length-1||null!=d.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=d.absolutePoints,null!=f&&(null==g&&null==e||g==mxEdgeStyle.OrthConnector)&&(e=r,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)? -e=h.bends.length-1:null!=g&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(d,l.x,l.y),e=null==g?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),h.start(b.getGraphX(),b.getGraphX(),e),r=l=p=q=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){h=null;f=d.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(), -b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))h="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))h="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)g=this.view.getEdgeStyle(d),h="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(g=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()), -g<f.length-1&&0<=g&&(h=0==Math.round(f[g].x-f[g+1].x)?"col-resize":"row-resize"));null!=h&&d.setCursor(h)}}),mouseUp:mxUtils.bind(this,function(a,c){r=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};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(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= -function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,h=b.width*d,b=b.height*d,d=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),m=0;m<g.width;m++)c.push(new mxRectangle(((g.x+m)*h+d.x)*e,(g.y*b+d.y)*e,h*e,b*e));for(m=0;m<g.height;m++)c.push(new mxRectangle((g.x*h+d.x)*e,((g.y+m)*b+d.y)*e,h*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= -function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],d=0;d<c.length;d++){var f=this.graph.view.getState(c[d]),f=null!=f?f.style:this.graph.getCellStyle(c[d]); -"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(c[d]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(c,f)&&b.push(f)):b.push(c[d])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var h=new mxRubberband(this); -this.getRubberband=function(){return h};var m=(new Date).getTime(),n=0,g=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;g.apply(this,arguments);a!=this.currentState?(m=(new Date).getTime(),n=0):n=(new Date).getTime()-m};var x=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<n||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style, -"outlineConnect","1"))&&x.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=h.isForceRubberbandEvent;h.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var t=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&& -(t=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=t)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var A=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return A.apply(this,arguments);var c=a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&window.open(c))}; -var y=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return y.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,f,h){h=null!=h?h:[];if(0<b||0<d){var e=this.getModel(),g=a+b,m=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var n=e.getChildCount(f),K=0;K<n;K++){var u= -e.getChildAt(f,K),t=this.view.getState(u);if(null!=t&&this.isCellVisible(u)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var v=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(t=mxUtils.getBoundingBox(t,v));(e.isEdge(u)||e.isVertex(u))&&t.x>=a&&t.y+t.height<=m&&t.y>=c&&t.x+t.width<=g&&h.push(u);this.getAllCells(a,c,b,d,u,h)}}}return h};var w=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)? -!1:w.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();F=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, -mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),h.start(b.x,b.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored= -function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var B=this.updateMouseEvent;this.updateMouseEvent=function(a){a=B.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}}; +Graph=function(a,b,e,c,k){mxGraph.call(this,a,b,e,c);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var d=this.view.getState(a);a=null!=d?d.style:this.getCellStyle(a); +return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,t=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),q=f,p=c,null!= +f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?t=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(t=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&& +!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(c=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),h=this.view.getEdgeStyle(c);f=h==mxEdgeStyle.EntityRelation;d||t!=mxEvent.LABEL_HANDLE||(e=t);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f|| +null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==g.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=t,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)? +e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),t=l=p=q=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){g=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(), +b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)h=this.view.getEdgeStyle(c),g="crosshair",h!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(h=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()), +h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&c.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,d){t=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};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(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= +function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,g=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),n=0;n<h.width;n++)d.push(new mxRectangle(((h.x+n)*g+c.x)*e,(h.y*b+c.y)*e,g*e,b*e));for(n=0;n<h.height;n++)d.push(new mxRectangle((h.x*g+c.x)*e,((h.y+n)*b+c.y)*e,g*e,b*e));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= +function(a,d){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var d=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],c=0;c<d.length;c++){var f=this.graph.view.getState(d[c]),f=null!=f?f.style:this.graph.getCellStyle(d[c]); +"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this); +this.getRubberband=function(){return g};var n=(new Date).getTime(),m=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),m=0):m=(new Date).getTime()-n};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<m||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style, +"outlineConnect","1"))&&w.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var r=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&& +(r=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=r)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var A=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return A.apply(this,arguments);var d=a.getCell();null!=d&&(d=this.getLinkForCell(d),null!=d&&window.open(d))}; +var x=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return x.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,g){g=null!=g?g:[];if(0<b||0<c){var e=this.getModel(),h=a+b,n=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),K=0;K<m;K++){var r= +e.getChildAt(f,K),u=this.view.getState(r);if(null!=u&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var v=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(u=mxUtils.getBoundingBox(u,v));(e.isEdge(r)||e.isVertex(r))&&u.x>=a&&u.y+u.height<=n&&u.y>=d&&u.x+u.width<=h&&g.push(r);this.getAllCells(a,d,b,c,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)? +!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();F=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, +mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),g.start(b.x,b.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);F=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||a)};this.connectionHandler.constraintHandler.isStateIgnored= +function(a,d){return d&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var B=this.updateMouseEvent;this.updateMouseEvent=function(a){a=B.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}}; Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6; Graph.createSvgImage=function(a,b,e){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null; Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400); Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0]; -Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),r=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!= -b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,r);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isPageLink=function(a){return!1}; -Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)){if(!this.isEnabled()){var d=a.view.graph.isBlankLink(b)?a.view.graph.linkTarget:"_top";b=a.view.graph.getAbsoluteUrl(b);"_self"==d&&window!=window.top?window.location.href=b:b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top?window.location.hash=b.split("#")[1]:(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))&& -window.open(b,d)}mxEvent.consume(e)}};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)}; +Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),t=mxUtils.bind(this,function(d){if(k)for(var b=mxEvent.getSource(d);null!= +b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,t);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isPageLink=function(a){return!1}; +Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)){if(!this.isEnabled()){var c=a.view.graph.isBlankLink(b)?a.view.graph.linkTarget:"_top";b=a.view.graph.getAbsoluteUrl(b);"_self"==c&&window!=window.top?window.location.href=b:b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top?window.location.hash=b.split("#")[1]:(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))&& +window.open(b,c)}mxEvent.consume(e)}};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)}; Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a);a=null!=b?b.style:this.graph.getCellStyle(a);return"stackLayout"==a.childLayout?(b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a, "resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.fill=!0,b):"treeLayout"==a.childLayout?(b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance", 30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b):"flowLayout"==a.childLayout?(b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing", mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize}; -Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),l=Math.floor(d/a.height);return new mxRectangle(k,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-l)}; +Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),c=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),l=Math.floor(c/a.height);return new mxRectangle(k,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((c+Math.floor(b.height/this.view.scale))/a.height)-l)}; Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")}; Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)}; Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))}; Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b}; Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", -shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| -/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",r=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),h=a[q+"FullYear"](),m=a[q+"Hours"](),n=a[q+"Minutes"](),g=a[q+"Seconds"](),q=a[q+"Milliseconds"](),x=e?0:a.getTimezoneOffset(),u={d:r,dd:p(r),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:d.i18n.monthNames[f],mmmm:d.i18n.monthNames[f+ -12],yy:String(h).slice(2),yyyy:h,h:m%12||12,hh:p(m%12||12),H:m,HH:p(m),M:n,MM:p(n),s:g,ss:p(g),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>m?"a":"p",tt:12>m?"am":"pm",T:12>m?"A":"P",TT:12>m?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<x?"-":"+")+p(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<r%10?0:(10!=r%100-r%10)*r%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1, +shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var c=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,p=function(a,d){a=String(a);for(d=d||2;a.length<d;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| +/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",t=a[q+"Date"](),d=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),n=a[q+"Hours"](),m=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),w=e?0:a.getTimezoneOffset(),u={d:t,dd:p(t),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:f+1,mm:p(f+1),mmm:c.i18n.monthNames[f],mmmm:c.i18n.monthNames[f+ +12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:m,MM:p(m),s:h,ss:p(h),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<w?"-":"+")+p(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][3<t%10?0:(10!=t%100-t%10)*t%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1, a.length-1)})}; -Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)(function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),k.defaultChecked= -!0);e.appendChild(k);var q=d.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a}; -Graph.prototype.replacePlaceholders=function(a,b){for(var e=[],d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(p))}e.push(b.substring(d, -match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; -Graph.prototype.connectVertex=function(a,b,e,d,k,l){l=l?l:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); -var q=this.view.scale,r=this.view.translate,c=r.x*q,r=r.y*q;this.model.isVertex(e.cell)&&(c=e.x,r=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*q,r+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l= -null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var c=a,f=this.getCellGeometry(a);null!= -f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var h=this.view.getState(c),m=null!=h?h.style:this.getCellStyle(c);if(mxUtils.getValue(m,"part",!1)){var n=this.model.getParent(c);this.model.isVertex(n)&&(c=n)}q=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var g=mxEvent.isControlDown(d)&&k||null==l&&null!=f&&f.constructor==mxStackLayout? -null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=g&&this.connectionHandler.insertBeforeSource){var x=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=g.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==g.parent&&(x=d.parent.getIndex(d),this.model.add(d.parent,g,x))}null==l&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(x=a.parent.getIndex(a),this.model.add(a.parent, -q,x));null!=g&&e.push(g);null==l&&null!=q&&e.push(q);null==q&&null!=g&&g.geometry.setTerminalPoint(p,!1);null!=g&&this.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{this.model.endUpdate()}return e}; -Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")}; -Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)}; +Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)(function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(c)&&(k.setAttribute("checked","checked"),k.defaultChecked= +!0);e.appendChild(k);var q=c.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a}; +Graph.prototype.replacePlaceholders=function(a,b){for(var e=[],c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(p))}e.push(b.substring(c, +match.index)+(null!=l?l:k));c=match.index+k.length}}e.push(b.substring(c));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; +Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); +var q=this.view.scale,t=this.view.translate,d=t.x*q,t=t.y*q;this.model.isVertex(e.cell)&&(d=e.x,t=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(d+p.x*q,t+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l= +null));if(k=!mxEvent.isShiftDown(c)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var d=a,f=this.getCellGeometry(a);null!= +f&&f.relative;)d=this.getModel().getParent(d),f=this.getCellGeometry(d);var g=this.view.getState(d),n=null!=g?g.style:this.getCellStyle(d);if(mxUtils.getValue(n,"part",!1)){var m=this.model.getParent(d);this.model.isVertex(m)&&(d=m)}q=this.duplicateCells([d],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(c)&&k||null==l&&null!=f&&f.constructor==mxStackLayout? +null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var w=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=h.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==h.parent&&(w=c.parent.getIndex(c),this.model.add(c.parent,h,w))}null==l&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent, +q,w));null!=h&&e.push(h);null==l&&null!=q&&e.push(q);null==q&&null!=h&&h.geometry.setTerminalPoint(p,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e}; +Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,c;for(c in this.model.cells)if(e=this.model.cells[c],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")}; +Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,c=null;null==c&&null!=e;)null!=e.value&&"object"==typeof e.value&&(c=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return c||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)}; Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null}; Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b}; -Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)}; -Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var r=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=r){var f=this.model.getParent(e[l]),h=this.layoutManager.getLayout(f); -null==h?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,r,c):null!=k&&mxEvent.isAltDown(k)||h.constructor!=mxStackLayout||h.resizeLast||this.resizeParentStacks(f,h,r,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; -Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}}; -Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=d+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a, +Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var c=this.layoutManager.getLayout(this.model.getParent(a));null!=c&&c.constructor==mxStackLayout&&(c.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)}; +Graph.prototype.foldCells=function(a,b,e,c,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var t=Math.round(q.width-p.width/this.view.scale),d=Math.round(q.height-p.height/this.view.scale);if(0!=d||0!=t){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f); +null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,t,d):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,t,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; +Graph.prototype.moveSiblings=function(a,b,e,c){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}}; +Graph.prototype.resizeParentStacks=function(a,b,e,c){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=c+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a, l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)}; Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)}; Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()}; Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)}; -Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a, -b){return a.name<b.name?-1:a.name>b.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isPageLink(d[k].value)||(b+=("link"!=d[k].name?d[k].name+":":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")}; +Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var c=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&c.push({name:a[k].nodeName,value:a[k].nodeValue});c.sort(function(a, +b){return a.name<b.name?-1:a.name>b.name?1:0});for(k=0;k<c.length;k++)"link"==c[k].name&&this.isPageLink(c[k].value)||(b+=("link"!=c[k].name?c[k].name+":":"")+mxUtils.htmlEntities(c[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")}; Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))}; -Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0; +Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var c=a.charCodeAt(e);(32<=c||9==c||10==c||13==c)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0; HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(26,14,'<path d="m 1 14 L 13 1 L 26 14 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(14,26,'<path d="m 1 1 L 14 13 L 1 26 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26); HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(26,14,'<path d="m 1 1 L 13 14 L 26 1 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(14,26,'<path d="m 14 1 L 1 13 L 14 26 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26); HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26); @@ -2251,123 +2251,123 @@ HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;b HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE, this.repaintHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE, mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()}); -var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(d.getState());null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&& -null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.isActive()&&null!=this.mouseDownPoint&&Math.abs(d.getGraphX()-this.mouseDownPoint.x)<this.graph.tolerance&&Math.abs(d.getGraphY()-this.mouseDownPoint.y)<this.graph.tolerance?b||this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(), -d.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)}; +var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,c){b=!1;var e=c.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(c.getState());null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(c.getState()),c.getGraphX(),c.getGraphY());null!=this.graph.connectionHandler&& +null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.isActive()&&null!=this.mouseDownPoint&&Math.abs(c.getGraphX()-this.mouseDownPoint.x)<this.graph.tolerance&&Math.abs(c.getGraphY()-this.mouseDownPoint.y)<this.graph.tolerance?b||this.click(this.currentState,this.getDirection(),c):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(c.getGraphX(), +c.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,c.getGraphX(),c.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)}; HoverIcons.prototype.createArrow=function(a,b){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline": "inline-block"):(e=mxUtils.createImage(a.src),e.style.width=a.width+"px",e.style.height=a.height+"px",e.style.padding=this.tolerance+"px");null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor="crosshair";mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,this.mouseDownPoint.y), this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){this.graph.isMouseDown|| this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a}; HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState}; HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,a=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=a&&a.setHandlesVisible(!1))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))}; -HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))): +HoverIcons.prototype.click=function(a,b,e){var c=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(c)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,c),this.graph.selectCellsForConnectVertex(a,c,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(c)?this.update(this.getState(this.graph.view.getState(a[1]))): this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null}; HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing); var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+ "px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+ -"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(this.currentState.getCenterX(), -a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var d=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==d||null==k||d.height<6*k.height&&d.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"}); -l(b,this.arrowRight);l(e,this.arrowLeft);l(d,this.arrowUp);l(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title", +"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),c=this.graph.getCellAt(this.currentState.getCenterX(), +a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==c&&c==a&&(a=c=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==k||c.height<6*k.height&&c.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"}); +l(b,this.arrowRight);l(e,this.arrowLeft);l(c,this.arrowUp);l(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title", mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}}; HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a}; HoverIcons.prototype.getState=function(a){if(null!=a){a=a.cell;if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a)}return a}; -HoverIcons.prototype.update=function(a,b,e){if(this.graph.connectionArrowsEnabled){var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime); -this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()): +HoverIcons.prototype.update=function(a,b,e){if(this.graph.connectionArrowsEnabled){var c=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,c=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(c=(new Date).getTime()-this.startTime); +this.setDisplay("");null!=this.currentState&&this.currentState!=a&&c<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||c>this.activationDelay)&&this.currentState!=a&&(c>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()): this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a}; -(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,arguments);null!= -d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&& -this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var h=new mxPoint(b,f);h.type=c;d.push(h);h=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==h||h.type!=c||h.x!=b||h.y!=f},n=.5*this.scale,b=!1,d=[],g=0;g<c.length-1;g++){for(var k=c[g+1],u=c[g],v=[],t=c[g+2];g< -c.length-2&&mxUtils.ptSegDistSq(u.x,u.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,g++,t=c[g+2];for(var b=e(0,u.x,u.y)||b,q=0;q<this.validEdges.length;q++){var l=this.validEdges[q],p=l.absolutePoints;if(null!=p&&mxUtils.intersects(a,l))for(l=0;l<p.length-1;l++){for(var r=p[l+1],B=p[l],t=p[l+2];l<p.length-2&&mxUtils.ptSegDistSq(B.x,B.y,t.x,t.y,r.x,r.y)<1*this.scale*this.scale;)r=t,l++,t=p[l+2];t=mxUtils.intersection(u.x,u.y,k.x,k.y,B.x,B.y,r.x,r.y);if(null!=t&&(Math.abs(t.x-B.x)>n||Math.abs(t.y- -B.y)>n)&&(Math.abs(t.x-r.x)>n||Math.abs(t.y-r.y)>n)){r=t.x-u.x;B=t.y-u.y;t={distSq:r*r+B*B,x:t.x,y:t.y};for(r=0;r<v.length;r++)if(v[r].distSq>t.distSq){v.splice(r,0,t);t=null;break}null==t||0!=v.length&&v[v.length-1].x===t.x&&v[v.length-1].y===t.y||v.push(t)}}}for(l=0;l<v.length;l++)b=e(1,v[l].x,v[l].y)||b}t=c[c.length-1];b=e(0,t.x,t.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){this.routedPoints=null!=this.state?this.state.routedPoints: -null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),g,q=!0,u=null,v=null;g=[];var t=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var p=this.state.routedPoints[l], -w=new mxPoint(p.x/this.scale,p.y/this.scale);0==l?w=c[0]:l==this.state.routedPoints.length-1&&(w=c[c.length-1]);var r=!1;if(null!=u&&1==p.type){var B=this.state.routedPoints[l+1],p=B.x/this.scale-w.x,B=B.y/this.scale-w.y,p=p*p+B*B;null==t&&(t=new mxPoint(w.x-u.x,w.y-u.y),v=Math.sqrt(t.x*t.x+t.y*t.y),t.x=t.x*f/v,t.y=t.y*f/v);p>f*f&&0<v&&(p=u.x-w.x,B=u.y-w.y,p=p*p+B*B,p>f*f&&(r=new mxPoint(w.x-t.x,w.y-t.y),p=new mxPoint(w.x+t.x,w.y+t.y),g.push(r),this.addPoints(a,g,b,d,!1,null,q),g=0>Math.round(t.x)|| -0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,q=!1,"sharp"==e?(a.lineTo(r.x-t.y*g,r.y+t.x*g),a.lineTo(p.x-t.y*g,p.y+t.x*g),a.lineTo(p.x,p.y)):"arc"==e?(g*=1.3,a.curveTo(r.x-t.y*g,r.y+t.x*g,p.x-t.y*g,p.y+t.x*g,p.x,p.y)):(a.moveTo(p.x,p.y),q=!0),g=[p],r=!0))}else t=null;r||(g.push(w),u=w)}this.addPoints(a,g,b,d,!1,null,q);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==a||"1"!=c.style.snapToPoint&& -"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),h=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=e)var u=Math.cos(-e),v=Math.sin(-e),f=mxUtils.getRotatedPoint(f,u,v,k);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| -0);f=this.getPerimeterPoint(c,f,0==e&&h,u);0!=e&&(u=Math.cos(e),v=Math.sin(e),f=mxUtils.getRotatedPoint(f,u,v,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;for(var f=0;f<a.length;f++){var h=this.graph.getConnectionPoint(c,a[f]);if(null!=h){var m=(h.x-e.x)*(h.x-e.x)+(h.y-e.y)*(h.y-e.y);if(null==d||m<d)b=h,d=m}}null!=b&&(e=b)}return e};var p=mxStencil.prototype.evaluateTextAttribute; -mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=c.substring(8,c.length-1),d=mxUtils.parseXml(a.view.graph.decompress(b)); -return new mxShape(new mxStencil(d.documentElement))}catch(m){null!=window.console&&console.log("Error in shape: "+m)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; -mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l= +(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,d){var c=this.getState(a);null!=c&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,arguments);null!= +c&&this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,d){return e.apply(this,arguments)||null!=a.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,a.routedPoints)};var c=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){c.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&& +this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var g=new mxPoint(b,f);g.type=d;c.push(g);g=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==g||g.type!=d||g.x!=b||g.y!=f},m=.5*this.scale,b=!1,c=[],h=0;h<d.length-1;h++){for(var k=d[h+1],u=d[h],v=[],r=d[h+2];h< +d.length-2&&mxUtils.ptSegDistSq(u.x,u.y,r.x,r.y,k.x,k.y)<1*this.scale*this.scale;)k=r,h++,r=d[h+2];for(var b=e(0,u.x,u.y)||b,q=0;q<this.validEdges.length;q++){var x=this.validEdges[q],l=x.absolutePoints;if(null!=l&&mxUtils.intersects(a,x))for(x=0;x<l.length-1;x++){for(var p=l[x+1],t=l[x],r=l[x+2];x<l.length-2&&mxUtils.ptSegDistSq(t.x,t.y,r.x,r.y,p.x,p.y)<1*this.scale*this.scale;)p=r,x++,r=l[x+2];r=mxUtils.intersection(u.x,u.y,k.x,k.y,t.x,t.y,p.x,p.y);if(null!=r&&(Math.abs(r.x-t.x)>m||Math.abs(r.y- +t.y)>m)&&(Math.abs(r.x-p.x)>m||Math.abs(r.y-p.y)>m)){p=r.x-u.x;t=r.y-u.y;r={distSq:p*p+t*t,x:r.x,y:r.y};for(p=0;p<v.length;p++)if(v[p].distSq>r.distSq){v.splice(p,0,r);r=null;break}null==r||0!=v.length&&v[v.length-1].x===r.x&&v[v.length-1].y===r.y||v.push(r)}}}for(x=0;x<v.length;x++)b=e(1,v[x].x,v[x].y)||b}r=d[d.length-1];b=e(0,r.x,r.y)||b}a.routedPoints=c;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=null!=this.state?this.state.routedPoints: +null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,q=!0,u=null,v=null;h=[];var r=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var p=this.state.routedPoints[l], +z=new mxPoint(p.x/this.scale,p.y/this.scale);0==l?z=d[0]:l==this.state.routedPoints.length-1&&(z=d[d.length-1]);var t=!1;if(null!=u&&1==p.type){var B=this.state.routedPoints[l+1],p=B.x/this.scale-z.x,B=B.y/this.scale-z.y,p=p*p+B*B;null==r&&(r=new mxPoint(z.x-u.x,z.y-u.y),v=Math.sqrt(r.x*r.x+r.y*r.y),r.x=r.x*f/v,r.y=r.y*f/v);p>f*f&&0<v&&(p=u.x-z.x,B=u.y-z.y,p=p*p+B*B,p>f*f&&(t=new mxPoint(z.x-r.x,z.y-r.y),p=new mxPoint(z.x+r.x,z.y+r.y),h.push(t),this.addPoints(a,h,b,c,!1,null,q),h=0>Math.round(r.x)|| +0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,q=!1,"sharp"==e?(a.lineTo(t.x-r.y*h,t.y+r.x*h),a.lineTo(p.x-r.y*h,p.y+r.x*h),a.lineTo(p.x,p.y)):"arc"==e?(h*=1.3,a.curveTo(t.x-r.y*h,t.y+r.x*h,p.x-r.y*h,p.y+r.x*h,p.x,p.y)):(a.moveTo(p.x,p.y),q=!0),h=[p],t=!0))}else r=null;t||(h.push(z),u=z)}this.addPoints(a,h,b,c,!1,null,q);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==a||"1"!=d.style.snapToPoint&& +"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),g=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=e)var u=Math.cos(-e),v=Math.sin(-e),f=mxUtils.getRotatedPoint(f,u,v,k);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| +0);f=this.getPerimeterPoint(d,f,0==e&&g,u);0!=e&&(u=Math.cos(e),v=Math.sin(e),f=mxUtils.getRotatedPoint(f,u,v,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(d,a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||n<c)b=g,c=n}}null!=b&&(e=b)}return e};var p=mxStencil.prototype.evaluateTextAttribute; +mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b)); +return new mxShape(new mxStencil(c.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; +mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var k=b[c];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l= mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b}; -mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,l=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!= +mxStencilRegistry.loadStencilSet=function(a,b,e,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,l=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!= k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)}; -mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"), -q=d.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(k,l,a,p,q)}}d=d.nextSibling}}}; +mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var c=a.firstChild;null!=c;)"shapes"==c.nodeName&&mxStencilRegistry.parseStencilSet(c,b,e),c=c.nextSibling;else{e=null!=e?e:!0;var c=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=c.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(c));if(null!=b){var p=c.getAttribute("w"), +q=c.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(k,l,a,p,q)}}c=c.nextSibling}}}; "undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}mxConstants.HANDLE_FILLCOLOR="#99ccff";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR= "#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)|| b.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a)); -for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=e.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments),c=a.getCell; -a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+ +for(var d in this.graph.currentEdgeStyle)a.style[d]=this.graph.currentEdgeStyle[d];return a};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=e.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var c=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=c.apply(this,arguments),d=a.getCell; +a.getCell=mxUtils.bind(this,function(a){var b=d.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+ this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+ -";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.importGraphModel=function(a,c,b,d){c=null!=c? -c:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var h={},g=0;g<a;g++){var m=e.getChildAt(e.getRoot(),g);if(1!=a||this.isCellLocked(this.getDefaultParent()))m=this.importCells([m],0,0,this.model.getRoot(),null,h)[0],n=this.model.getChildren(m),this.moveCells(n,c,b),f=f.concat(n);else var n=e.getChildren(m),f=f.concat(this.importCells(n,c,b,this.getDefaultParent(), -null,h))}if(d){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var u=this.getBoundingBoxFromGeometry(f,!0);null!=u&&this.moveCells(f,c-u.x,b-u.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var d=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];d.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(Q){}return d}if(null!= -a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}}; -Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,d=0;d<c;d++){var f=this.model.getChildAt(a,d);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,"dropTarget", -"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this, -arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var d=0;d<a.length;d++){var f=a[d];if(c.isEdge(f)){var e=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,e,!1);var g=c.getGeometry(f);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var m=g.getTerminalPoint(!0),n=g.getTerminalPoint(!1); -g.setTerminalPoint(m,!1);g.setTerminalPoint(n,!0);c.setGeometry(f,g);var u=this.view.getState(f),t=this.view.getState(e),v=this.view.getState(h);if(null!=u){var k=null!=t?this.getConnectionConstraint(u,t,!0):null,K=null!=v?this.getConnectionConstraint(u,v,!1):null;this.setConnectionConstraint(f,e,!0,K);this.setConnectionConstraint(f,h,!1,k)}b.push(f)}}else if(c.isVertex(f)&&(g=this.getCellGeometry(f),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var q=g.width;g.width=g.height; -g.height=q;c.setGeometry(f,g);var x=this.view.getState(f);if(null!=x){var z=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==z?z="south":"south"==z?z="west":"west"==z?z="north":"north"==z&&(z="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,z,[f])}b.push(f)}}}finally{c.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell); -if(0<c.length)for(var b=0;b<c.length;b++)this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(d)){this.setAttributeForCell(f,d,c);break}f= -this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}for(b=0;b<d.length;b++)if(f=this.view.getState(d[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&& -this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),h=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&h==mxConstants.NONE){e=!0;for(h=0;h<this.model.getChildCount(f.cell)&&e;h++)c.get(this.model.getChildAt(f.cell,h))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d= -this.view.getState(a[b]);if(null!=d){var f=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&d==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell= -function(a,c,b){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=b&&0<b.length?d.setAttribute(c,b):d.removeAttribute(c);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,c,b,d){this.getModel();if(mxEvent.isAltDown(c))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this, -arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var d=this.model.isEdge(c)?this.view.getState(c):null,f=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=f||null!=d&&null!=d.text&&null!=d.text.node&& -(mxUtils.contains(d.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,d))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x, -b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),f=this.getPageSize(),c=Math.max(c,d.x*f.width),b=Math.max(b,d.y*f.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),d=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+ -(0==c.height?1:2)*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var f=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*f.x)/1E4;d.geometry.y=Math.round(f.y); -d.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,d.geometry),e=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-f.x,d.geometry.y=Math.round(c/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([d],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted", -"cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,c,b){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var d=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=d&&(a[b].setAttribute("href", -d),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,d);d();var f=this.container.style.cursor,e=this.getTolerance(),h=this,g={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(h,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=h.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))}, -mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=h.container.scrollLeft;this.scrollTop=h.container.scrollTop;null==this.currentLink&&"auto"==h.container.style.overflow&&(h.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(h.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>e||d>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b= -b.parentNode;null!=b?this.clear():(null==this.currentState||c.getState()!=this.currentState&&null!=c.getState()||!h.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)}},mouseUp:function(a,d){for(var f=d.getSource(),g=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(g)&& -!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))&&(null!=this.currentLink?(f=h.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(g,this.currentLink),mxEvent.isConsumed(g)||(g=f?h.linkTarget:"_top","_self"==g&&window!=window.top?window.location.href=this.currentLink:this.currentLink.substring(0,h.baseUrl.length)==h.baseUrl&&"#"==this.currentLink.charAt(h.baseUrl.length)&&"_top"==g&&window==window.top?window.location.hash=this.currentLink.split("#")[1]:window.open(this.currentLink, -g),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&Math.abs(this.startX-d.getGraphX())<e&&Math.abs(this.startY-d.getGraphY())<e&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=h.getAbsoluteUrl(h.getLinkForCell(a.cell));null!=this.currentLink&&(h.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=h.container&&(h.container.style.cursor= -f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};h.click=function(a){};h.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),h=0;h<a.length;h++){var g=b.getParent(a[h]),m=this.moveCells([e[h]],d,d,!1,g)[0]; -f.push(m);if(c)b.add(g,e[h]);else{var n=g.getIndex(a[h]);b.add(g,e[h],n+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<d.length;e++)f.push(d[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}}; -Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells()); -if(null!=c&&1<c.length){for(var b=[],d=null,f=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var h=this.view.getState(c[e]);if(null!=h){var g=a?h.getCenterX():h.getCenterY(),d=null!=d?Math.max(d,g):g,f=null!=f?Math.min(f,g):g;b.push(h)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});h=this.view.translate;g=this.view.scale;f=f/g-(a?h.x:h.y);d=d/g-(a?h.x:h.y);this.getModel().beginUpdate();try{for(var m=(d-f)/(b.length-1),d=f,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)), -u=this.getCellGeometry(b[e].cell),d=d+m;null!=u&&null!=n&&(u=u.clone(),a?u.x=Math.round(d-u.width/2)-n.origin.x:u.y=Math.round(d-u.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,u))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var f= -this.view.getState(a[d]);if(null!=f){var e=this.getCellGeometry(c[d]);null==e||!e.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(d=0;d<a.length;d++)f.add(e,c[d]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)}); -return a};Graph.prototype.getSvg=function(a,c,b,d,f,e,h){c=null!=c?c:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;h=null!=h?h:!0;var g=e||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var m=this.view.scale,n=mxUtils.createXmlDocument();d=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+ -a));null==n.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/m;d.setAttribute("width",Math.max(1,Math.ceil(g.width*a)+2*b)+"px");d.setAttribute("height",Math.max(1,Math.ceil(g.height*a)+2*b)+"px");d.setAttribute("version","1.1");var u=d;f&&(u=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),u.setAttribute("transform", -"translate(0.5,0.5)"),d.appendChild(u));n.appendChild(d);n=this.createSvgCanvas(u);n.foOffset=f?-.5:0;n.textOffset=f?-.5:0;n.imageOffset=f?-.5:0;n.translate(Math.floor((b/c-g.x)/m),Math.floor((b/c-g.y)/m));var t=n.createAlternateContent;n.createAlternateContent=function(a,c,b,d,f,e,h,g,n,m,u,v,k){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&e.length<5*d/q.fontSize)){var z=this.createElement("text");z.setAttribute("x",Math.round(d/2));z.setAttribute("y",Math.round((f+q.fontSize)/ -2));z.setAttribute("fill",q.fontColor||"black");z.setAttribute("text-anchor","middle");z.setAttribute("font-size",Math.round(q.fontSize)+"px");z.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&z.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&z.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&z.setAttribute("text-decoration","underline"); -mxUtils.write(z,e);return z}return t.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=m/c,c=this.view.translate,f=new mxRectangle(c.x*f,c.y*f,b.width*f,b.height*f),mxUtils.intersects(g,f)&&n.image(c.x,c.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=h;h=this.createSvgImageExport();var v=h.drawCellState;h.drawCellState=function(a,c){(e||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),n);return d};Graph.prototype.createSvgCanvas= -function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c= -window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(c),f=0;f<d;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)}; -Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var f=document.createElement("th");b.rows[d].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(d=0;d<b.rows.length;d++)f=b.rows[d].insertCell(c),mxUtils.br(f);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,d=0;d<b.length;d++)b[d].cells.length>c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c; -if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){c=null!=c?c:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title", -a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<c.length&&(c=c.substring(0,26)+"..."+c.substring(c.length-10));mxUtils.write(b,c);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&& -null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,d=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,h){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()), -b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, -arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,d=a.rangeCount;b<d;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection= -function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(S){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)|| -!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor"; -this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border= -"")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var d=b.firstChild;null!=a&&null!=d;)c(a,d),a=a.nextSibling,d=d.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)d(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var f=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=f}}function d(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;d(c);c=b}1==a.nodeType&&("BR"=== +";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d? +d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},h=0;h<a;h++){var n=e.getChildAt(e.getRoot(),h);if(1!=a||this.isCellLocked(this.getDefaultParent()))n=this.importCells([n],0,0,this.model.getRoot(),null,g)[0],m=this.model.getChildren(n),this.moveCells(m,d,b),f=f.concat(m);else var m=e.getChildren(n),f=f.concat(this.importCells(m,d,b,this.getDefaultParent(), +null,g))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var r=this.getBoundingBoxFromGeometry(f,!0);null!=r&&this.moveCells(f,d-r.x,b-r.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(Q){}return c}if(null!= +a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);null!=d&&(d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,d,[a]))}}; +Graph.prototype.isValidRoot=function(a){for(var d=this.model.getChildCount(a),b=0,c=0;c<d;c++){var f=this.model.getChildAt(a,c);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(d,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(d,"dropTarget", +"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(a){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this, +arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),g=d.getTerminal(f,!1);d.setTerminal(f,g,!0);d.setTerminal(f,e,!1);var h=d.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var n=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1); +h.setTerminalPoint(n,!1);h.setTerminalPoint(m,!0);d.setGeometry(f,h);var r=this.view.getState(f),u=this.view.getState(e),v=this.view.getState(g);if(null!=r){var k=null!=u?this.getConnectionConstraint(r,u,!0):null,K=null!=v?this.getConnectionConstraint(r,v,!1):null;this.setConnectionConstraint(f,e,!0,K);this.setConnectionConstraint(f,g,!1,k)}b.push(f)}}else if(d.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var q=h.width;h.width=h.height; +h.height=q;d.setGeometry(f,h);var w=this.view.getState(f);if(null!=w){var y=w.style[mxConstants.STYLE_DIRECTION]||"east";"east"==y?y="south":"south"==y?y="west":"west"==y?y="north":"north"==y&&(y="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,y,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell); +if(0<d.length)for(var b=0;b<d.length;b++)this.isReplacePlaceholders(d[b])&&this.view.invalidate(d[b],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,d,b){d=this.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(c)){this.setAttributeForCell(f,c,d);break}f= +this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",d);d=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var d=new mxDictionary,b=0;b<a.length;b++)d.put(a[b],!0);for(var c=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||d.get(f)||(d.put(f,!0),c.push(f))}for(b=0;b<c.length;b++)if(f=this.view.getState(c[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&& +this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(f.cell)&&e;g++)d.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var d=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var c= +this.view.getState(a[b]);if(null!=c){var f=mxUtils.getValue(c.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(c.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&c==mxConstants.NONE&&d.push(a[b])}}a=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,d){this.setAttributeForCell(a,"link",d)};Graph.prototype.setTooltipForCell=function(a,d){this.setAttributeForCell(a,"tooltip",d)};Graph.prototype.setAttributeForCell= +function(a,d,b){var c;null!=a.value&&"object"==typeof a.value?c=a.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",a.value||""));null!=b&&0<b.length?c.setAttribute(d,b):c.removeAttribute(d);this.model.setValue(a,c)};Graph.prototype.getDropTarget=function(a,d,b,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this, +arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,d){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,f=mxEvent.getSource(a);this.firstClickState!=c||this.firstClickSource!=f||null!=c&&null!=c.text&&null!=c.text.node&& +(mxUtils.contains(c.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(a)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(d=this.addText(b.x,b.y,c))}mxGraph.prototype.dblClick.call(this,a,d)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x, +b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),f=this.getPageSize(),d=Math.max(d,c.x*f.width),b=Math.max(b,c.y*f.height);return new mxPoint(this.snap(d+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,d=this.getGraphBounds(),b=this.getInsertPoint(),c=this.snap(Math.round(Math.max(b.x,d.x/a.scale-a.translate.x+(0==d.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(d.y+d.height)/a.scale-a.translate.y+ +(0==d.height?1:2)*this.gridSize)));return new mxPoint(c,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,d,b){var c=new mxCell;c.value="Text";c.style="text;html=1;resizable=0;points=[];";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=b){c.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";c.geometry.relative=!0;c.connectable=!1;var f=this.view.getRelativePoint(b,a,d);c.geometry.x=Math.round(1E4*f.x)/1E4;c.geometry.y=Math.round(f.y); +c.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,c.geometry),e=this.view.scale;c.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((d-f.y)/e))}else c.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(a/this.view.scale)-f.x,c.geometry.y=Math.round(d/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([c],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted", +"cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,d,b){var c=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("href", +c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,e=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=g.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))}, +mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,d){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>e||c>e)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b= +b.parentNode;null!=b?this.clear():(null==this.currentState||d.getState()!=this.currentState&&null!=d.getState()||!g.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d)}},mouseUp:function(a,c){for(var f=c.getSource(),h=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==c.getState()||!c.isSource(c.getState().control))&&(mxEvent.isLeftMouseButton(h)&& +!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(h,this.currentLink),mxEvent.isConsumed(h)||(h=f?g.linkTarget:"_top","_self"==h&&window!=window.top?window.location.href=this.currentLink:this.currentLink.substring(0,g.baseUrl.length)==g.baseUrl&&"#"==this.currentLink.charAt(g.baseUrl.length)&&"_top"==h&&window==window.top?window.location.hash=this.currentLink.split("#")[1]:window.open(this.currentLink, +h),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor= +f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=b.getParent(a[g]),n=this.moveCells([e[g]],c,c,!1,h)[0]; +f.push(n);if(d)b.add(h,e[g]);else{var m=h.getIndex(a[g]);b.add(h,e[g],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}}; +Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells()); +if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var g=this.view.getState(d[e]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});g=this.view.translate;h=this.view.scale;f=f/h-(a?g.x:g.y);c=c/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)), +r=this.getCellGeometry(b[e].cell),c=c+n;null!=r&&null!=m&&(r=r.clone(),a?r.x=Math.round(c-r.width/2)-m.origin.x:r.y=Math.round(c-r.height/2)-m.origin.y,this.getModel().setGeometry(b[e].cell,r))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f= +this.view.getState(a[c]);if(null!=f){var e=this.getCellGeometry(d[c]);null==e||!e.relative||this.model.isEdge(a[c])||b.get(this.model.getParent(a[c]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(e,d[c]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)}); +return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g){d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var h=e||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var n=this.view.scale,m=mxUtils.createXmlDocument();c=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=c.style?c.style.backgroundColor=a:c.setAttribute("style","background-color:"+ +a));null==m.createElementNS?(c.setAttribute("xmlns",mxConstants.NS_SVG),c.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/n;c.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*b)+"px");c.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*b)+"px");c.setAttribute("version","1.1");var r=c;f&&(r=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),r.setAttribute("transform", +"translate(0.5,0.5)"),c.appendChild(r));m.appendChild(c);m=this.createSvgCanvas(r);m.foOffset=f?-.5:0;m.textOffset=f?-.5:0;m.imageOffset=f?-.5:0;m.translate(Math.floor((b/d-h.x)/n),Math.floor((b/d-h.y)/n));var u=m.createAlternateContent;m.createAlternateContent=function(a,d,b,c,f,e,g,h,m,n,r,v,k){var q=this.state;if(null!=this.foAltText&&(0==c||0!=q.fontSize&&e.length<5*c/q.fontSize)){var y=this.createElement("text");y.setAttribute("x",Math.round(c/2));y.setAttribute("y",Math.round((f+q.fontSize)/ +2));y.setAttribute("fill",q.fontColor||"black");y.setAttribute("text-anchor","middle");y.setAttribute("font-size",Math.round(q.fontSize)+"px");y.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&y.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&y.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&y.setAttribute("text-decoration","underline"); +y.innerHTML=e;return y}return u.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=n/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(h,f)&&m.image(d.x,d.y,b.width,b.height,b.src,!0));m.scale(a);m.textEnabled=g;g=this.createSvgImageExport();var v=g.drawCellState;g.drawCellState=function(a,d){(e||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),m);return c};Graph.prototype.createSvgCanvas= +function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var d=null;if(window.getSelection){if(d= +window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),f=0;f<c;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)}; +Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d; +if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,d){d=null!=d?d:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title", +a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<d.length&&(d=d.substring(0,26)+"..."+d.substring(d.length-10));mxUtils.write(b,d);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&& +null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()), +b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, +arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection= +function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(S){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)|| +!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor"; +this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border= +"")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}1==a.nodeType&&("BR"=== a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode|| -mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0, -g.length-1));g=this.graph.sanitizeHtml(c?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,h=(mxUtils.getValue(a.style, -mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle= -h?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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.innerHTML="");var g=mxUtils.htmlEntities(this.textarea.innerHTML); -mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(c?g.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"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.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var r=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a, -c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.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)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth< +mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0, +h.length-1));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style, +mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle= +g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,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.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML); +mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a, +d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE))); +this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth< this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="", -r.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= -function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var c=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer= -function(){try{this.graph.container.focus()}catch(K){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell], -!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var h=mxGraphHandler.prototype.moveCells; -mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,e){mxEvent.isAltDown(e)&&(f=null);h.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width- -this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null== -mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var m=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a= -new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=m.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+ -"°":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint= -function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-d.x),d=this.roundLength(b.y/f-d.y);this.hint.innerHTML=e+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&& -null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint; +t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= +function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(a.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var d=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer= +function(){try{this.graph.container.focus()}catch(K){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell], +!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var g=mxGraphHandler.prototype.moveCells; +mxGraphHandler.prototype.moveCells=function(a,d,b,c,f,e){mxEvent.isAltDown(e)&&(f=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/c-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/c-b.y);this.hint.innerHTML=d+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width- +this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,d){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(d.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null== +mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,d){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a= +new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=this.sizers[0].bounds.width+d,a.y=this.sizers[0].bounds.height+d):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+ +"°":(d=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/d)+" x "+this.roundLength(this.bounds.height/d)),d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==d&&(d=this.bounds),this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=d.y+d.height+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint= +function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var c=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-c.x),c=this.roundLength(b.y/f-c.y);this.hint.innerHTML=e+", "+c;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&& +null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint; HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="#007dfc" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="#007dfc" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'): new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="#007dfc" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA6ZJREFUeNqM001IY1cUB/D/fYmm2sbR2lC1zYlgoRG6MpEyBlpxM9iFIGKFIm3s0lCKjOByhCLZCFqLBF1YFVJdSRbdFHRhBbULtRuFVBTzYRpJgo2mY5OX5N9Fo2TG+eiFA/dd3vvd8+65ByTxshARTdf1JySp6/oTEdFe9T5eg5lIcnBwkCSZyWS+exX40oyur68/KxaLf5Okw+H4X+A9JBaLfUySZ2dnnJqaosPhIAACeC34DJRKpb7IZrMcHx+nwWCgUopGo/EOKwf9fn/1CzERUevr6+9ls1mOjIwQAH0+H4PBIKPR6D2ofAQCgToRUeVYJUkuLy8TANfW1kiS8/PzCy84Mw4MDBAAZ2dnmc/nub+/X0MSEBF1cHDwMJVKsaGhgV6vl+l0mqOjo1+KyKfl1dze3l4NBoM/PZ+diFSLiIKIGBOJxA9bW1sEwNXVVSaTyQMRaRaRxrOzs+9J8ujoaE5EPhQRq67rcZ/PRwD0+/3Udf03EdEgIqZisZibnJykwWDg4eEhd3Z2xkXELCJvPpdBrYjUiEhL+Xo4HH4sIhUaAKNSqiIcDsNkMqG+vh6RSOQQQM7tdhsAQCkFAHC73UUATxcWFqypVApmsxnDw8OwWq2TADQNgAYAFosF+XweyWQSdru9BUBxcXFRB/4rEgDcPouIIx6P4+bmBi0tLSCpAzBqAIqnp6c/dnZ2IpfLYXNzE62traMADACKNputpr+/v8lms9UAKAAwiMjXe3t7KBQKqKurQy6Xi6K0i2l6evpROp1mbW0t29vbGY/Hb8/IVIqq2zlJXl1dsaOjg2azmefn5wwEAl+JSBVExCgi75PkzMwMlVJsbGxkIpFgPp8PX15ePopEIs3JZPITXdf/iEajbGpqolKKExMT1HWdHo/nIxGpgIgoEXnQ3d39kCTHxsYIgC6Xi3NzcwyHw8xkMozFYlxaWmJbWxuVUuzt7WUul6PX6/1cRN4WEe2uA0SkaWVl5XGpRVhdXU0A1DSNlZWVdz3qdDrZ09PDWCzG4+Pjn0XEWvp9KJKw2WwKwBsA3gHQHAqFfr24uMDGxgZ2d3cRiUQAAHa7HU6nE319fTg5Ofmlq6vrGwB/AngaCoWK6rbsNptNA1AJoA7Aux6Pp3NoaMhjsVg+QNmIRqO/u1yubwFEASRKUAEA7rASqABUAKgC8KAUb5XWCOAfAFcA/gJwDSB7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=": IMAGE_PATH+"/handle-rotate.png",19,21);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#007dfc"/>'));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage= @@ -2375,232 +2375,232 @@ HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverI Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src, (new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxVertexHandler.prototype.rotationHandleVSpacing= -20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())}; -if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return null== -a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var n=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){n.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return mxEvent.isLeftMouseButton(c)&& -(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,d=null,f=null,e=null,h=null;null!=this.first&& -null!=this.currentX&&null!=this.currentY&&(d=this.first.x,f=this.first.y,e=(this.currentX-d)/this.graph.view.scale,h=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),h=this.graph.snap(h),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(h)<this.graph.tolerance&&(h=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),g= -this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(g=this.graph.getCellsBeyond(d,f,this.graph.getDefaultParent(),!0,!0),b=0;b<g.length;b++)if(this.graph.isCellMovable(g[b])){var n=this.graph.view.getState(g[b]),m=this.graph.getCellGeometry(g[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,h),this.graph.model.setGeometry(g[b],m))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y, -this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,f=this.first.x-d,e=this.first.y-b,h=this.graph.tolerance;if(null!=this.div||Math.abs(f)>h||Math.abs(e)>h)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,b), -this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left= +if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return null== +a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var m=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){m.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&& +(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,d){var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,g=null;null!=this.first&& +null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),h= +this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var m=this.graph.view.getState(h[b]),n=this.graph.getCellGeometry(h[b]);null!=m&&null!=n&&(n=n.clone(),n.translate(e,g),this.graph.model.setGeometry(h[b],n))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y, +this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b), +this.isSpaceEvent(d)?(c=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left= this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height= -Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var g=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);g.apply(this, -arguments)};var x=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){v.apply(this,arguments);b!=this.currentTerminalState?(x=(new Date).getTime(),u=0):u=(new Date).getTime()-x;this.currentTerminalState=b};var t=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState|| -"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&t.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b), -f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE? -HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return y.apply(this, -arguments)};var w=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):w.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown; -mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells|| -this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var G=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp= -function(a,c){G.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display= -1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state)); -c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(b,d);if(null!=b||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!= -this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d= -document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/edit.gif");d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage); -d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"), -mxUtils.getTextContent(b[d])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var H=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!= -this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE, -this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.apply(this); -if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b, -c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var E=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy= +Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),d.consume()}};var h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);h.apply(this, +arguments)};var w=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){v.apply(this,arguments);b!=this.currentTerminalState?(w=(new Date).getTime(),u=0):u=(new Date).getTime()-w;this.currentTerminalState=b};var r=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState|| +"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&r.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,d){var b=null!=a&&0==a,c=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b), +f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE? +HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return x.apply(this, +arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):z.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown; +mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells|| +this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var G=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp= +function(a,d){G.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display= +1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state)); +d()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,b){if(null==d&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!= +this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=d||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var c= +document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/edit.gif");c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));c=document.createElement("img");c.setAttribute("src",Dialog.prototype.clearImage); +c.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));c.setAttribute("width","13");c.setAttribute("height","10");c.style.marginLeft="4px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(c=0;c<b.length;c++){var f=document.createElement("div");f.style.marginTop=null!=d||0<c?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[c].getAttribute("href"), +mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var H=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!= +this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(d,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(d,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE, +this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=d||null!=b&&0<b.length)this.updateLinkHint(d,b),this.redrawHandles()};var y=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){y.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.apply(this); +if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=d&&(b=Math.max(b, +d.y+d.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var E=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy= function(){I.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Y=mxEdgeHandler.prototype.redrawHandles; mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Y.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var R=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset= function(){R.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var P=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler), -this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function r(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function h(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function g(a,c){this.canvas= -a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,g.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,g.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,g.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,g.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,g.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,g.prototype.arcTo)}function x(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function t(){mxActor.call(this)}function A(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function B(){mxShape.call(this)}function G(){mxShape.call(this)} -function C(){mxEllipse.call(this)}function H(){mxShape.call(this)}function z(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function I(){mxShape.call(this)}function Y(){mxShape.call(this)}function R(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function K(){mxDoubleEllipse.call(this)}function J(){mxArrowConnector.call(this);this.spacing=0}function M(){mxArrowConnector.call(this);this.spacing=0}function S(){mxActor.call(this)}function D(){mxRectangleShape.call(this)} +this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function t(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function m(){mxActor.call(this)}function h(a,d){this.canvas= +a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,h.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,h.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,h.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,h.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; +this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function r(){mxActor.call(this)}function A(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function B(){mxShape.call(this)}function G(){mxShape.call(this)} +function C(){mxEllipse.call(this)}function H(){mxShape.call(this)}function y(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function I(){mxShape.call(this)}function Y(){mxShape.call(this)}function R(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function K(){mxDoubleEllipse.call(this)}function J(){mxArrowConnector.call(this);this.spacing=0}function M(){mxArrowConnector.call(this);this.spacing=0}function S(){mxActor.call(this)}function D(){mxRectangleShape.call(this)} function W(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(){mxActor.call(this)}function U(){mxActor.call(this)}function T(){mxActor.call(this)}function O(){mxActor.call(this)}function ca(){mxActor.call(this)}function V(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function ia(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function fa(){mxRhombus.call(this)}function ja(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)} -function qa(){mxEllipse.call(this)}function na(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Aa(a,c,b,d,f,e,h,g,m,n){h+=m;var ga=d.clone();d.x-=f*(2*h+m);d.y-=e*(2*h+m);f*=h+m;e*=h+m;return function(){a.ellipse(ga.x-f-h,ga.y-e-h,2*h,2*h);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d, -Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube", -a);var xa=Math.tan(mxUtils.toRadians(30)),la=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/xa);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*la);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-la)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(d,f/(.5+xa));e?(a.moveTo(0,.25*c),a.lineTo(.5* -c,(.5-la)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-la)*c),a.lineTo(.5*c,(1-la)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*la),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-la)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e|| -(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,f-c),a.curveTo(d,f+c/3,0,f+c/3,0,f-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore", -d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d-c,0),a.lineTo(d-c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d/2,.5*f,d,0);a.quadTo(.5* -d,f/2,d,f);a.quadTo(d/2,.5*f,0,f);a.quadTo(.5*d,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var h=mxUtils.getValue(this.style,"tabPosition",this.tabPosition); -e?"left"==h?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==h?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style, -mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(r,mxActor);r.prototype.size=.4;r.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,f-c/2);a.quadTo(3* -d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};r.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,d)}return a};mxCellRenderer.registerShape("tape", -r);mxUtils.extend(c,mxActor);c.prototype.size=.3;c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};c.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close(); -a.end()};mxCellRenderer.registerShape("document",c);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a, -[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(h,mxActor);h.prototype.size=.2;h.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,f)],this.isRounded, -b,!0)};mxCellRenderer.registerShape("trapezoid",h);mxUtils.extend(m,mxActor);m.prototype.size=.5;m.prototype.redrawPath=function(a,c,b,d,f){a.setFillColor(null);c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f/2),new mxPoint(0,f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(d,f)],this.isRounded,b,!1);a.end()}; -mxCellRenderer.registerShape("curlyBracket",m);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,c,b,d,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",n);g.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};g.prototype.close=function(){null!=this.firstX&& -null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};g.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};g.prototype.curveTo=function(a,c,b,d,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};g.prototype.arcTo=function(a,c,b,d,f,e,h){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY= -h};g.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),e=Math.sqrt(d*d+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var h=Math.round(e/10),ga=this.defaultVariation;5>h&&(h=5,ga/=3);for(var g=b(a-this.lastX)*d/h,b=b(c-this.lastY)*f/h,d=d/e,f=f/e,e=0;e<h;e++){var m=(Math.random()-.5)*ga;this.originalLineTo.call(this.canvas, -g*e+this.lastX-m*f,b*e+this.lastY-m*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};g.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint= -function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new g(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)}; -var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,d,f){if(null==a.handJiggle)Ga.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE, -0)?e=Math.min(d/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(d*e,f*e)),a.moveTo(c+e,b),a.lineTo(c+d-e,b),a.quadTo(c+d,b,c+d,b+e),a.lineTo(c+d,b+f-e),a.quadTo(c+d,b+f,c+d-e,b+f),a.lineTo(c+e,b+f),a.quadTo(c,b+f,c,b+f-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+f),a.lineTo(c,b+f),a.lineTo(c, -b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(x,mxRectangleShape);x.prototype.size=.1;x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c= -a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*f,b*f));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};x.prototype.paintForeground=function(a,c,b,d,f){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var h= -mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*h,f*h));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+f);a.moveTo(c+d-e,b);a.lineTo(c+d-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",x);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,c,b,d,f){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,f);a.fill()};u.prototype.paintForeground= -function(a,c,b,d,f){};mxCellRenderer.registerShape("transparent",u);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,c,b,d,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),h=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-b),new mxPoint(Math.min(d,e+g),f-b),new mxPoint(h,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout", -v);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.redrawPath=function(a,c,b,d,f){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d- -c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(A,mxHexagon);A.prototype.size=.25;A.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*f),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)], -this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",A);mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.paintForeground=function(a,c,b,d,f){var e=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+e);a.lineTo(c+d/2,b+f-e);a.moveTo(c+e,b+f/2);a.lineTo(c+d-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",y);var Ba=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds= -function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,f){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&(a.setShadow(!1),Ba.apply(this,[a,c, -b,d,f]))}};mxUtils.extend(w,mxRectangleShape);w.prototype.isHtmlAllowed=function(){return!1};w.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};w.prototype.paintForeground=function(a,c,b,d,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| -0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,h;do{h=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=h){var g=this.style["symbol"+e+"Align"],ga=this.style["symbol"+e+"VerticalAlign"],m=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||u,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(d+this.strokewidth, -f+this.strokewidth),u+=v,t+=v);var v=c,k=b,v=g==mxConstants.ALIGN_CENTER?v+(d-m)/2:g==mxConstants.ALIGN_RIGHT?v+(d-m-u):v+u,k=ga==mxConstants.ALIGN_MIDDLE?k+(f-n)/2:ga==mxConstants.ALIGN_BOTTOM?k+(f-n-t):k+t;a.save();g=new h;g.style=this.style;h.prototype.paintVertexShape.call(g,a,v,k,m,n);a.restore()}e++}while(null!=h)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",w);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,c,b,d,f,e){e? -(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(B,mxShape);B.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()}; -mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(G,mxShape);G.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};G.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",G);mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(a,c, -b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",C);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+ -a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};z.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",z);mxUtils.extend(L,mxRectangleShape);L.prototype.size=40;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.getLabelBounds= -function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};L.prototype.paintBackground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),h=mxUtils.getValue(this.style,"participant");null==h||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,d,e):(h=this.state.view.graph.cellRenderer.getShape(h),null!=h&&h!=L&&(h=new h, -h.apply(this.state),a.save(),h.paintVertexShape(a,c,b,d,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+e),a.lineTo(c+d/2,b+f),a.end(),a.stroke())};L.prototype.paintForeground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",L);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner= -10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};E.prototype.paintBackground=function(a,c,b,d,f){var e=this.corner,h=Math.min(d,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style, -mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(c,b,d,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,d,f),a.setGradient(this.fill,this.gradient,c,b,d,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+h,b);a.lineTo(c+h,b+Math.max(0,g-1.5*e));a.lineTo(c+Math.max(0,h-e),b+g);a.lineTo(c,b+g);a.close();a.fillAndStroke();a.begin(); -a.moveTo(c+h,b);a.lineTo(c+d,b);a.lineTo(c+d,b+f);a.lineTo(c,b+f);a.lineTo(c,b+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=L.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+d,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter); -mxPerimeter.OrthogonalPerimeter=function(a,c,b,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,d){d=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(d+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x< -a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",v.prototype.size))* -c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var h=a.x,g=a.y,m=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+ -m,g+e),new mxPoint(h+m,g+n),new mxPoint(h,g+n-e),new mxPoint(h,g)]):(e=m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h+e,g),new mxPoint(h+m,g),new mxPoint(h+m-e,g+n),new mxPoint(h,g+n),new mxPoint(h+e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(b.x<h||b.x>h+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=h.prototype.size;null!=c&&(f= -mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,m=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+m-f,g),new mxPoint(e+m,g+n),new mxPoint(e,g+n),new mxPoint(e+f,g)]):c==mxConstants.DIRECTION_WEST?(f=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(e,g),new mxPoint(e+m,g),new mxPoint(e+m-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e, -g)]):c==mxConstants.DIRECTION_NORTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(e,g+f),new mxPoint(e+m,g),new mxPoint(e+m,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f)]):(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(e,g),new mxPoint(e+m,g+f),new mxPoint(e+m,g+n-f),new mxPoint(e,g+n),new mxPoint(e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter); -mxPerimeter.StepPerimeter=function(a,c,b,d){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?t.prototype.fixedSize:t.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var h=a.x,g=a.y,m=a.width,n=a.height,u=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+m- -f,g),new mxPoint(h+m,a),new mxPoint(h+m-f,g+n),new mxPoint(h,g+n),new mxPoint(h+f,a),new mxPoint(h,g)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h+f,g),new mxPoint(h+m,g),new mxPoint(h+m-f,a),new mxPoint(h+m,g+n),new mxPoint(h+f,g+n),new mxPoint(h,a),new mxPoint(h+f,g)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g+f),new mxPoint(u,g),new mxPoint(h+m,g+f),new mxPoint(h+m, -g+n),new mxPoint(u,g+n-f),new mxPoint(h,g+n),new mxPoint(h,g+f)]):(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(u,g+f),new mxPoint(h+m,g),new mxPoint(h+m,g+n-f),new mxPoint(u,g+n),new mxPoint(h,g+n-f),new mxPoint(h,g)]);u=new mxPoint(u,a);d&&(b.x<h||b.x>h+m?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(g,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var f=A.prototype.size;null!= -c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,h=a.y,g=a.width,m=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(n,h),new mxPoint(e+g,h+f),new mxPoint(e+g,h+m-f),new mxPoint(n,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f),new mxPoint(n,h)]):(f=g*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+ -f,h),new mxPoint(e+g-f,h),new mxPoint(e+g,a),new mxPoint(e+g-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e,a),new mxPoint(e+f,h)]);n=new mxPoint(n,a);d&&(b.x<e||b.x>e+g?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(h,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-e)/2,0,e,e);a.fillAndStroke(); -a.begin();a.moveTo(d/2,e);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",I);mxUtils.extend(Y,mxShape);Y.prototype.size=10;Y.prototype.inset=2;Y.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,e+h);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-e)/2-h,e/2);a.quadTo((d-e)/2-h,e+h,d/ -2,e+h);a.quadTo((d+e)/2+h,e+h,(d+e)/2+h,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Y);mxUtils.extend(R,mxCylinder);R.prototype.jettyWidth=32;R.prototype.jettyHeight=12;R.prototype.redrawPath=function(a,c,b,d,f,e){var h=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=h/2;var h=b+h/2,g=.3*f-c/2,m=.7*f-c/2;e?(a.moveTo(b,g),a.lineTo(h,g),a.lineTo(h,g+c),a.lineTo(b,g+c),a.moveTo(b,m), -a.lineTo(h,m),a.lineTo(h,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,g+c),a.lineTo(0,g+c),a.lineTo(0,g),a.lineTo(b,g),a.close());a.end()};mxCellRenderer.registerShape("component",R);mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.min(4,Math.min(d/5,f/5));0<d&&0<f&&(a.ellipse(c+e,b+e,d-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1); -this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.registerShape("endState",P);mxUtils.extend(K,P);K.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",K);mxUtils.extend(J,mxArrowConnector);J.prototype.defaultWidth=4;J.prototype.isOpenEnded=function(){return!0};J.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};J.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link", +function qa(){mxEllipse.call(this)}function na(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,h,n,m){g+=n;var ga=c.clone();c.x-=f*(2*g+n);c.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(ga.x-f-g,ga.y-e-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c, +Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d,f),a.lineTo(d,d),a.lineTo(0,0),a.moveTo(d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(d,f),a.lineTo(0,f-d),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube", +a);var xa=Math.tan(mxUtils.toRadians(30)),la=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/xa);a.translate((c-d)/2,(f-d)/2+d/4);a.moveTo(0,.25*d);a.lineTo(.5*d,d*la);a.lineTo(d,.25*d);a.lineTo(.5*d,(.5-la)*d);a.lineTo(0,.25*d);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(c,f/(.5+xa));e?(a.moveTo(0,.25*d),a.lineTo(.5* +d,(.5-la)*d),a.lineTo(d,.25*d),a.moveTo(.5*d,(.5-la)*d),a.lineTo(.5*d,(1-la)*d)):(a.translate((c-d)/2,(f-d)/2),a.moveTo(0,.25*d),a.lineTo(.5*d,d*la),a.lineTo(d,.25*d),a.lineTo(d,.75*d),a.lineTo(.5*d,(1-la)*d),a.lineTo(0,.75*d),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(c,mxCylinder);c.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e|| +(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,-d);e||(a.moveTo(0,d),a.curveTo(0,-d/3,c,-d/3,c,d),a.lineTo(c,f-d),a.curveTo(c,f+d/3,0,f+d/3,0,f-d),a.close())};c.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore", +c);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c-d,0),a.lineTo(c-d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c/2,.5*f,c,0);a.quadTo(.5* +c,f/2,c,f);a.quadTo(c/2,.5*f,0,f);a.quadTo(.5*c,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition); +e?"left"==g?(a.moveTo(0,b),a.lineTo(d,b)):(a.moveTo(c-d,b),a.lineTo(c,b)):("left"==g?(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,b),a.lineTo(c,b)):(a.moveTo(0,b),a.lineTo(c-d,b),a.lineTo(c-d,0),a.lineTo(c,0)),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style, +mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(t,mxActor);t.prototype.size=.4;t.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3* +c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape", +t);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};d.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close(); +a.end()};mxCellRenderer.registerShape("document",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a, +[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,f)],this.isRounded, +b,!0)};mxCellRenderer.registerShape("trapezoid",g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,d,b,c,f){a.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()}; +mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",m);h.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};h.prototype.close=function(){null!=this.firstX&& +null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};h.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};h.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};h.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY= +g};h.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var g=Math.round(e/10),ga=this.defaultVariation;5>g&&(g=5,ga/=3);for(var h=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*ga;this.originalLineTo.call(this.canvas, +h*e+this.lastX-n*f,b*e+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint= +function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new h(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)}; +var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,d,b,c,f){if(null==a.handJiggle)Ga.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE, +0)?e=Math.min(c/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(c*e,f*e)),a.moveTo(d+e,b),a.lineTo(d+c-e,b),a.quadTo(d+c,b,d+c,b+e),a.lineTo(d+c,b+f-e),a.quadTo(d+c,b+f,d+c-e,b+f),a.lineTo(d+e,b+f),a.quadTo(d,b+f,d,b+f-e),a.lineTo(d,b+e),a.quadTo(d,b,d+e,b)):(a.moveTo(d,b),a.lineTo(d+c,b),a.lineTo(d+c,b+f),a.lineTo(d,b+f),a.lineTo(d, +b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(w,mxRectangleShape);w.prototype.size=.1;w.prototype.isHtmlAllowed=function(){return!1};w.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var d= +a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*f,b*f));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};w.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g= +mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",w);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};u.prototype.paintForeground= +function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",u);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+h),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout", +v);mxUtils.extend(r,mxActor);r.prototype.size=.2;r.prototype.fixedSize=20;r.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c- +d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(A,mxHexagon);A.prototype.size=.25;A.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)], +this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",A);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Ba=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds= +function(a){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape=function(a,d,b,c,f){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&(a.setShadow(!1),Ba.apply(this,[a,d, +b,c,f]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};z.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| +0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var h=this.style["symbol"+e+"Align"],ga=this.style["symbol"+e+"VerticalAlign"],n=this.style["symbol"+e+"Width"],m=this.style["symbol"+e+"Height"],r=this.style["symbol"+e+"Spacing"]||0,u=this.style["symbol"+e+"VSpacing"]||r,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(c+this.strokewidth, +f+this.strokewidth),r+=v,u+=v);var v=d,k=b,v=h==mxConstants.ALIGN_CENTER?v+(c-n)/2:h==mxConstants.ALIGN_RIGHT?v+(c-n-r):v+r,k=ga==mxConstants.ALIGN_MIDDLE?k+(f-m)/2:ga==mxConstants.ALIGN_BOTTOM?k+(f-m-u):k+u;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,v,k,n,m);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,d,b,c,f,e){e? +(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(B,mxShape);B.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()}; +mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(G,mxShape);G.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};G.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",G);mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(a,d, +b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",C);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(y,mxShape);y.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+ +a.height/8,a.width,7*a.height/8)};y.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,f/8,c,7*f/8);a.fillAndStroke()};y.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",y);mxUtils.extend(L,mxRectangleShape);L.prototype.size=40;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.getLabelBounds= +function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,d)};L.prototype.paintBackground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=L&&(g=new g, +g.apply(this.state),a.save(),g.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};L.prototype.paintForeground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",L);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner= +10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};E.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,g=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style, +mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+g,b);a.lineTo(d+g,b+Math.max(0,h-1.5*e));a.lineTo(d+Math.max(0,g-e),b+h);a.lineTo(d,b+h);a.close();a.fillAndStroke();a.begin(); +a.moveTo(d+g,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=L.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter); +mxPerimeter.OrthogonalPerimeter=function(a,d,b,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,d,b,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return b.x< +a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",v.prototype.size))* +d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,n=a.width,m=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+ +n,h+e),new mxPoint(g+n,h+m),new mxPoint(g,h+m-e),new mxPoint(g,h)]):(e=n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+n,h),new mxPoint(g+n-e,h+m),new mxPoint(g,h+m),new mxPoint(g+e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);c&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f= +mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,n=a.width,m=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+n-f,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m),new mxPoint(e+f,h)]):d==mxConstants.DIRECTION_WEST?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h),new mxPoint(e+n-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e, +h)]):d==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+n,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f)]):(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h+f),new mxPoint(e+n,h+m-f),new mxPoint(e,h+m),new mxPoint(e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);c&&(b.x<e||b.x>e+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter); +mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?r.prototype.fixedSize:r.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,n=a.width,m=a.height,u=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n- +f,h),new mxPoint(g+n,a),new mxPoint(g+n-f,h+m),new mxPoint(g,h+m),new mxPoint(g+f,a),new mxPoint(g,h)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+n,h),new mxPoint(g+n-f,a),new mxPoint(g+n,h+m),new mxPoint(g+f,h+m),new mxPoint(g,a),new mxPoint(g+f,h)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(u,h),new mxPoint(g+n,h+f),new mxPoint(g+n, +h+m),new mxPoint(u,h+m-f),new mxPoint(g,h+m),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(u,h+f),new mxPoint(g+n,h),new mxPoint(g+n,h+m-f),new mxPoint(u,h+m),new mxPoint(g,h+m-f),new mxPoint(g,h)]);u=new mxPoint(u,a);c&&(b.x<g||b.x>g+n?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(h,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=A.prototype.size;null!= +d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,h=a.width,n=a.height,m=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+n-f),new mxPoint(m,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(m,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+ +f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);m=new mxPoint(m,a);c&&(b.x<e||b.x>e+h?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(g,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke(); +a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",I);mxUtils.extend(Y,mxShape);Y.prototype.size=10;Y.prototype.inset=2;Y.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/ +2,e+g);a.quadTo((c+e)/2+g,e+g,(c+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Y);mxUtils.extend(R,mxCylinder);R.prototype.jettyWidth=32;R.prototype.jettyHeight=12;R.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,h=.3*f-d/2,n=.7*f-d/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+d),a.lineTo(b,h+d),a.moveTo(b,n), +a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,h+d),a.lineTo(0,h+d),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",R);mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1); +this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",P);mxUtils.extend(K,P);K.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",K);mxUtils.extend(J,mxArrowConnector);J.prototype.defaultWidth=4;J.prototype.isOpenEnded=function(){return!0};J.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};J.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link", J);mxUtils.extend(M,mxArrowConnector);M.prototype.defaultWidth=10;M.prototype.defaultArrowWidth=20;M.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};M.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};M.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow", -M);mxUtils.extend(S,mxActor);S.prototype.size=30;S.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",S);mxUtils.extend(D,mxRectangleShape);D.prototype.dx=20;D.prototype.dy=20;D.prototype.isHtmlAllowed= -function(){return!1};D.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*h,f*h));h=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+d,b+e); -a.end();a.stroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+h,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",D);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE, -mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",W);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);a.lineTo(d,f/2);a.end()};mxCellRenderer.registerShape("crossbar",Q);mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy= -20;X.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d- -c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",X);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(0,e)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize)))); -b=(f-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",T);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close(); -a.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit", -Z);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape= -function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse", -da);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ma);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this, -arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ja);mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape= -function(a,c,b,d,f){var e=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+d,e);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,e);a.lineTo(c+d-10,e-5);a.moveTo(c+d,e);a.lineTo(c+d-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ba);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this, -arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,d,f),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+f):a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",qa);mxUtils.extend(na, -mxEllipse);na.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,b+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",na);mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0, -f);a.close();a.end()};mxCellRenderer.registerShape("delay",ta);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;b=c+e;var h=(d-e)/2,e=h+e;a.moveTo(0,c);a.lineTo(h,c);a.lineTo(h,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(h,f);a.lineTo(h,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross", -oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",pa);mxUtils.extend(ka,mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,c,b){for(var d= -[],f=0;f<c.length;f++)d.push(mxUtils.clone(c[f]));var f=a.state.dashed,e=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ka.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ka);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors; -StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,f,e,h,g,m,n){var u=f*(h+m+1),t=e*(h+m+1);return function(){a.begin();a.moveTo(d.x-u/2-t/2,d.y-t/2+u/2);a.lineTo(d.x+t/2-3*u/2,d.y-3*t/2-u/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,e,h,g,m, -n){var u=f*(h+m+1),t=e*(h+m+1);return function(){a.begin();a.moveTo(d.x-u/2-t/2,d.y-t/2+u/2);a.lineTo(d.x+t/2-3*u/2,d.y-3*t/2-u/2);a.moveTo(d.x-u/2+t/2,d.y-t/2-u/2);a.lineTo(d.x-t/2-3*u/2,d.y-3*t/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,e,h,g,m,n){var u=d.clone(),t=Aa.apply(this,arguments),v=f*(h+2*m),k=e*(h+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(u.x-f*m,u.y-e*m);a.lineTo(u.x-2*v+f*m,u.y-2*k+e*m);a.moveTo(u.x- -v-k+e*m,u.y-k+v-f*m);a.lineTo(u.x+k-v-e*m,u.y-k-v+f*m);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,d,f,e,h,g,m,n){c=f*m*1.118;b=e*m*1.118;f*=h+m;e*=h+m;var u=d.clone();u.x-=c;u.y-=b;d.x+=1*-f-c;d.y+=1*-e-b;return function(){a.begin();a.moveTo(u.x,u.y);g?a.lineTo(u.x-f-e/2,u.y-e+f/2):a.lineTo(u.x+e/2-f,u.y-e-f/2);a.lineTo(u.x-f,u.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,e,h,g,m,n,u){e*=g+n;h*=g+n;var t= -f.clone();return function(){c.begin();c.moveTo(t.x,t.y);m?c.lineTo(t.x-e-h/a,t.y-h+e/a):c.lineTo(t.x+h/a-e,t.y-h-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,c,b){return ra(a,["width"],c,function(c,d,f,e,h){h=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+d*c/4+f*h/2,e.y+f*c/4-d*h/2)},function(c,d,f,e,h,g){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ra=function(a,c,b,d,f){return N(a,c, -function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var h=a.view.scale,g=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-g.x,m=f.y-g.y,n=Math.sqrt(e*e+m*m),g=d.call(this,n,e/n,m/n,g,f);return new mxPoint(g.x/h-c.x,g.y/h-c.y)},function(c,d,e){var h=a.absolutePoints,g=h.length-1;c=a.view.translate;var m=a.view.scale,n=b?h[0]:h[g],h=b?h[1]:h[g-1],g=h.x-n.x,u=h.y-n.y,t=Math.sqrt(g*g+u*u);d.x=(d.x+c.x)*m;d.y=(d.y+c.y)*m;f.call(this,t,g/t,u/t,n,h,d,e)})},ha=function(a){return function(c){return[N(c,["arrowWidth", -"arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},ya=function(a,c,b){return function(d){var f= -[N(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ea(d));return f}},ua=function(a,c,b,d,f){b=null!=b?b:1;return function(e){var h=[N(e,["size"],function(c){var b=null!=f?"0"!=mxUtils.getValue(this.state.style, -"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var h=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=h?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));h&&!mxEvent.isAltDown(d.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(ea(e));return h}},Da=function(a){return function(c){var b= -[N(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ea(c));return b}},sa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c}},ea=function(a,c){return N(a, -[mxConstants.STYLE_ARCSIZE],function(b){var d=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+d)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)* -f),b.y+d)},function(c,b,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},N=function(a,c,b,d,f,e){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])}; -h.getPosition=b;h.setPosition=d;h.ignoreGrid=null!=f?f:!0;if(e){var g=h.positionChanged;h.positionChanged=function(){g.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},za={link:function(a){return[Ca(a,!0,10),Ca(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c, -b,d,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale; -a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getStartArrowWidth()- -a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0, -Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth= -a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f, -e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))< -c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,h,g,m){b= -Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])- -parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[N(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(), -c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ea(a,b/2))}return c}, -label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var c=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style, -"width",E.prototype.width))),b=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[N(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style, -"size",x.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},cross:function(a){return[N(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width, -a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c= -[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",S.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},dataStorage:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+ -(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[N(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style, -"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var c= -Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width, -c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},internalStorage:function(a){var c=[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",D.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",D.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0, -Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},corner:function(a){return[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0, -Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5), -folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style, -"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]}, -tape:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",r.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)}, -function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:ua(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:ua(A.prototype.size,!0,.5,!0),curlyBracket:ua(m.prototype.size,!1),display:ua(pa.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,Z.prototype.size,!0),trapezoid:Da(.5),parallelogram:Da(1)};Graph.createHandle=N;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1== +M);mxUtils.extend(S,mxActor);S.prototype.size=30;S.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",S);mxUtils.extend(D,mxRectangleShape);D.prototype.dx=20;D.prototype.dy=20;D.prototype.isHtmlAllowed= +function(){return!1};D.prototype.paintForeground=function(a,d,b,c,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));g=Math.max(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e);a.lineTo(d+c,b+e); +a.end();a.stroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",D);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE, +mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",W);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c,f/2);a.end()};mxCellRenderer.registerShape("crossbar",Q);mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy= +20;X.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint((c+d)/2,b),new mxPoint((c+d)/2,f),new mxPoint((c-d)/2,f),new mxPoint((c- +d)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",X);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize)))); +b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(d,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",T);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));a.moveTo(d,0);a.lineTo(c,0);a.quadTo(c-2*d,f/2,c,f);a.lineTo(d,f);a.quadTo(d-2*d,f/2,d,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.quadTo(c/2,f/2,0,0);a.close(); +a.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,.8*d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit", +Z);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-d),new mxPoint(c/2,f),new mxPoint(0,f-d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape= +function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/2,b+f);a.lineTo(d+c,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke();a.begin();a.moveTo(d+c/2,b);a.lineTo(d+c/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse", +da);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d+.145*c,b+.145*f);a.lineTo(d+.855*c,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(d+.855*c,b+.145*f);a.lineTo(d+.145*c,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ma);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,d,b,c,f){mxRhombus.prototype.paintVertexShape.apply(this, +arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,d,b,c,f){a.begin();a.moveTo(d,b);a.lineTo(d+c,b);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(d,b+f);a.lineTo(d+c,b+f);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ja);mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape= +function(a,d,b,c,f){var e=b+f-5;a.begin();a.moveTo(d,b);a.lineTo(d,b+f);a.moveTo(d,e);a.lineTo(d+10,e-5);a.moveTo(d,e);a.lineTo(d+10,e+5);a.moveTo(d,e);a.lineTo(d+c,e);a.moveTo(d+c,b);a.lineTo(d+c,b+f);a.moveTo(d+c,e);a.lineTo(d+c-10,e-5);a.moveTo(d+c,e);a.lineTo(d+c-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ba);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,d,b,c,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this, +arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(d,b,c,f),a.fill(),a.begin(),a.moveTo(d,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(d+c,b):a.moveTo(d+c,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(d+c,b+f):a.moveTo(d+c,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(d,b+f):a.moveTo(d,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(d,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",qa);mxUtils.extend(na, +mxEllipse);na.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(d+c/2,b),a.lineTo(d+c/2,b+f)):(a.moveTo(d,b+f/2),a.lineTo(d+c,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",na);mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);a.moveTo(0,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(0, +f);a.close();a.end()};mxCellRenderer.registerShape("delay",ta);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,c);var e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(f-e)/2;b=d+e;var g=(c-e)/2,e=g+e;a.moveTo(0,d);a.lineTo(g,d);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,d);a.lineTo(c,d);a.lineTo(c,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross", +oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);b=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",pa);mxUtils.extend(ka,mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,d,b){for(var c= +[],f=0;f<d.length;f++)c.push(mxUtils.clone(d[f]));var f=a.state.dashed,e=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,[a,c,b]);3<=a.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(a.setStrokeColor(c),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ka.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",ka);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors; +StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==d.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,g,h,n,m){var r=f*(g+n+1),u=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-r/2-u/2,c.y-u/2+r/2);a.lineTo(c.x+u/2-3*r/2,c.y-3*u/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,h,n, +m){var r=f*(g+n+1),u=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-r/2-u/2,c.y-u/2+r/2);a.lineTo(c.x+u/2-3*r/2,c.y-3*u/2-r/2);a.moveTo(c.x-r/2+u/2,c.y-u/2-r/2);a.lineTo(c.x-u/2-3*r/2,c.y-3*u/2+r/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,h,n,m){var r=c.clone(),u=Aa.apply(this,arguments),v=f*(g+2*n),k=e*(g+2*n);return function(){u.apply(this,arguments);a.begin();a.moveTo(r.x-f*n,r.y-e*n);a.lineTo(r.x-2*v+f*n,r.y-2*k+e*n);a.moveTo(r.x- +v-k+e*n,r.y-k+v-f*n);a.lineTo(r.x+k-v-e*n,r.y-k-v+f*n);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,h,n,m){d=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var r=c.clone();r.x-=d;r.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);h?a.lineTo(r.x-f-e/2,r.y-e+f/2):a.lineTo(r.x+e/2-f,r.y-e-f/2);a.lineTo(r.x-f,r.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,h,n,m,r){e*=h+m;g*=h+m;var u= +f.clone();return function(){d.begin();d.moveTo(u.x,u.y);n?d.lineTo(u.x-e-g/a,u.y-g+e/a):d.lineTo(u.x+g/a-e,u.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,d,b){return ra(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,h){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*d)/a.view.scale-b})},ra=function(a,d,b,c,f){return N(a,d, +function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,n=f.y-h.y,m=Math.sqrt(e*e+n*n),h=c.call(this,m,e/m,n/m,h,f);return new mxPoint(h.x/g-d.x,h.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,h=g.length-1;d=a.view.translate;var n=a.view.scale,m=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-m.x,r=g.y-m.y,u=Math.sqrt(h*h+r*r);c.x=(c.x+d.x)*n;c.y=(c.y+d.y)*n;f.call(this,u,h/u,r/u,m,g,c,e)})},ha=function(a){return function(d){return[N(d,["arrowWidth", +"arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-b)*d.height/2)},function(d,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-b.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(d.x+d.width-b.x)/d.width))})]}},ya=function(a,d,b){return function(c){var f= +[N(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ea(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[N(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style, +"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));g&&!mxEvent.isAltDown(c.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ea(e));return g}},Da=function(a){return function(d){var b= +[N(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ea(d));return b}},sa=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d}},ea=function(a,d){return N(a, +[mxConstants.STYLE_ARCSIZE],function(b){var c=null!=d?d:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+c)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)* +f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},N=function(a,d,b,c,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])}; +g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Ca(a,!0,10),Ca(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d, +b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale; +a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()- +a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0, +Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth= +a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f, +e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))< +d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,h,n){b= +Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])- +parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[N(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(), +d.y+Math.max(0,Math.min(d.height,b))):new mxPoint(d.x+Math.max(0,Math.min(d.width,b)),d.getCenterY())},function(d,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,b.y-d.y))):Math.round(Math.max(0,Math.min(d.width,b.x-d.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(ea(a,b/2))}return d}, +label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var d=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style, +"width",E.prototype.width))),b=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[N(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style, +"size",w.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d},cross:function(a){return[N(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width, +a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d= +[N(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",S.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d},dataStorage:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+ +(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[N(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style, +"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var d= +Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width, +d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d},internalStorage:function(a){var d=[N(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",D.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",D.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0, +Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d},corner:function(a){return[N(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0, +Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5), +folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style, +"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]}, +tape:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)}, +function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:ua(r.prototype.size,!0,null,!0,r.prototype.fixedSize),hexagon:ua(A.prototype.size,!0,.5,!0),curlyBracket:ua(n.prototype.size,!1),display:ua(pa.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,Z.prototype.size,!0),trapezoid:Da(.5),parallelogram:Da(1)};Graph.createHandle=N;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1== this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR); -a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var h=a.absolutePoints,g=h[0],h=h[h.length-1];null!=d&&(d=e.transformControlPoint(a, -d));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,n=va.y,u=wa.x,t=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=h&&null!=g){a=function(a,c,b){a-=k.x;var d=c-k.y;c=(t*a-u*d)/(m*t-n*u);a=(n*a-m*d)/(n*u-m*t);v?(b&&(k=new mxPoint(k.x+m*c,k.y+n*c),f.push(k)),k=new mxPoint(k.x+u*a,k.y+t*a)):(b&&(k=new mxPoint(k.x+u*a,k.y+t*a),f.push(k)),k=new mxPoint(k.x+m*c,k.y+n*c));f.push(k)}; -var k=g;null==d&&(d=new mxPoint(g.x+(h.x-g.x)/2,g.y+(h.y-g.y)/2));a(d.x,d.y,!0);a(h.x,h.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];mxRectangleShape.prototype.constraints= +a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a, +c));null==h&&null!=d&&(h=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=va.x,m=va.y,r=wa.x,u=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,d,b){a-=k.x;var c=d-k.y;d=(u*a-r*c)/(n*u-m*r);a=(m*a-n*c)/(m*r-n*u);v?(b&&(k=new mxPoint(k.x+n*d,k.y+m*d),f.push(k)),k=new mxPoint(k.x+r*a,k.y+u*a)):(b&&(k=new mxPoint(k.x+r*a,k.y+u*a),f.push(k)),k=new mxPoint(k.x+n*d,k.y+m*d));f.push(k)}; +var k=h;null==c&&(c=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];mxRectangleShape.prototype.constraints= [new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, 1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints= -mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;y.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints= +mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints= mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints; Z.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1, .3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0, 1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1, .5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9, .5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0, -1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];r.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75, -0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1, +1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75, +0),!1)];r.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1, .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints= mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375, 0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375, 1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, -.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];f.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, +.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, 0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;X.prototype.constraints=null;W.prototype.constraints=null;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0, .5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];T.prototype.constraints= [new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];L.prototype.constraints=null;ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, .75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} -Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)d.model.contains(c[b])&&(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())}); -this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));b.showDialog((new OpenDialog(this)).container, +Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var d=c.model.getParents(b);c.removeCells(b,a);if(null!=d){a=[];for(b=0;b<d.length;b++)c.model.contains(d[b])&&(c.model.isVertex(d[b])||c.model.isEdge(d[b]))&&a.push(d[b]);c.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,c=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&c.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())}); +this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));b.showDialog((new OpenDialog(this)).container, 320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...", -function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut", -function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&& -a;c++)a=a&&d.model.isEdge(b[c]);var f=d.view.translate,e=d.view.scale,m=f.x,n=f.y,f=null;if(1==b.length&&a){var g=d.getCellGeometry(b[0]);null!=g&&(f=g.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var k=Math.round(d.snap(d.popupMenuHandler.triggerX/e-m)),u=Math.round(d.snap(d.popupMenuHandler.triggerY/e-n));d.cellsMoved(b,k-f.x,u-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete"); -this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){d.setSelectionCells(d.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){d.turnShapes(d.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()}, -null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE, -a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)}, -null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1== -d.getSelectionCount()&&0==d.getModel().getChildCount(d.getSelectionCell())?d.setCellStyles("container","0"):d.setSelectionCells(d.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container, -320,320,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),c="";if(mxUtils.isNode(d.value)){var f=d.value.getAttribute("tooltip");null!=f&&(c=f)}c=new TextareaDialog(b,mxResources.get("editTooltip")+":",c,function(c){a.setTooltipForCell(d,c)});b.showDialog(c.container,320,200,!0,!0);c.init()}});this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell()); -null!=a&&window.open(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),c=a.getLinkForCell(d)||"";b.showLinkDialog(c,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(d,0<c.length?c:null)})}});this.addAction("insertLink...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,e){a=mxUtils.trim(a);if(0<a.length){var c=null,f=a.substring(a.lastIndexOf("/")+ -1);if(d.isPageLink(a)){var h=a.indexOf(",");0<h&&(f=b.getPageById(a.substring(h+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(c=e[0].iconUrl,f=e[0].name||e[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));h=d.getFreeInsertPoint();c=new mxCell(f,new mxGeometry(h.x,h.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c: -"spacing=10;"));c.vertex=!0;d.setLinkForCell(c,a);d.cellSizeUpdated(c,!0);d.getModel().beginUpdate();try{c=d.addCell(c),d.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);d.scrollCellToVisible(d.getSelectionCell())}})}).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),c=""; -null!=d&&(c=d.getAttribute("href")||"");var f=a.cellEditor.saveSelection();b.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(f);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().getChildCount(c))d.updateGroupBounds([c], -20);else{var f=d.view.getState(c),e=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=e&&d.isWrapping(c)?(e=e.clone(),e.height=f.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(c,e)):d.updateCellSize(c)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var e="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var e= -null,c=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=c;c=mxUtils.extractTextWithWhitespace(f.childNodes);d.cellLabelChanged(a.cell,c)}else c=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(c));d.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged", -"keys",["html"],"values",[null!=e?e:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=d.getView().getState(d.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b, -a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.zoomOut()},null,null,Editor.ctrlKey+ -" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){d.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale,d.container.scrollLeft=Math.min(a.x*d.view.scale, -(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft= -Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+ -"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this, -function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.isGridEnabled()});l.setEnabled(!1);l=this.addAction("guides",function(){d.graphHandler.guidesEnabled= -!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled= -!d.foldingEnabled;d.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.pageVisible});l=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled= -!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});l=this.addAction("copyConnect", -function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&& -(a="_"+mxClient.language);window.open(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,c,f){return this.addAction(a,function(){null!=c&&d.cellEditor.isContentEditing()?c():(d.stopEditing(!1),d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b))},null,null,f)});l("bold",mxConstants.FONT_BOLD, +function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut", +function(){mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(c)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&mxClipboard.paste(c)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){c.getModel().beginUpdate();try{var b=mxClipboard.paste(c);if(null!=b){a=!0;for(var d=0;d<b.length&& +a;d++)a=a&&c.model.isEdge(b[d]);var f=c.view.translate,e=c.view.scale,n=f.x,m=f.y,f=null;if(1==b.length&&a){var h=c.getCellGeometry(b[0]);null!=h&&(f=h.getTerminalPoint(!0))}f=null!=f?f:c.getBoundingBoxFromGeometry(b,a);if(null!=f){var k=Math.round(c.snap(c.popupMenuHandler.triggerX/e-n)),u=Math.round(c.snap(c.popupMenuHandler.triggerY/e-m));c.cellsMoved(b,k-f.x,u-f.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete"); +this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){c.setSelectionCells(c.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){c.turnShapes(c.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){c.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){c.selectEdges()}, +null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){c.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){c.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!c.isSelectionEmpty()){c.getModel().beginUpdate();try{var a=c.isCellMovable(c.getSelectionCell())?1:0;c.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);c.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);c.toggleCellStyles(mxConstants.STYLE_ROTATABLE, +a);c.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);c.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);c.toggleCellStyles("connectable",a)}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){c.home()},null,null,"Home");this.addAction("exitGroup",function(){c.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){c.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){c.foldCells(!0)}, +null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){c.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){c.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){c.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==c.getSelectionCount()?c.setCellStyles("container","1"):c.setSelectionCell(c.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1== +c.getSelectionCount()&&0==c.getModel().getChildCount(c.getSelectionCell())?c.setCellStyles("container","0"):c.setSelectionCells(c.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){c.removeCellsFromParent()});this.addAction("edit",function(){c.isEnabled()&&c.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=c.getSelectionCell()||c.getModel().getRoot();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container, +320,320,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var f=c.value.getAttribute("tooltip");null!=f&&(d=f)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(d){a.setTooltipForCell(c,d)});b.showDialog(d.container,320,200,!0,!0);d.init()}});this.addAction("openLink",function(){var a=c.getLinkForCell(c.getSelectionCell()); +null!=a&&window.open(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d=a.getLinkForCell(c)||"";b.showLinkDialog(d,mxResources.get("apply"),function(d){d=mxUtils.trim(d);a.setLinkForCell(c,0<d.length?d:null)})}});this.addAction("insertLink...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,f=a.substring(a.lastIndexOf("/")+ +1);if(c.isPageLink(a)){var g=a.indexOf(",");0<g&&(f=b.getPageById(a.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,f=e[0].name||e[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));g=c.getFreeInsertPoint();d=new mxCell(f,new mxGeometry(g.x,g.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d: +"spacing=10;"));d.vertex=!0;c.setLinkForCell(d,a);c.cellSizeUpdated(d,!0);c.getModel().beginUpdate();try{d=c.addCell(d),c.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{c.getModel().endUpdate()}c.setSelectionCell(d);c.scrollCellToVisible(c.getSelectionCell())}})}).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d=""; +null!=c&&(d=c.getAttribute("href")||"");var f=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(f);null!=d&&a.insertLink(d)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=c.getSelectionCells();if(null!=a){c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().getChildCount(d))c.updateGroupBounds([d], +20);else{var f=c.view.getState(d),e=c.getCellGeometry(d);c.getModel().isVertex(d)&&null!=f&&null!=f.text&&null!=e&&c.isWrapping(d)?(e=e.clone(),e.height=f.text.boundingBox.height/c.view.scale,c.getModel().setGeometry(d,e)):c.updateCellSize(d)}}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=c.getView().getState(c.getSelectionCell());if(null!=a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e= +null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=d;d=mxUtils.extractTextWithWhitespace(f.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,c.sanitizeHtml(d));c.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged", +"keys",["html"],"values",[null!=e?e:"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=c.getView().getState(c.getSelectionCell()),b="wrap";c.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);c.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=c.getView().getState(c.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b, +a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&c.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){c.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){c.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){c.zoomOut()},null,null,Editor.ctrlKey+ +" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){c.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/a.width/b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=a.y*c.view.scale,c.container.scrollLeft=Math.min(a.x*c.view.scale, +(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/(2*a.width)/b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=Math.min(a.y,(c.container.scrollHeight-c.container.clientHeight)/2),c.container.scrollLeft= +Math.min(a.x,(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();c.zoomTo(Math.floor(20*(c.container.clientWidth-10)/c.pageFormat.width/c.pageScale)/20);if(mxUtils.hasScrollbars(c.container)){var a=c.getPagePadding();c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-c.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+ +"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&c.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.pageScale),mxResources.get("apply"),mxUtils.bind(this, +function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){c.setGridEnabled(!c.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isGridEnabled()});l.setEnabled(!1);l=this.addAction("guides",function(){c.graphHandler.guidesEnabled= +!c.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){c.tooltipHandler.setEnabled(!c.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled= +!c.foldingEnabled;c.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!c.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return c.pageVisible});l=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled= +!c.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});l=this.addAction("copyConnect", +function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&& +(a="_"+mxClient.language);window.open(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,d,f){return this.addAction(a,function(){null!=d&&c.cellEditor.isContentEditing()?d():(c.stopEditing(!1),c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b))},null,null,f)});l("bold",mxConstants.FONT_BOLD, function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...", function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)}); -this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN, -null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"], -"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED, -"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.view.getState(a[0]),c=null!=e?e.style:d.getCellStyle(a[0]),f="1"==mxUtils.getValue(c,mxConstants.STYLE_ROUNDED,"0")? -"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,f);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys", -[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),e="1";null!=a&&null!=d.getFoldingImage(a)&&(e="0");d.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells(); -if(null!=a&&0<a.length){var b=d.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&& -b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var c=d.view.translate,f=d.view.scale,h=c.x,c=c.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=m;)h+=m.x,c+=m.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);h=Math.round(d.snap(d.popupMenuHandler.triggerX/f-h)); -f=Math.round(d.snap(d.popupMenuHandler.triggerY/f-c));b.addPointAt(b.state,h,f)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().isEdge(c)){var f=d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c, -f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a= -mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),c="";null!=e&&(c=e.style[mxConstants.STYLE_IMAGE]||c);var f=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,c,b);else{var e=d.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var h=null;d.getModel().beginUpdate();try{if(0==e.length){var m=d.getFreeInsertPoint(),h=e=[d.insertVertex(d.getDefaultParent(), -null,"",m.x,m.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",h))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var n=d.view.getState(e[0]),t=null!=n?n.style:d.getCellStyle(e[0]);"image"!=t[mxConstants.STYLE_SHAPE]&&"label"!=t[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&& -null!=c&&null!=b){var k=e[0],l=d.getModel().getGeometry(k);null!=l&&(l=l.clone(),l.width=c,l.height=b,d.getModel().setGeometry(k,l))}}finally{d.getModel().endUpdate()}null!=h&&(d.setSelectionCells(h),d.scrollCellToVisible(h[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers", +this.addAction("solid",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,null),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dashed",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN, +null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dotted",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"], +"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("sharp",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("rounded",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED, +"1"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!c.isSelectionEmpty()&&c.isEnabled()){c.getModel().beginUpdate();try{var a=c.getSelectionCells(),e=c.view.getState(a[0]),d=null!=e?e.style:c.getCellStyle(a[0]),f="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")? +"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,f);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("curved",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys", +[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=c.view.getState(c.getSelectionCell()),e="1";null!=a&&null!=c.getFoldingImage(a)&&(e="0");c.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",c.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=c.getSelectionCells(); +if(null!=a&&0<a.length){var b=c.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(d){null!=d&&c.setCellStyle(mxUtils.trim(d),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){c.isEnabled()&&!c.isSelectionEmpty()&&b.setDefaultStyle(c.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){c.isEnabled()&& +b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=c.getSelectionCell();if(null!=a&&c.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var d=c.view.translate,f=c.view.scale,g=d.x,d=d.y,a=c.getModel().getParent(a),n=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=n;)g+=n.x,d+=n.y,a=c.getModel().getParent(a),n=c.getCellGeometry(a);g=Math.round(c.snap(c.popupMenuHandler.triggerX/f-g)); +f=Math.round(c.snap(c.popupMenuHandler.triggerY/f-d));b.addPointAt(b.state,g,f)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var f=c.getCellGeometry(d);null!=f&&(f=f.clone(),f.points=null,c.getModel().setGeometry(d, +f))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a= +mxResources.get("image")+" ("+mxResources.get("url")+"):",e=c.getView().getState(c.getSelectionCell()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var f=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(f),c.insertImage(a,d,b);else{var e=c.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;c.getModel().beginUpdate();try{if(0==e.length){var n=c.getFreeInsertPoint(),g=e=[c.insertVertex(c.getDefaultParent(), +null,"",n.x,n.y,d,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",g))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var m=c.view.getState(e[0]),r=null!=m?m.style:c.getCellStyle(e[0]);"image"!=r[mxConstants.STYLE_SHAPE]&&"label"!=r[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",e):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==c.getSelectionCount()&& +null!=d&&null!=b){var k=e[0],p=c.getModel().getGeometry(k);null!=p&&(p=p.clone(),p.width=d,p.height=b,c.getModel().setGeometry(k,p))}}finally{c.getModel().endUpdate()}null!=g&&(c.setSelectionCells(g),c.scrollCellToVisible(g[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(c.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers", mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+ "+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth- 260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!= -this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]}; -function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled}; +this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,c,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,c,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]}; +function Action(a,b,e,c,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=c;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled}; Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))}; -DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,d){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)}; +DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,c){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)}; DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1}; DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data}; DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){var e=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this|| @@ -2608,12 +2608,12 @@ this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)}; DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"), 0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))}; -DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}), -mxUtils.bind(this,function(a){null!=d&&d(a)}))}else null!=e&&e(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay}; -DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b}; -DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)}; -LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ -(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()}; +DrawioFile.prototype.autosave=function(a,b,e,c){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}), +mxUtils.bind(this,function(a){null!=c&&c(a)}))}else null!=e&&e(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay}; +DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),c=0<e?a.substring(e):"",e=b.lastIndexOf(".");return c===(0<e?b.substring(e):"")}return a==b}; +DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,b,e,c){DrawioFile.call(this,a,b);this.title=e;this.mode=c?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)}; +LocalFile.prototype.saveFile=function(a,b,e,c){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ +(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()}; LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC": IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=": IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==": @@ -2622,357 +2622,357 @@ IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;b IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg=="; Editor.defaultCustomLibraries=[];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; Editor.configure=function(a){if(null!=a){Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength; -if(null!=a.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(c,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle= -a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0], -b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.getElementsByTagName("div"); -null!=d&&0<d.length&&(b=d[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(), -null!=d){var f=new mxCodec(d.ownerDocument);f.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")|| -"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible? -"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(A){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!== -typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);break}0<d.length&&(b=d[0].getAttribute("data-mxgraph"),null!=b?(d=JSON.parse(b),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(b=mxUtils.getTextContent(d[0]),b=this.graph.decompress(b),0<b.length&&(d=mxUtils.parseXml(b),a=d.documentElement))))}if(null!=a&& -"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(d=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=d&& -(b=this.graph.decompress(mxUtils.getTextContent(d)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO; -var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1, -messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}}; -Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var f= -document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g, -function(a,b,d,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); -mxSettings.save()}}if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};var r=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=r.apply(this, -arguments);if(mxClient.IS_SVG){var c=this.editorUi,b=c.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;b.model.execute(d)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}}))}return a};var c=DiagramFormatPanel.prototype.addOptions; -DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var d=b.getCurrentFile();null!=d&&d.isAutosaveOptional()&&(d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(d))}return a}; +if(null!=a.css){var d=document.createElement("style");d.setAttribute("type","text/css");d.appendChild(document.createTextNode(a.css));var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(d,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle= +a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(d=document.createElement("style"),d.setAttribute("type","text/css"),d.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0], +b.parentNode.insertBefore(d,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),d=0;d<a.plugins.length;d++)mxscript(a.plugins[d])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var b=d.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div"); +null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==d.nodeName){b=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(f=new mxCodec(c.ownerDocument),f.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(), +null!=c){var f=new mxCodec(c.ownerDocument);f.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");b=d.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")|| +"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var d=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&d.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));d.setAttribute("math",this.graph.mathEnabled?"1":"0");d.setAttribute("shadow",this.graph.shadowVisible? +"1":"0");return d};Editor.prototype.isDataSvg=function(a){try{var d=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(A){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!== +typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),a=c.documentElement)):(c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0]),b=this.graph.decompress(b),0<b.length&&(c=mxUtils.parseXml(b),a=c.documentElement))))}if(null!=a&& +"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||d||(c=null,"diagram"==a.nodeName?c=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(c=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=c&& +(b=this.graph.decompress(mxUtils.getTextContent(c)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO; +var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,d){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1, +messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}}; +Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,d){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var f= +document.createElement("script");f.type="text/javascript";f.src=a;c[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var d=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g, +function(a,b,c,f){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==f&&d.push(f);return""});/,\s*$/.test(a)&&d.push("");return d};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); +mxSettings.save()}}if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};var t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=t.apply(this, +arguments);if(mxClient.IS_SVG){var d=this.editorUi,b=d.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}}))}return a};var d=DiagramFormatPanel.prototype.addOptions; +DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a}; StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"}, {fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&& -this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c); -c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b= -d.getSelectionCells();for(c=0;c<b.length;c++){for(var f=d.getModel().getStyle(b[c]),h=0;h<e.length;h++)f=mxUtils.removeStylename(f,e[h]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR, -null));d.getModel().setStyle(b[c],f)}}finally{d.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor= -a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight= -"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var h=document.createElement("div");h.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var g=document.createElement("div");g.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(a.appendChild(h),a.appendChild(g));mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(h);b(g);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& -(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this, -function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px": -(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= -"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var m=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}m.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint; -this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a, -c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}return d.apply(this,arguments)}};var n=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){n.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a, -c,b){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,c,d,!1);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1; -var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset"); -e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"): -d.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");f.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"), -null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=e[0];d.appendChild(f);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return f};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", -"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"]; +this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d); +d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);mxUtils.br(a);return g.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b= +c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,e[g]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR, +null));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height="30px";d.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":d.style.backgroundColor= +a.fill,d.style.border="1px solid "+a.stroke):(d.style.backgroundColor="#ffffff",d.style.border="1px solid #000000");f.appendChild(d)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),d(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var c=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight= +"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));var h=document.createElement("div");h.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(h));mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(h);d(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& +(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var c=this.editorUi.editor.graph,f=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this, +function(a){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom="2px",null==b?d.style.width="202px":(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d)):d.image&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==b?d.style.width="202px": +(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= +"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}n.apply(this,arguments);var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint; +this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):b.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var d=this.graph.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,d){d.height=Math.max(d.height,20);if(1<d.height/20){var b=d.height%20;d.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a, +d)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.resizeParent=!1;return b}return c.apply(this,arguments)}};var m=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){m.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a, +d,b){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,d,c,!1);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,d,b){b=null!=b?b:!1; +var c=a.ownerDocument,f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset"); +e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feComposite"): +c.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feBlend"):c.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");f.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"), +null!=a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)):c=e[0];c.appendChild(f);b||((d||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return f};Graph.prototype.setShadowVisible=function(a,d){mxClient.IS_SVG&&(d=null!=d?d:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", +"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),d&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),d,b=0;do d=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(d),"locked","0"));null!=d&&this.setDefaultParent(d)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"]; mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5= [STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/transmission"]= [SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]= [SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap= [SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js", STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors= -[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var g=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,e,h,m,n,k){if(null!=b&&null==mxMarker.markers[b]){var u=this.getPackageForType(b);null!=u&&mxStencilRegistry.getStencil(u)}return g.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){x.value=Math.max(1, -Math.min(g,Math.max(parseInt(x.value),parseInt(l.value))));l.value=Math.max(1,Math.min(g,Math.min(parseInt(x.value),parseInt(l.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),h=0,g=0,m=ca.get(),n=1/c.pageScale,k=r.checked;if(k)var n=parseInt(T.value),t=parseInt(O.value),n=Math.min(m.height*t/(e.height/c.view.scale),m.width*n/(e.width/c.view.scale));else n=parseInt(q.value)/(100*c.pageScale),isNaN(n)&&(d=1/c.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width* -d);m.height=Math.ceil(m.height*d);n*=d;!k&&c.pageVisible?(e=c.getPageLayout(),h-=e.x*m.width,g-=e.y*m.height):k=!0;if(null==b){b=PrintDialog.createPrintPreview(c,n,m,0,h,g,k);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var u=b.writeHead;b.writeHead=function(c){u.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=b.renderPage;b.renderPage= -function(a,c,b,d,f,e){var h=v.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:h.className="geDisableMathJax";return h}}b.open(null,null,f,!0)}else{m=c.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=k;b.appendGraph(c,n,h,g,f,!0)}return b}var d=parseInt(V.value)/100;isNaN(d)&&(d=1,V.value="100 %");var d=.75*d,e=l.value,h=x.value,g=!k.checked,n=null;g&&(g=e==m&&h==m);if(!g&&null!=a.pages&&a.pages.length){var t=0,g=a.pages.length-1;k.checked|| -(t=parseInt(e)-1,g=parseInt(h)-1);for(var u=t;u<=g;u++){var v=a.pages[u],e=v==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),h=!0,t=!1,z=null,p=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(h=v.viewState.pageVisible,t=v.viewState.mathEnabled,z=v.viewState.background,p=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(t="0"!=v.mapping.diagramMap.get("mathEnabled"),z=v.mapping.diagramMap.get("background"), -p=v.mapping.diagramMap.get("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null);e.background=z;e.backgroundImage=null!=p?new mxImage(p.src,p.width,p.height):null;e.pageVisible=h;e.mathEnabled=t;var A=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?u+1:A.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(v);e.model.setRoot(v.root)}n=b(e,n,u!=g);e!=f&&e.container.parentNode.removeChild(e.container)}}else n=b(f);n.mathEnabled&& -(g=n.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"), -g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),c&&(g.writeln("MathJax.Hub.Queue(function () {"),g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));n.closeDocument();!n.mathEnabled&&c&&PrintDialog.printPreview(n)}var f=a.editor.graph,e=document.createElement("div"),h=document.createElement("h3"); -h.style.width="100%";h.style.textAlign="center";h.style.marginTop="0px";mxUtils.write(h,c||mxResources.get("print"));e.appendChild(h);var g=1,m=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");n.appendChild(k);h=document.createElement("span"); -mxUtils.write(h,mxResources.get("printAllPages"));n.appendChild(h);mxUtils.br(n);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");n.appendChild(u);h=document.createElement("span");mxUtils.write(h,mxResources.get("pages")+":");n.appendChild(h);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;";l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.style.width="50px";n.appendChild(l);h=document.createElement("span"); -mxUtils.write(h,mxResources.get("to"));n.appendChild(h);var x=l.cloneNode(!0);n.appendChild(x);mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(x,"focus",function(){u.checked=!0});mxEvent.addListener(l,"change",b);mxEvent.addListener(x,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(h=0;h<a.pages.length;h++)if(a.currentPage==a.pages[h]){m=h+1;l.value=m;x.value=m;break}l.setAttribute("max",g);x.setAttribute("max",g);1<g&&e.appendChild(n);var v=document.createElement("div"); -v.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");v.appendChild(p);h=document.createElement("span");mxUtils.write(h,mxResources.get("adjustTo"));v.appendChild(h);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";v.appendChild(q);mxEvent.addListener(q,"focus",function(){p.checked=!0}); -e.appendChild(v);var n=n.cloneNode(!1),r=p.cloneNode(!0);r.setAttribute("value","fit");p.setAttribute("checked","checked");h=document.createElement("div");h.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";h.appendChild(r);n.appendChild(h);v=document.createElement("table");v.style.display="inline-block";var K=document.createElement("tbody"),J=document.createElement("tr"),M=J.cloneNode(!0),S=document.createElement("td"),D=S.cloneNode(!0),W=S.cloneNode(!0),Q=S.cloneNode(!0), -X=S.cloneNode(!0),U=S.cloneNode(!0);S.style.textAlign="right";Q.style.textAlign="right";mxUtils.write(S,mxResources.get("fitTo"));var T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","1");T.setAttribute("min","1");T.setAttribute("type","number");T.style.width="40px";D.appendChild(T);h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsAcross"));W.appendChild(h);mxUtils.write(Q,mxResources.get("fitToBy"));var O=T.cloneNode(!0);X.appendChild(O); -mxEvent.addListener(T,"focus",function(){r.checked=!0});mxEvent.addListener(O,"focus",function(){r.checked=!0});h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsDown"));U.appendChild(h);J.appendChild(S);J.appendChild(D);J.appendChild(W);M.appendChild(Q);M.appendChild(X);M.appendChild(U);K.appendChild(J);K.appendChild(M);v.appendChild(K);n.appendChild(v);e.appendChild(n);n=document.createElement("div");h=document.createElement("div");h.style.fontWeight="bold";h.style.marginBottom= -"12px";mxUtils.write(h,mxResources.get("paperSize"));n.appendChild(h);h=document.createElement("div");h.style.marginBottom="12px";var ca=PageSetupDialog.addPageFormatPanel(h,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(h);h=document.createElement("span");mxUtils.write(h,mxResources.get("pageScale"));n.appendChild(h);var V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","100 %");V.style.width="60px";n.appendChild(V); -e.appendChild(n);h=document.createElement("div");h.style.cssText="text-align:right;margin:62px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&h.appendChild(n);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",h.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog(); -d(!1)}),v.className="geBtn",h.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});v.className="geBtn gePrimaryBtn";h.appendChild(v);a.editor.cancelFirst||h.appendChild(n);e.appendChild(h);this.container=e};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background= -this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(x.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!= +[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var h=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,g,n,m,k){if(null!=b&&null==mxMarker.markers[b]){var r=this.getPackageForType(b);null!=r&&mxStencilRegistry.getStencil(r)}return h.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){p.value=Math.max(1, +Math.min(h,Math.max(parseInt(p.value),parseInt(w.value))));w.value=Math.max(1,Math.min(h,Math.min(parseInt(p.value),parseInt(w.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),g=0,h=0,n=ca.get(),m=1/d.pageScale,k=t.checked;if(k)var m=parseInt(T.value),r=parseInt(O.value),m=Math.min(n.height*r/(e.height/d.view.scale),n.width*m/(e.width/d.view.scale));else m=parseInt(q.value)/(100*d.pageScale),isNaN(m)&&(c=1/d.pageScale,q.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width* +c);n.height=Math.ceil(n.height*c);m*=c;!k&&d.pageVisible?(e=d.getPageLayout(),g-=e.x*n.width,h-=e.y*n.height):k=!0;if(null==b){b=PrintDialog.createPrintPreview(d,m,n,0,g,h,k);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var u=b.writeHead;b.writeHead=function(d){u.apply(this,arguments);null!=a.editor.fontCss&&(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var y=b.renderPage;b.renderPage= +function(a,d,b,c,f,e){var g=y.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{n=d.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=k;b.appendGraph(d,m,g,h,f,!0)}return b}var c=parseInt(V.value)/100;isNaN(c)&&(c=1,V.value="100 %");var c=.75*c,e=w.value,g=p.value,h=!k.checked,m=null;h&&(h=e==n&&g==n);if(!h&&null!=a.pages&&a.pages.length){var r=0,h=a.pages.length-1;k.checked|| +(r=parseInt(e)-1,h=parseInt(g)-1);for(var u=r;u<=h;u++){var y=a.pages[u],e=y==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,r=!1,l=null,v=null;null==y.viewState&&null==y.mapping&&null==y.root&&a.updatePageRoot(y);null!=y.viewState?(g=y.viewState.pageVisible,r=y.viewState.mathEnabled,l=y.viewState.background,v=y.viewState.backgroundImage):null!=y.mapping&&null!=y.mapping.diagramMap&&(r="0"!=y.mapping.diagramMap.get("mathEnabled"),l=y.mapping.diagramMap.get("background"), +v=y.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);e.background=l;e.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height):null;e.pageVisible=g;e.mathEnabled=r;var A=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?y.getName():"pagenumber"==a?u+1:A.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(y);e.model.setRoot(y.root)}m=b(e,m,u!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=b(f);m.mathEnabled&& +(h=m.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"), +h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),d&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&d&&PrintDialog.printPreview(m)}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3"); +g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var h=1,n=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");m.appendChild(k);g=document.createElement("span"); +mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");m.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";w.setAttribute("value","1");w.setAttribute("type","number");w.setAttribute("min","1");w.style.width="50px";m.appendChild(w);g=document.createElement("span"); +mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var p=w.cloneNode(!0);m.appendChild(p);mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(p,"focus",function(){u.checked=!0});mxEvent.addListener(w,"change",b);mxEvent.addListener(p,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;w.value=n;p.value=n;break}w.setAttribute("max",h);p.setAttribute("max",h);1<h&&e.appendChild(m);var l=document.createElement("div"); +l.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");l.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));l.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";l.appendChild(q);mxEvent.addListener(q,"focus",function(){v.checked=!0}); +e.appendChild(l);var m=m.cloneNode(!1),t=v.cloneNode(!0);t.setAttribute("value","fit");v.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(t);m.appendChild(g);l=document.createElement("table");l.style.display="inline-block";var K=document.createElement("tbody"),J=document.createElement("tr"),M=J.cloneNode(!0),S=document.createElement("td"),D=S.cloneNode(!0),W=S.cloneNode(!0),Q=S.cloneNode(!0), +X=S.cloneNode(!0),U=S.cloneNode(!0);S.style.textAlign="right";Q.style.textAlign="right";mxUtils.write(S,mxResources.get("fitTo"));var T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","1");T.setAttribute("min","1");T.setAttribute("type","number");T.style.width="40px";D.appendChild(T);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));W.appendChild(g);mxUtils.write(Q,mxResources.get("fitToBy"));var O=T.cloneNode(!0);X.appendChild(O); +mxEvent.addListener(T,"focus",function(){t.checked=!0});mxEvent.addListener(O,"focus",function(){t.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));U.appendChild(g);J.appendChild(S);J.appendChild(D);J.appendChild(W);M.appendChild(Q);M.appendChild(X);M.appendChild(U);K.appendChild(J);K.appendChild(M);l.appendChild(K);m.appendChild(l);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom= +"12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ca=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);var V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","100 %");V.style.width="60px";m.appendChild(V); +e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),l.className="geBtn",g.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog(); +c(!1)}),l.className="geBtn",g.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";g.appendChild(l);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background= +this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(w.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!= this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})(); -(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; -EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported= -!(!a.getContext||!a.getContext("2d"))}catch(n){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(g){}};d.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(n){}try{b= -document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(a){return window.open(a)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()}; -EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()|| -!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var h=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(h=document.createElement("div"),h.style.position="absolute",h.style.whiteSpace="nowrap",h.style.background="#4B4243",h.style.color= -"white",h.style.fontFamily="Helvetica, Arial",h.style.fontSize="9pt",h.style.padding="6px",h.style.paddingLeft="10px",h.style.paddingRight="10px",h.style.zIndex=2E9,h.style.left=Math.max(0,a)+"px",h.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(h.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(h.style,"boxShadow","2px 2px 3px 0px #ddd"),h.innerHTML=e+"...",d.appendChild(h),c.status=h,mxClient.IS_VML&& -(null==document.documentMode||8>=document.documentMode)&&(h.style.left=Math.round(Math.max(0,a-h.offsetWidth/2))+"px",h.style.top=Math.round(Math.max(0,b+70-h.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),h=!0);return h};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}}; -return c};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var h=c(a,4);if(null!=b&&b(e-8,h,d))break;value=c(a,d);c(a,4);if("IEND"==h)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c= -mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(m){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("<mxfile ");if(0<=d){var e=c.lastIndexOf("</mxfile>");e>d&&(b=c.substring(d,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var n= -mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages),b=null!=g?mxUtils.getXml(g):""}catch(x){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a, -!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!= -urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}}; -EditorUi.prototype.createFileData=function(a,b,d,e,n,g,k,u,l,t){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;l=null!=l?l:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var m=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(m);if(b.decompress(h)!=m)return m;m=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(m,h);h=a.ownerDocument.createElement("mxfile");h.appendChild(m)}t? -(h=h.cloneNode(!0),h.removeAttribute("userAgent"),h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type")):(h.setAttribute("userAgent",navigator.userAgent),h.setAttribute("version",EditorUi.VERSION),h.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!g&&!n&&(k||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=d?d.getTitle():null,c,f);else if(g||!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null== -d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,l,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var f= -0;f<this.pages.length;f++){var e=this.pages[f].mapping;this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[f].node,d),e.needsUpdate=!1);c.appendChild(this.pages[f].node)}}return c};EditorUi.prototype.getFileData=function(a,b,d,e,n,g,k,u,l){n=null!=n?n:!0;k=null!=k?k:this.getXmlFileData(n,null!= -g?g:!1);l=null!=l?l:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var c=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(f.root)}a=this.createFileData(k,g,l,window.location.href,a,b,d,e,n,u);g!=this.editor.graph&& -g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;g=Math.floor(c.x/h-b.view.translate.x);h=Math.floor(c.y/h-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0", -h)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': -"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+ -"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,n){null!=n&&(n=n.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"}; -null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+ -mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==n?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length? -mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page|| -0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!= -a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,d,e,n,g){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,n));this.saveData(f,a,h,"text/xml")}else if("html"== -a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var f=this.createDownloadRequest(c,a,e,b);this.editor.graph.pageVisible=d;return f}catch(H){this.handleError(H)}}));else{var m=null,k= -mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);var p=this.editor.graph.getSvg(l,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+ -mxUtils.getXml(a))})))}else f=c+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var h= -0;h<this.pages.length;h++)if(this.pages[h]==this.currentPage){f="&from="+h;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear(); -this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a); -a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable? -(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(), -mode:a.getMode()})}catch(n){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(n){}}catch(n){null!=window.console&&console.log("error in fileLoaded:",a,n);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=n&&null!=n.message?":err:"+encodeURIComponent(n.message):"")+(null!= -n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}catch(g){}this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL: -"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,n,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this, -function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()), -".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling; -var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!= -this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(c,b){if(0==c.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding= -"8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var d=0;d<c.length;d++){var e=c[d],h=e.data;if(null!=h){var h=this.convertDataUri(h),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+h,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(h=this.stringToCells(this.editor.graph.decompress(e.xml)),0<h.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(h, -e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var h=0;h<b.length;h++)mxUtils.bind(this,function(a){var c=a.data;null!=c&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){c=this.convertDataUri(c);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+c,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title, -mxUtils.bind(this,function(){var c=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var l=k.parentNode.previousSibling;d=l.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d); -var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");l.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("align","top");p.setAttribute("border","0");p.className="geButton";p.style.marginRight="1px";p.style.marginTop="-1px";t.appendChild(p);var q= -null;mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var w=this.editor.graph,r=null,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0); -a.isAutosave()?(null!=r&&null!=r.parentNode&&r.parentNode.removeChild(r),r=p.cloneNode(!1),r.setAttribute("src",Editor.spinImage),r.setAttribute("title",mxResources.get("saving")),r.style.cursor="default",r.style.marginRight="2px",r.style.marginTop="-2px",t.insertBefore(r,t.firstChild),l.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=r&&null!=r.parentNode&&(r.parentNode.removeChild(r),l.style.paddingRight=18*t.childNodes.length+ -"px")})):null==q&&(q=p.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",mxResources.get("save")),t.insertBefore(q,t.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(l.style.paddingRight=18*t.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(c)})),l.style.paddingRight=18*t.childNodes.length+"px")}),C= -mxUtils.bind(this,function(a,c,d,e){a=w.cloneCells(mxUtils.sortCells(w.model.getTopmostCells(a)));for(var h=0;h<a.length;h++){var g=w.getCellGeometry(a[h]);null!=g&&g.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}), -H=mxUtils.bind(this,function(a){if(w.isSelectionEmpty())w.getRubberband().isActive()?(w.getRubberband().execute(a),w.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=w.getSelectionCells(),b=w.view.getBounds(c),d=w.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=w.view.translate.x;b.y-=w.view.translate.y;C(c,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){}, -mxUtils.bind(this,function(a){w.isMouseDown&&null!=w.panningManager&&null!=w.graphHandler.shape&&(w.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",w.panningManager.stop(),w.autoScroll=!1,null!=w.graphHandler.guide&&w.graphHandler.guide.setVisible(!1),null!=w.graphHandler.hint&&(w.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){w.isMouseDown&& -null!=w.panningManager&&null!=w.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,w.panningManager.stop(),w.graphHandler.reset(),w.isMouseDown=!1,w.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){w.isMouseDown&&null!=w.graphHandler.shape&&(w.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor= -"",w.autoScroll=!0,null!=w.graphHandler.guide&&w.graphHandler.guide.setVisible(!0),null!=w.graphHandler.hint&&(w.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})), -mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,h,g,m,n,t,l,p){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,n),c)],c[0].vertex= -!0,C(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(h.documentElement));e(g,k);b=b.concat(g);G(a);this.spinner.stop();u=!0}catch(V){}else if("mxfile"==h.documentElement.nodeName)try{for(var m= -h.documentElement.getElementsByTagName("diagram"),h=0;h<m.length;h++){var g=mxUtils.getTextContent(m[h]),n=this.stringToCells(this.editor.graph.decompress(g)),t=this.editor.graph.getBoundingBoxFromGeometry(n);C(n,new mxRectangle(0,0,t.width,t.height),a)}u=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});!this.isOffline()&& -(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=p?this.parseFile(p,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border= -"3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",IMAGE_PATH+"/edit.gif");p.setAttribute("title",mxResources.get("edit"));t.insertBefore(p,t.firstChild);mxEvent.addListener(p,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));t.insertBefore(d,t.firstChild);mxEvent.addListener(d,"click", -H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;",d.className="geButton",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(d,t.firstChild))}l.appendChild(t);l.style.paddingRight=18*t.childNodes.length+"px"}};"1"==urlParams.offline|| -EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide")); -a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet","styles/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)", -Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet","styles/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme", -Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor= -"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", +EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');svrc=EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport= +!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(h){}};c.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(m){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(a){return window.open(a)}; +EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled= +function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme? +"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(c,e){var g=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top= +Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),g.innerHTML=e+"...",c.appendChild(g),d.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this, +function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),g=!0);return g};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=e;e+=d;return a.substring(b,e)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<< +24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var g=d(a,4);if(null!=b&&b(e-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml; +EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=d.indexOf("<mxfile ");if(0<=c){var e=d.lastIndexOf("</mxfile>");e>c&&(b=d.substring(c,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(d),h=this.editor.extractGraphModel(m.documentElement,null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(w){}return b};EditorUi.prototype.validateFileData=function(a){if(null!= +a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages|| +1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var h=this.updatePageRoot(new DiagramPage(c[e]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", +[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,m,h,k,u,l,r){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;l=null!=l?l:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER? +d="_blank":f=d=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(n);if(b.decompress(g)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(n)}r?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version", +EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!m&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(h||!m&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,l,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a= +null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var e=this.pages[f].mapping;this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel), +e.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[f].node,c),e.needsUpdate=!1);d.appendChild(this.pages[f].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,m,h,k,u,l){m=null!=m?m:!0;k=null!=k?k:this.getXmlFileData(m,null!=h?h:!1);l=null!=l?l:this.getCurrentFile();h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet()); +var d=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(k,h,l,window.location.href,a,b,c,e,m,u);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,m,h){h=null!=h?h:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var d=h?b.getGraphBounds(): +b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;h=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!= +m&&(m=m.replace(/&/g,"&"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m? +'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+ +"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,m){null!=m&&(m=m.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">': +">")+"\n<head>\n"+(null==m?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==m?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ +m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var d=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=d?this.editor.extractGraphModel(d,!0):null;null!=a&&(d=a);if(null!=d&&"mxfile"==d.nodeName&&(a=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode= +d;this.pages=[];for(d=0;d<a.length;d++){var b=new DiagramPage(a[d]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", +[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,m,h){try{e=null!=e?e:this.editor.graph.isSelectionEmpty(); +var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,m));this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this, +function(d,b){try{var c=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(d,a,e,b);this.editor.graph.pageVisible=c;return f}catch(H){this.handleError(H)}}));else{var n=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var l=this.editor.graph.background; +l==mxConstants.NONE&&(l=null);var p=this.editor.graph.getSvg(l,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(F){this.handleError(F)}}; +EditorUi.prototype.createDownloadRequest=function(a,b,c,e){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+ +d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle(); +this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open(); +this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()): +this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(m){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(m){}}catch(m){null!= +window.console&&console.log("error in fileLoaded:",a,m);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=m&&null!=m.message?":err:"+encodeURIComponent(m.message):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}catch(h){}this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this, +function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)): +"")}catch(g){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,m,h,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))}; +EditorUi.prototype.createLibraryDataFromImages=function(a){var d=mxUtils.createXmlDocument(),b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var d=this.sidebar.palettes[a]; +if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var d=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a){var d=mxUtils.parseXml(a.getData()); +if("mxlibrary"==d.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()], +d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=0;c<d.length;c++){var e=d[c],g=e.data;if(null!=g){var g= +this.convertDataUri(g),h="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(h+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(h+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var d= +a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(d, +a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var l=k.parentNode.previousSibling;c=l.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var r=document.createElement("div");r.style.position="absolute";r.style.right="0px";r.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode|| +(r.style.backgroundColor="inherit");l.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("align","top");p.setAttribute("border","0");p.className="geButton";p.style.marginRight="1px";p.style.marginTop="-1px";r.appendChild(p);var q=null;mxEvent.addListener(p,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)}); +null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var z=this.editor.graph,t=null,B=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),G=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=p.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title", +mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",r.insertBefore(t,r.firstChild),l.style.paddingRight=18*r.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),l.style.paddingRight=18*r.childNodes.length+"px")})):null==q&&(q=p.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",mxResources.get("save")),r.insertBefore(q,r.firstChild), +mxEvent.addListener(q,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(l.style.paddingRight=18*r.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(d)})),l.style.paddingRight=18*r.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,d,c,e){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=z.getCellGeometry(a[g]);null!=h&& +h.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);G(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),H=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"), +mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=z.getSelectionCells(),b=z.view.getBounds(d),c=z.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=z.view.translate.x;b.y-=z.view.translate.y;C(d,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)": +k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0, +z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border= +"3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0< +a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,g,h,n,m,r,l,p){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,m),d)],d[0].vertex=!0,C(d,new mxRectangle(0,0,n,m),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f), +f=null);else{var u=!1,w=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var g=mxUtils.parseXml(d);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);G(a);this.spinner.stop();u=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),g=0;g<n.length;g++){var h=mxUtils.getTextContent(n[g]),m=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(m); +C(m,new mxRectangle(0,0,r.width,r.height),a)}u=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=p&&null!=r&&(/(\.vsdx)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r))?this.importVisio(p,function(a){w(a,"text/xml")}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,r)&&null!=p?this.parseFile(p, +mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()})); +p=p.cloneNode(!1);p.setAttribute("src",IMAGE_PATH+"/edit.gif");p.setAttribute("title",mxResources.get("edit"));r.insertBefore(p,r.firstChild);mxEvent.addListener(p,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});c=p.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));r.insertBefore(c,r.firstChild);mxEvent.addListener(c,"click",H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"), +c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),r.insertBefore(c,r.firstChild))}l.appendChild(r);l.style.paddingRight=18*r.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth= +64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top= +"-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet","styles/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight= +41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet","styles/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor= +"#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display= -"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,e,n){a=new ImageDialog(this,a,b,d,e,n);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor= -!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,n){a=new LibraryDialog(this,a,b,d,e,n);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer"); -a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d){var c=null!=this.spinner&&null!= -this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),h=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden")); +"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var d=document.getElementById("geFooter");null!=d&&(this.footerHeight=a,d.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,e,m){a=new ImageDialog(this,a,b,c,e,m);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor= +!0;this.editor.graph.model.execute(a)});var d=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,m){a=new LibraryDialog(this,a,b,c,e,m);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer"); +a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!= +this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){d();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden")); else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a= -mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,d,h)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,n,g,k){a=new ErrorDialog(this,a,b,d,e,n,g,k);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this, -null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,n)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= -function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c}; -EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS}; -EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height= -"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(u){}}else this.createEchoRequest(a, -b,d,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),k=0;k<f;++k){for(var l=1024*k,p=Math.min(l+1024,d),t=Array(p-l),q=0;l<p;++q,++l)t[q]= -c[l].charCodeAt(0);e[k]=new Uint8Array(t)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,n,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a, -!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(y){this.handleError(y)}}))}catch(A){this.handleError(A)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,null,4<n?3:4,a,d,e);this.showDialog(b.container,380,n==(mxClient.IS_IOS?0:1)?160:4<n?390:270,!0,!0);b.init()}; -EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a, -!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div"); -var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left= -d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height= -"auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null, -this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,n,b,c)}),d, -n,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,n,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e, -a,g,!0,c,d)}catch(w){this.handleError(w)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,c,d)}catch(w){this.handleError(w)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"), -!1,!1,k,null,null,4<c?3:4,e,g,n);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,n,g,k,l,p){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background; -c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,k,l,null,d);e&&this.editor.graph.addSvgShadow(f);var h=this.getBaseFilename()+".svg",m=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,p));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c, -this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){g?(null== -this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,m,this.thumbImageCache)):m(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),mxUtils.write(a,b),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a, -b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option"); -d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b|| -b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+ -Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option"); -f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();k.style.padding= -mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,n,g,k,l){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+ -a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),g&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(d&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?d="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),l||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d? -this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a, -b,d,e,n,g,k,l,p,t,q){this.getBasenames();var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==e&&(c.target=e);p||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];k&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);l&&d.push("layers");0<d.length&&(p&&d.push("lightbox"),c.toolbar=d.join(" "));null!=t&&0<t.length&&(c.edit=t);null!= -a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+ -'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;"; -m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");f=m.cloneNode(!0);f.setAttribute("value","copy");h.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(k);mxUtils.br(h);h.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));h.appendChild(k);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(k= -document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),h.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&m.setAttribute("disabled","disabled");c.appendChild(h);var p=this.addLinkSection(c),q=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c, -":");var w=document.createElement("input");w.setAttribute("type","text");w.style.marginRight="16px";w.style.width="60px";w.style.marginLeft="4px";w.style.marginRight="12px";w.value="100%";c.appendChild(w);var r=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(c,mxResources.get("allPages"),h,!h),G=this.addCheckbox(c,mxResources.get("layers"),!0),C=this.addCheckbox(c,mxResources.get("lightbox"),!0),H=this.addEditButton(c,C),z=H.getEditInput(); -z.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");z.checked&&C.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(m.checked?d:null,q.checked,w.value,p.getTarget(),p.getColor(),r.checked,B.checked,G.checked,C.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()}; -EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,k,g){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var h=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384", -m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);c.appendChild(m);n=document.createElement("a"); -n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok")); -this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,p=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",c.appendChild(l),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px", -p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var q=this.addLinkSection(c,g);d=null!=this.pages&&1<this.pages.length;var r=null;if(null==h||h.constructor!=window.DriveFile||b)r=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(c,mxResources.get("lightbox"),!0),C=this.addEditButton(c,G),H=C.getEditInput(),z=this.addCheckbox(c,mxResources.get("layers"),!0);z.style.marginLeft=H.style.marginLeft;z.style.marginBottom="16px"; -z.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(z.removeAttribute("disabled"),H.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&G.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(q.getTarget(),q.getColor(),null==r?!0:r.checked,G.checked,C.getLink(),z.checked,null!=l?l.value:null,null!= -p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; -c.appendChild(f);var h=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,k,g,l,p){l=null!=l?l:!0;var c=document.createElement("div");c.style.whiteSpace= -"nowrap";var f=this.editor.graph,h="jpeg"==p?170:280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";c.appendChild(m);mxUtils.write(c,mxResources.get("borderWidth")+ -":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";c.appendChild(u);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=p),x=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),r=document.createElement("input");r.style.marginTop="16px";r.style.marginRight= -"8px";r.style.marginLeft="24px";r.setAttribute("disabled","disabled");r.setAttribute("type","checkbox");g&&(c.appendChild(r),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),h+=26,mxEvent.addListener(x,"change",function(){x.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(r.setAttribute("checked","checked"),r.defaultChecked=!0);var H=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),z=document.createElement("input");z.style.marginTop= -"16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(c.appendChild(z),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),h+=26);var L=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=p),E=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(c,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=p);I.style.marginLeft="24px";I.style.marginBottom="16px";E||(I.style.visibility= -"hidden");mxEvent.addListener(L,"change",function(){L.checked&&E?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});l&&E||I.setAttribute("disabled","disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=m.value;k(m.value,q.checked,!x.checked,H.checked,L.checked,z.checked,u.value,r.checked,!I.checked)}),null,d,e);this.showDialog(a.container,320,h,!0,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var m=this.addCheckbox(c,mxResources.get("fit"),!0),n=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e, -!e),l=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,p),r=q.getEditInput(),B=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(c,mxResources.get("layers"),B,!B);G.style.marginLeft=r.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(B&&G.removeAttribute("disabled"),r.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),r.setAttribute("disabled","disabled")); -r.checked&&p.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(m.checked,n.checked,l.checked,p.checked,q.getLink(),G.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,k,g,l,p){function c(c){var b=" ",h="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(k?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var m="";d&&(m=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+c+'"'+m+(""!=h?' style="'+h+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){p({message:mxResources.get("unknownError")})}), -null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";d&&(h="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+h+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?c("data:image/png;base64,"+m.getText()):p({message:mxResources.get("unknownError")})}))}else p({message:mxResources.get("drawingTooLarge")})}; -EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,g,l){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var h=0;h<f.length;h++){var m=f[h].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[h].getAttribute("target")&&f[h].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",p="";e&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(k?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+n+"/>")}))}else p="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(k?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=p&&c.setAttribute("style",p),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+ -" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0< -d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph, -e=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),f=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container); -c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg= -function(a,b,d,e,k,g,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ -mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,k,g,l,p,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,p):null,q)}catch(y){"Invalid image"==y.message?this.downloadFile(q):this.handleError(y)}}),null, -this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,g,l)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],h=1;h<b.length;h++){var g= -b[h].indexOf(")");f.push('url("');f.push(e[c(b[h].substring(0,g))]);f.push('"'+b[h].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),p=null,t=b[k].indexOf("format(",l);0<t&&(p=c(b[k].substring(t+7,b[k].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))c= -"application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;g()}),mxUtils.bind(this, -function(a){d--;g()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,l)),p)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,g,l,p,q,t,r,y,w,F){g=null!=g?g:!0;y=null!=y?y:this.editor.graph;w=null!=w?w:0;var c=q?null:y.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==q&&(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(y.getSvg(c,null,null,F,null,null!=l?l:!0),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this, -function(){try{var f=document.createElement("canvas"),h=parseInt(d.getAttribute("width")),n=parseInt(d.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=g?Math.min(1,Math.min(3*b/(4*n),b/h)):b/h);h=Math.ceil(p*h)+2*w;n=Math.ceil(p*n)+2*w;f.setAttribute("width",h);f.setAttribute("height",n);var m=f.getContext("2d");null!=c&&(m.beginPath(),m.rect(0,0,h,n),m.fillStyle=c,m.fill());m.scale(p,p);m.drawImage(e,w/p,w/p);a(f)}catch(Y){null!=k&&k(Y)}});e.onerror=function(a){null!=k&&k(a)};try{t&&this.editor.graph.addSvgShadow(d); -var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(y,d,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(z){null!=k&&k(z)}}),d,r)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert; -a.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,a.baseUrl.length)==a.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,h){for(var g=a.getElementsByTagName(d),k=0;k<g.length;k++)mxUtils.bind(this,function(d){var g= -e.convert(d.getAttribute(h));if(null!=g&&"data:"!=g.substring(0,5)){var k=f[g];null==k?(c++,this.convertImageToDataUri(g,function(e){null!=e&&(f[g]=e,d.setAttribute(h,e));c--;0==c&&b(a)})):d.setAttribute(h,k)}})(g[k])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,g){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<= -a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}g=null!=g?g:"data:image/png;base64,";e=g+this.base64Encode(e)}b(e)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout, -function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=d&&d(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a, -b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),n= -this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){f.model.beginUpdate();try{for(a=0;a<m.length;a++){var l=this.updatePageRoot(new DiagramPage(m[a])),p=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,l,l, -p))}}finally{f.model.endUpdate()}}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}}catch(w){throw k||this.handleError(w,mxResources.get("invalidOrMissingFile")),w;}return c};EditorUi.prototype.importLucidChart=function(a,b,d,e,k){var c=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,k)}catch(x){this.handleError(x)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions= -!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,k){k=JSON.parse(a);a=[];if(null!=k.state){k=JSON.parse(k.state);for(var c in k.Pages)a.push(k.Pages[c]);a.sort(function(a,c){return a.Properties.Order<c.Properties.Order?-1:a.Properties.Order>c.Properties.Order?1:0})}else a.push(k);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f= -this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,g,l){g=null!=g?g:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>= -a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),h=this.importXml(f,b,d,g,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&& -!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(f,b,d,g,!0),0<h.length)return h}catch(A){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+ -";"))}),l,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),h=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),h,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d), -1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,g);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,g);else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d), -1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[k])),k.value=a,c.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(k.value)&&c.setLinkForCell(k,k.value),k.geometry.width+=c.gridSize,k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize= -function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile= -function(a,b,d,e,k,g,l,p,q,t,r){t=null!=t?t:!0;var c=!1,f=null;"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=r?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,t),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,k,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ -a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,t);null!=p&&p(a)})):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=l&&".vssx"== -l.toLowerCase().substring(l.length-5)&&(l=l.substring(0,l.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,l))):b=this.importXml(a,d,e,t));null!=p&&p(b)}}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,t));c||null==p||p(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,k;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4);b+="==";break}g=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,e,k,g,l,p,q,t,r,y){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var m=r||this.resampleThreshold,n=0;n<a.length;n++)if("image/"==a[n].type.substring(0, -6)&&a[n].size>m){h=!0;break}var u=mxUtils.bind(this,function(){var h=this.editor.graph,m=h.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,h,g,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,e,f,h,g,k,m,c,y)});g=null!=g?g:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,q=n,u=[],v=mxUtils.bind(this,function(a, -b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=p)p(u);else{var c=[];h.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(c=c.concat(e))}}finally{h.getModel().endUpdate()}}g(c)}}),x=0;x<n;x++)mxUtils.bind(this,function(c){var g=a[c],n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==l||l(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var n=a.target.result,p=n.indexOf(","),q=decodeURIComponent(escape(atob(n.substring(p+1)))), -z=mxUtils.parseXml(q),q=z.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=y?null:q.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?v(c,mxUtils.bind(this,function(){try{if(n.substring(0,p+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")), -t=parseFloat(f.getAttribute("height")),q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox","0 0 "+l+" "+t);else if(isNaN(l)||isNaN(t)){var u=q.split(" ");3<u.length&&(l=parseFloat(u[2]),t=parseFloat(u[3]))}n=this.createSvgDataUri(mxUtils.getXml(f));var r=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,t)),v=k(n,g.type,b+c*m,d+c*m,Math.max(1,Math.round(l*r)),Math.max(1,Math.round(t*r)),g.name);if(isNaN(l)||isNaN(t)){var E=new Image;E.onload=mxUtils.bind(this,function(){l= -Math.max(1,E.width);t=Math.max(1,E.height);v[0].geometry.width=l;v[0].geometry.height=t;f.setAttribute("viewBox","0 0 "+l+" "+t);n=this.createSvgDataUri(mxUtils.getXml(f));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));h.setCellStyles("image",n,[v[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(f))}return v}}}catch(ba){}return null})):v(c,mxUtils.bind(this,function(){return k(u,"text/xml",b+c*m,d+c*m,0,0,g.name)}))}}else{q=!1;if("image/png"==g.type){var E=y?null: -this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var x=new Image;x.src=a.target.result;v(c,mxUtils.bind(this,function(){return k(E,"text/xml",b+c*m,d+c*m,x.width,x.height,g.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result, -mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,n,l){v(c,mxUtils.bind(this,function(){if(null!=h&&h.length<t){var p=f&&this.isResampleImage(a.target.result,r)?Math.min(1,Math.min(e/n,e/l)):1;return k(h,g.type,b+c*m,d+c*m,Math.round(n*p),Math.round(l*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,r)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result, -g.type,b+c*m,d+c*m,240,160,g.name,function(a){v(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)?"1"==urlParams.dev?/(\.vssx)($|\?)/i.test(g.name)?(new com.mxgraph.io.mxVssxCodec).decodeVssx(g,mxUtils.bind(this,function(a){v(c,mxUtils.bind(this,function(){var b=g.name;null!=b&&".vssx"==b.toLowerCase().substring(b.length-5)&&(b=b.substring(0,b.length-5)+".xml");this.loadLibrary(new LocalLibrary(this,a,b))}))})):(new com.mxgraph.io.mxVsdxCodec).decodeVsdx(g, -mxUtils.bind(this,function(a){v(c,mxUtils.bind(this,function(){return this.importXml(a,b+c*m,d+c*m)}))})):k(null,g.type,b+c*m,d+c*m,240,160,g.name,function(a){v(c,function(){return a})},g):"image"==g.type.substring(0,5)?n.readAsDataURL(g):n.readAsText(g)})(x)});h?this.confirmImageResize(function(a){f=a;u()},q):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP? -mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage|| -mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,k,g){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height); -if(e&&this.isResampleImage(b,g))try{var h=Math.max(c/k,f/k);if(1<h){var m=Math.round(c/h),n=Math.round(f/h),l=document.createElement("canvas");l.width=m;l.height=n;l.getContext("2d").drawImage(a,0,0,m,n);var p=l.toDataURL();if(p.length<b.length){var q=document.createElement("canvas");q.width=m;q.height=n;var r=q.toDataURL();p!==r&&(b=p,c=m,f=n)}}}catch(G){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]= -d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){function c(a,b){var c=m;m+=b;return a.substring(c,m)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a, -!0);var m=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(c(a,4),"IHDR"!=c(a,4))null!=k&&k();else{c(a,17);k=a.substring(0,m);do{var n=f(a);if("IDAT"==c(a,4)){k=a.substring(0,m-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);k+=h(d.length)+b+d+h(e^4294967295);k+=a.substring(m-8,a.length);break}k+=a.substring(m-8,m-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+ -(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a= -a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(n){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)} -"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,d=this.editor.graph,e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var k=d.addClickHandler;d.addClickHandler=function(b,c,e){var f= -c;c=function(b,c){if(null==c){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(c=e.getAttribute("href"))}null==c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=f&&f(b,c)};k.call(this,b,c,e)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)}; -this.defaultFilename=mxResources.get("untitledDiagram");var g=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:g.apply(this,arguments)};var p=d.createLinkForHint;d.createLinkForHint=function(c,e){var f=d.isPageLink(c);if(f){var h=c.indexOf(",");0<h&&(h=b.getPageById(c.substring(h+1)),e=null!=h?h.getName():mxResources.get("pageNotFound"))}h=p.call(this, -c,e);f&&mxEvent.addListener(h,"click",function(b){a(c);mxEvent.consume(b)});return h};var q=d.labelLinkClicked;d.labelLinkClicked=function(b,c,e){var f=c.getAttribute("href");null==f||!d.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?q.apply(this,arguments):(d.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var r=this.actions.get("print");r.setEnabled(!mxClient.IS_IOS|| -!navigator.standalone);r.visible=r.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){A.innerHTML=" ";A.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle"); -this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||d.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var h=f[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,h){b.insertImage(a, -f,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(K){}}),!1);var A=document.createElement("div");A.style.position="absolute";A.style.whiteSpace="nowrap";A.style.overflow="hidden";A.style.display="block";A.contentEditable=!0;mxUtils.setOpacity(A,0);A.style.width="1px";A.style.height="1px";A.innerHTML= -" ";var y=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==d.container||!d.isEnabled()||d.isMouseDown||d.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||y||(A.style.left=d.container.scrollLeft+10+"px",A.style.top= -d.container.scrollTop+10+"px",d.container.appendChild(A),y=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){A.focus();document.execCommand("selectAll",!1,null)},0):(A.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!y||224!=b&&17!=b&&91!=b||(y=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),A.parentNode.removeChild(A))}),0)}));mxEvent.addListener(A, -"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(A),t())}));mxEvent.addListener(A,"cut",mxUtils.bind(this,function(a){d.isEnabled()&&(this.copyCells(A,!0),t())}));mxEvent.addListener(A,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(A.innerHTML=" ",A.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,A);A.innerHTML=" "}),0))}),!0);var w=this.isSelectionAllowed;this.isSelectionAllowed= -function(a){return mxEvent.getSource(a)==A?!0:w.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}), -mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,h){b.insertImage(a,f,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b= -0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<= -mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){r=document.createElement("div");r.style.position="absolute";r.style.top="95px";r.style.left="250px";r.style.width="2000px";r.style.height="30px";r.style.background= -"whiteSmoke";document.body.appendChild(r);var F=document.createElement("div");F.style.position="absolute";F.style.top="125px";F.style.left="220px";F.style.width="30px";F.style.height="1000px";F.style.background="whiteSmoke";document.body.appendChild(F);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph, -F,!0);this.hRuler=new mxRuler(this.editor.graph,r,!1)}if("1"==urlParams.test){r=document.getElementById("geFooter");null!=r&&(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)})),r.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed; -this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}r=document.getElementById("geInfo");null!=r&&r.parentNode.removeChild(r);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null== -C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=d.view.translate,e=d.view.scale,f=b.x/e-c.x,h=b.y/e-c.y;mxEvent.isAltDown(a)&&(h=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files, -f,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,f,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var m=null,c=b.getElementsByTagName("img"); -null!=c&&1==c.length?(k=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(k=b[0].getAttribute("href")));var n=!0,l=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(k,f,h,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;l()},mxEvent.isControlDown(a)):l()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this, -function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,null,"",f,h,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(g,f,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"), -f,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle= -mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged", -mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor); -mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(), -mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus(); -document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent), -f=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(v){}try{var c=b.getElementsByTagName("span"),l=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(f=!0,e=l)}catch(v){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&& -(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b), -b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(), -"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types, -"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this, -function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body; -var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=b+"px";g.style.left=c+"px";g.style.width=Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container? -this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c= -0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(), -200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);null!=e&&".vssx"==e.toLowerCase().substring(e.length-5)&&(e=e.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b);else this.handleError({message:mxResources.get(413==a.status? -"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml, -this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile= -function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()? -this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]), -this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])), -c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&& -(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(), -this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct(): -this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified? -null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function h(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a= -decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(I){}return a}if(f.source==(window.opener||window.parent)){var g=f.data;if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(E){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"== -g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){l=null;l="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound", -[g.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}), -"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(E){k.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var l=1==g.enableRecent,p=1==g.enableSearch,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml, -name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,p?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container, -620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,g.errorMsg);else{if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"== -g.action){var m=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var n=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0); -this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(n);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(n))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q= -this.createTemporaryGraph(q.getStylesheet()),x=q.getGlobalVariable,z=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+ -"&base64=1&xml="+encodeURIComponent(encodeURIComponent(n)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);m=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),m.xml=mxUtils.getXml(l),m.data=this.getFileData(null,null, -!0,null,null,null,l),m.format=g.format;else if("html"==g.format)n=this.editor.getGraphXml(),m.data=this.getHtml(n,this.editor.graph),m.xml=mxUtils.getXml(n),m.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);m.xml=this.getFileData(!0);m.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1), -"xmlsvg"==g.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(m),"*")}));return}l="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0), -this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));m.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(m),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight= -"12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage", -data:JSON.stringify(g)}),"*");return}}}g=h(g);c=!0;try{a(g,f)}catch(E){this.handleError(E)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var L=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=L();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=L();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d, -"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged", -b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme? -"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"), -mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight= -"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}), -null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,k="auto",l="auto",p=40,q=40,r=0,y=this.editor.graph;y.getGraphBounds();for(var w=function(){y.setSelectionCells(T);y.scrollCellToVisible(y.getSelectionCell())},F=y.getFreeInsertPoint(),B=F.x,G=F.y,F=G,C=null,H="auto",z=[],L=null,E=null,I=0;I<b.length&& -"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var R=mxUtils.trim(a.substring(1,Y)),P=mxUtils.trim(a.substring(Y+1));"label"==R?C=y.sanitizeHtml(P):"style"==R?e=P:"identity"==R&&0<P.length&&"-"!=P?g=P:"width"==R?k=P:"height"==R?l=P:"ignore"==R?E=P.split(","):"connect"==R?z.push(JSON.parse(P)):"link"==R?L=P:"padding"==R?r=parseFloat(P): -"edgespacing"==R?p=parseFloat(P):"nodespacing"==R?q=parseFloat(P):"layout"==R&&(H=P)}}}var K=this.editor.csvToArray(b[I]);a=null;if(null!=g)for(var J=0;J<K.length;J++)if(g==K[J]){a=J;break}null==C&&(C="%"+K[0]+"%");if(null!=z)for(var M=0;M<z.length;M++)null==d[z[M].to]&&(d[z[M].to]={});y.model.beginUpdate();try{for(J=I+1;J<b.length;J++){var S=this.editor.csvToArray(b[J]);if(S.length==K.length){var D=null,W=null!=a?S[a]:null;null!=W&&(D=y.model.getCell(W));null==D&&(D=new mxCell(C,new mxGeometry(B, -F,0,0),e||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=W);for(var Q=0;Q<S.length;Q++)y.setAttributeForCell(D,K[Q],S[Q]);y.setAttributeForCell(D,"placeholders","1");D.style=y.replacePlaceholders(D,D.style);for(M=0;M<z.length;M++)d[z[M].to][D.getAttribute(z[M].to)]=D;null!=L&&"link"!=L&&(y.setLinkForCell(D,D.getAttribute(L)),y.setAttributeForCell(D,L,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[D]));var X=this.editor.graph.getPreferredSizeForCell(D);D.geometry.width="auto"==k?X.width+ -r:parseFloat(k);D.geometry.height="auto"==l?X.height+r:parseFloat(l);F+=D.geometry.height+q;c.push(y.addCell(D))}}for(var U=c.slice(),T=c.slice(),M=0;M<z.length;M++)for(var O=z[M],J=0;J<c.length;J++){var D=c[J],ca=D.getAttribute(O.from);if(null!=ca){y.setAttributeForCell(D,O.from,null);for(var V=ca.split(","),Q=0;Q<V.length;Q++){var Z=d[O.to][V[Q]];null!=Z&&(C=O.label,null!=O.fromlabel&&(C=(D.getAttribute(O.fromlabel)||"")+(C||"")),null!=O.tolabel&&(C=(C||"")+(Z.getAttribute(O.tolabel)||"")),T.push(y.insertEdge(null, -null,C||"",O.invert?Z:D,O.invert?D:Z,O.style||y.createCurrentEdgeStyle())),mxUtils.remove(O.invert?D:Z,U))}}}if(null!=E)for(J=0;J<c.length;J++)for(D=c[J],Q=0;Q<E.length;Q++)y.setAttributeForCell(D,mxUtils.trim(E[Q]),null);var aa=new mxParallelEdgeLayout(y);aa.spacing=p;var ia=function(){aa.execute(y.getDefaultParent());for(var a=0;a<c.length;a++){var b=y.getCellGeometry(c[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==k&&(b.width=Math.round(y.snap(b.width)));"auto"==l&&(b.height= -Math.round(y.snap(b.height)))}};if("circle"==H){var da=new mxCircleLayout(y);da.resetEdges=!1;var ma=da.isVertexIgnored;da.isVertexIgnored=function(a){return ma.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(y.getDefaultParent());ia()},!0,w);w=null}else if("horizontaltree"==H||"verticaltree"==H||"auto"==H&&T.length==2*c.length-1&&1==U.length){y.view.validate();var fa=new mxCompactTreeLayout(y,"horizontaltree"==H);fa.levelDistance=q;fa.edgeRouting=!1;fa.resetEdges= -!1;this.executeLayout(function(){fa.execute(y.getDefaultParent(),0<U.length?U[0]:null)},!0,w);w=null}else if("horizontalflow"==H||"verticalflow"==H||"auto"==H&&1==U.length){y.view.validate();var ja=new mxHierarchicalLayout(y,"horizontalflow"==H?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=q;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(y.getDefaultParent(),T);y.moveCells(T,B,G)},!0,w);w=null}else if("organic"==H||"auto"==H&&T.length>c.length){y.view.validate(); -var ba=new mxFastOrganicLayout(y);ba.forceConstant=3*q;ba.resetEdges=!1;var qa=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return qa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(y);aa.spacing=p;this.executeLayout(function(){ba.execute(y.getDefaultParent());ia()},!0,w);w=null}this.hideDialog()}finally{y.model.endUpdate()}null!=w&&w()}}catch(na){this.handleError(na)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&& -null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&& -(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a= -this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2* -a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a, -8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat= -e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var h=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=h.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient|| -c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled(); -this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(d);this.menus.get("newLibrary").setEnabled(d);this.menus.get("extras").setEnabled(d); -a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!= -this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding= -"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b= -'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+ -IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){}; -EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b); -this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b); -this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("rename").setEnabled(null!=d&&d.isRenamable());this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted()); -a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var r=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);r.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,g){var c=a.editor.graph;if("xml"== -d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,g)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),l=Math.floor(h.width*k/c.view.scale),p=Math.floor(h.height*k/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+ -encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")}; +mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,m,h,k){a=new ErrorDialog(this,a,b,c,e,m,h,k);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this, +null,a,mxResources.get("ok"),b);this.showDialog(d.container,340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,m){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,m)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= +function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d}; +EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS}; +EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,m){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height= +"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var d=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof d.download;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(u){}}else this.createEchoRequest(a, +b,c,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,m,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=m?"&format="+m:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,f=Math.ceil(c/1024),e=Array(f),k=0;k<f;++k){for(var l=1024*k,p=Math.min(l+1024,c),r=Array(p-l),q=0;l<p;++q,++l)r[q]= +d[l].charCodeAt(0);e[k]=new Uint8Array(r)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,m,h,k){h=null!=h?h:!1;k=null!=k?k:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a, +!1)),f.document.close())}else this.openInNewWindow(a,c,e);else b==App.MODE_DEVICE?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(x){this.handleError(x)}}))}catch(A){this.handleError(A)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,k,null,null,4<m?3:4,a,c,e);this.showDialog(b.container,380,m==(mxClient.IS_IOS?0:1)?160:4<m?390:270,!0,!0);b.init()}; +EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a, +!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var d=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div"); +var c=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left= +c.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=c.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height= +"auto";this.exportDialog.style.padding="10px";var d=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",d);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(d.substring(d.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null, +this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,m){this.isLocalFileSave()?this.saveLocalFile(c,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,m,b,d)}),c, +m,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,m,h,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e, +a,h,!0,d,c)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,d,c)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"), +!1,!1,k,null,null,4<d?3:4,e,h,m);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,m,h){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,m,h,k,l,p){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background; +d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,k,l,null,c);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,p));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d, +this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null== +this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,n,this.thumbImageCache)):n(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,m,h){h=null!=h?h:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");h&&(a.appendChild(d),mxUtils.write(a,b),m||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a, +b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));f.appendChild(c);c=document.createElement("option"); +c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");f.appendChild(c);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b|| +b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+ +Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));c.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));c.appendChild(f);f=document.createElement("option"); +f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));c.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(f));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;d()});mxEvent.consume(a)}));d();k.style.padding= +mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,m,h,k,l){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+ +a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=m&&0<m.length&&f.push("edit="+encodeURIComponent(m)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?c="#U"+encodeURIComponent(k):(d=this.getCurrentFile(),l||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c? +this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a, +b,c,e,m,h,k,l,p,r,q){this.getBasenames();var d={};""!=m&&m!=mxConstants.NONE&&(d.highlight=m);"auto"!==e&&(d.target=e);p||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];k&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);l&&c.push("layers");0<c.length&&(p&&c.push("lightbox"),d.toolbar=c.join(" "));null!=r&&0<r.length&&(d.edit=r);null!= +a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+ +'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;"; +n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","type-embedhtmldialog");f=n.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var r=this.getCurrentFile();null==c&&null!=r&&r.constructor==window.DriveFile&&(k= +document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(r.getId())})));f.setAttribute("checked","checked");null==c&&n.setAttribute("disabled","disabled");d.appendChild(g);var l=this.addLinkSection(d),p=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d, +":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";d.appendChild(q);var t=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(d,mxResources.get("allPages"),g,!g),G=this.addCheckbox(d,mxResources.get("layers"),!0),C=this.addCheckbox(d,mxResources.get("lightbox"),!0),H=this.addEditButton(d,C),y=H.getEditInput(); +y.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled");y.checked&&C.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(n.checked?c:null,p.checked,q.value,l.getTarget(),l.getColor(),t.checked,B.checked,G.checked,C.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()}; +EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,m,h){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384", +n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));n.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));k.style.marginTop="12px";k.className="geBtn";n.appendChild(k);d.appendChild(n);k=document.createElement("a"); +k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));n.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok")); +this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,p=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",d.appendChild(l),mxUtils.write(d,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px", +p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",d.appendChild(p),mxUtils.br(d);var q=this.addLinkSection(d,h);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==g||g.constructor!=window.DriveFile||b)t=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,G),H=C.getEditInput(),y=this.addCheckbox(d,mxResources.get("layers"),!0);y.style.marginLeft=H.style.marginLeft;y.style.marginBottom="16px"; +y.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(y.removeAttribute("disabled"),H.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&G.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){m(q.getTarget(),q.getColor(),null==t?!0:t.checked,G.checked,C.getLink(),y.checked,null!=l?l.value:null,null!= +p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; +d.appendChild(f);var g=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,k,h,l,p){l=null!=l?l:!0;var d=document.createElement("div");d.style.whiteSpace= +"nowrap";var f=this.editor.graph,g="jpeg"==p?170:280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";d.appendChild(m);mxUtils.write(d,mxResources.get("borderWidth")+ +":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";d.appendChild(u);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=p),w=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight= +"8px";t.style.marginLeft="24px";t.setAttribute("disabled","disabled");t.setAttribute("type","checkbox");h&&(d.appendChild(t),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(w,"change",function(){w.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(t.setAttribute("checked","checked"),t.defaultChecked=!0);var H=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),y=document.createElement("input");y.style.marginTop= +"16px";y.style.marginRight="8px";y.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||y.setAttribute("disabled","disabled");b&&(d.appendChild(y),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=26);var L=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=p),E=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(d,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=p);I.style.marginLeft="24px";I.style.marginBottom="16px";E||(I.style.visibility= +"hidden");mxEvent.addListener(L,"change",function(){L.checked&&E?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});l&&E||I.setAttribute("disabled","disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=m.value;k(m.value,q.checked,!w.checked,H.checked,L.checked,y.checked,u.value,t.checked,!I.checked)}),null,c,e);this.showDialog(a.container,320,g,!0,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(g)}var n=this.addCheckbox(d,mxResources.get("fit"),!0),m=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e, +!e),l=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),q=this.addEditButton(d,p),t=q.getEditInput(),B=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(d,mxResources.get("layers"),B,!B);G.style.marginLeft=t.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(B&&G.removeAttribute("disabled"),t.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled")); +t.checked&&p.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(n.checked,m.checked,l.checked,p.checked,q.getLink(),G.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,k,h,l,p){function d(d){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+d+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,mxUtils.bind(this,function(a){p({message:mxResources.get("unknownError")})}), +null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";c&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+n.getText()):p({message:mxResources.get("unknownError")})}))}else p({message:mxResources.get("drawingTooLarge")})}; +EditorUi.prototype.createEmbedSvg=function(a,b,c,e,k,h,l){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var m=" ",p="";e&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=p&&d.setAttribute("style",p),l(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+ +" "+mxResources.get("months");d=Math.floor(a/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(a/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(a/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==a.nodeName){var c=a.getElementsByTagName("diagram");if(0< +c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(h){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph, +e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container); +d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(r){null!=b&&b(r)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg= +function(a,b,c,e,k,h,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,e,k,h,l,p,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,c,p):null,q)}catch(x){"Invalid image"==x.message?this.downloadFile(q):this.handleError(x)}}),null, +this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,h,l)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},h=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],g=1;g<b.length;g++){var h= +b[g].indexOf(")");f.push('url("');f.push(e[d(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),p=null,r=b[k].indexOf("format(",l);0<r&&(p=d(b[k].substring(r+7,b[k].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))d= +"application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))d="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){e[a]=d;c--;h()}),mxUtils.bind(this, +function(a){c--;h()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[k].substring(0,l)),p)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,h,p,l,q,r,t,x,z,F){h=null!=h?h:!0;x=null!=x?x:this.editor.graph;z=null!=z?z:0;var d=q?null:x.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==q&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(d,null,null,F,null,null!=p?p:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this, +function(){try{var f=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*z;m=Math.ceil(l*m)+2*z;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");null!=d&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=d,n.fill());n.scale(l,l);n.drawImage(e,z/l,z/l);a(f)}catch(Y){null!=k&&k(Y)}});e.onerror=function(a){null!=k&&k(a)};try{r&&this.editor.graph.addSvgShadow(c); +var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(x,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(y){null!=k&&k(y)}}),c,t)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert, +c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:e&&d.substring(0,a.baseUrl.length)!=a.baseUrl?d=PROXY_URL+"?url="+encodeURIComponent(d):"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments))}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var h=a.getElementsByTagName(c), +k=0;k<h.length;k++)mxUtils.bind(this,function(c){var h=e.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var k=f[h];null==k?(d++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,k)}else null!=h&&c.setAttribute(g,h)})(h[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,k,h){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k= +null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!= +c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){k&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0, +23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,c=this;d.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}}; +d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),m=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var n=m.getElementsByTagName("diagram");if(1==n.length)m=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){f.model.beginUpdate(); +try{for(a=0;a<n.length;a++){var l=this.updatePageRoot(new DiagramPage(n[a])),p=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,l,l,p))}}finally{f.model.endUpdate()}}}null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,b,c,e))}}catch(z){throw k||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}return d};EditorUi.prototype.importVisio=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)}); +var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)try{this.doImportVisio(a,b,c)}catch(m){c(m)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"===typeof VsdxExport|| +this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,k){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,k)}catch(w){this.handleError(w)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js", +d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.insertLucidChart=function(a,b,c,e,k){k=JSON.parse(a);a=[];if(null!=k.state){k=JSON.parse(k.state);for(var d in k.Pages)a.push(k.Pages[d]);a.sort(function(a,d){return a.Properties.Order<d.Properties.Order?-1:a.Properties.Order>d.Properties.Order?1:0})}else a.push(k);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(), +this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,e,k,h,l){h=null!=h?h:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText, +b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,c,h,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+ +1)),g=this.importXml(f,b,c,h,!0),0<g.length)return g}catch(A){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/ +e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells", +[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,h);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,h);else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[k])),k.value= +a,d.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(k.value)&&d.setLinkForCell(k,k.value),k.geometry.width+=d.gridSize,k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d=-1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+ +" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,e,k,h,l,p,q,r,t){r=null!=r?r:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var d=null;null!=a&&"<mxlibrary"==a.substring(0, +10)?this.loadLibrary(new LocalLibrary(this,a,l)):d=this.importXml(a,c,e,r);null!=p&&p(d)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=t?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,r),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),r&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,r);null!=p&&p(a)})):null!=q&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l))?(d=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&& +299>=a.status?g(a.responseText):null!=p&&p(null))}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,r));d||null==p||p(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,e,h,k;d<c;){e=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}h=a.charCodeAt(d++);if(d==c){b+= +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}k=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h& +15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,k,h,l,p,q,r,t,x){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;r=null!=r?r:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=t||this.resampleThreshold,m=0;m<a.length;m++)if("image/"==a[m].type.substring(0,6)&&a[m].size>n){g=!0;break}var u=mxUtils.bind(this,function(){var g=this.editor.graph, +n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,g,h,k,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,e,f,g,h,k,n,d,x)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var m=a.length,q=m,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=p)p(u);else{var d=[];g.getModel().beginUpdate(); +try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}h(d)}}),v=0;v<m;v++)mxUtils.bind(this,function(d){var h=a[d],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==l||l(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var m=a.target.result,p=m.indexOf(","),q=decodeURIComponent(escape(atob(m.substring(p+1)))),y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=x?null:q.getAttribute("content"); +null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?w(d,mxUtils.bind(this,function(){try{if(m.substring(0,p+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")),r=parseFloat(f.getAttribute("height")),q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox", +"0 0 "+l+" "+r);else if(isNaN(l)||isNaN(r)){var u=q.split(" ");3<u.length&&(l=parseFloat(u[2]),r=parseFloat(u[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var t=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,r)),w=k(m,h.type,b+d*n,c+d*n,Math.max(1,Math.round(l*t)),Math.max(1,Math.round(r*t)),h.name);if(isNaN(l)||isNaN(r)){var E=new Image;E.onload=mxUtils.bind(this,function(){l=Math.max(1,E.width);r=Math.max(1,E.height);w[0].geometry.width=l;w[0].geometry.height=r;f.setAttribute("viewBox","0 0 "+ +l+" "+r);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[w[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(ba){}return null})):w(d,mxUtils.bind(this,function(){return k(u,"text/xml",b+d*n,c+d*n,0,0,h.name)}))}}else{q=!1;if("image/png"==h.type){var E=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var v=new Image;v.src=a.target.result;w(d,mxUtils.bind(this, +function(){return k(E,"text/xml",b+d*n,c+d*n,v.width,v.height,h.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,l){w(d,mxUtils.bind(this, +function(){if(null!=g&&g.length<r){var p=f&&this.isResampleImage(a.target.result,t)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+d*n,c+d*n,Math.round(m*p),Math.round(l*p),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+d*n,c+d*n,240,160,h.name,function(a){w(d,function(){return a})})});/(\.vsdx)($|\?)/i.test(h.name)|| +/(\.vssx)($|\?)/i.test(h.name)?k(null,h.type,b+d*n,c+d*n,240,160,h.name,function(a){w(d,function(){return a})},h):"image"==h.type.substring(0,5)?m.readAsDataURL(h):m.readAsText(h)})(v)});g?this.confirmImageResize(function(a){f=a;u()},q):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c? +e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,c)};EditorUi.prototype.parseFile=function(a,b, +c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,h){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,h))try{var g=Math.max(d/k,f/k);if(1<g){var n=Math.round(d/ +g),m=Math.round(f/g),l=document.createElement("canvas");l.width=n;l.height=m;l.getContext("2d").drawImage(a,0,0,n,m);var p=l.toDataURL();if(p.length<b.length){var q=document.createElement("canvas");q.width=n;q.height=m;var t=q.toDataURL();p!==t&&(b=p,d=n,f=m)}}}catch(G){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,k=0;8>k;k++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^ +b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,k){function d(a,b){var d=n;n+=b;return a.substring(d,n)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a, +4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,n);do{var m=f(a);if("IDAT"==d(a,4)){k=a.substring(0,n-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);k+=g(c.length)+b+c+g(e^4294967295);k+=a.substring(n-8,a.length);break}k+=a.substring(n-8,n-4+m);d(a,m);d(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b= +null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(m){}null!= +b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph, +e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var d=0;d<b.pages.length;d++)if(b.pages[d]==b.currentPage){0<d&&(a+=(0<a.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var k=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null== +d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};k.call(this,b,d,e)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"== +a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var p=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=g?g.getName():mxResources.get("pageNotFound"))}g=p.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var q=c.labelLinkClicked;c.labelLinkClicked= +function(b,d,e){var f=d.getAttribute("href");null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?q.apply(this,arguments):(c.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r= +function(){window.setTimeout(function(){A.innerHTML=" ";A.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste", +mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var d=a.clipboardData||a.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,d,c,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()}); +else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(K){}}),!1);var A=document.createElement("div");A.style.position="absolute";A.style.whiteSpace="nowrap";A.style.overflow="hidden";A.style.display="block";A.contentEditable=!0;mxUtils.setOpacity(A,0);A.style.width="1px";A.style.height="1px";A.innerHTML=" ";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86, +null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||x||(A.style.left=c.container.scrollLeft+10+"px",A.style.top=c.container.scrollTop+10+"px",c.container.appendChild(A),x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){A.focus();document.execCommand("selectAll", +!1,null)},0):(A.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=b&&17!=b&&91!=b||(x=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),A.parentNode.removeChild(A))}),0)}));mxEvent.addListener(A,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(A),r())}));mxEvent.addListener(A,"cut",mxUtils.bind(this, +function(a){c.isEnabled()&&(this.copyCells(A,!0),r())}));mxEvent.addListener(A,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(A.innerHTML=" ",A.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,A);A.innerHTML=" "}),0))}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==A?!0:z.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight|| +0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation(); +a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=a.dataTransfer.getData("text/uri-list"); +/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types, +"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){t=document.createElement("div");t.style.position="absolute";t.style.top="95px";t.style.left="250px";t.style.width="2000px";t.style.height="30px";t.style.background="whiteSmoke";document.body.appendChild(t);var F=document.createElement("div");F.style.position="absolute";F.style.top="125px";F.style.left="220px"; +F.style.width="30px";F.style.height="1000px";F.style.background="whiteSmoke";document.body.appendChild(F);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,F,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.test){t=document.getElementById("geFooter");null!=t&&(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)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, +mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&& +(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container, +"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")? +a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var n=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&& +(k=b[0].getAttribute("href")));var m=!0,l=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;l()},mxEvent.isControlDown(a)):l()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null, +null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()}; +EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged", +mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat= +mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave); +mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph; +if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var d=b.getElementsByTagName("span");if(null!=d&&0<d.length&&"application/vnd.lucid.chart.objects"=== +d[0].getAttribute("data-lucid-type")){var c=d[0].getAttribute("data-lucid-content");null!=c&&0<c.length&&(this.importLucidChart(c,0,0),mxEvent.consume(a))}else{var c=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(v){}try{var d=b.getElementsByTagName("span"),l=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e); +this.isCompatibleString(l)&&(f=!0,e=l)}catch(v){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,d,d)):(f=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,f.x+d,f.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&& +this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&& +12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0); +else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))): +0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash= +"#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var h=document.documentElement;c=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth, +e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=d+"px";h.style.width=Math.max(0,c-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a); +var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){var c=d.target.result,e=a.name;if(null!= +e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a, +e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})); +else if('{"state":"{\\"Properties\\":'==c.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(c,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==d.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this, +d.target.result,a.name))}catch(r){this.handleError(r,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,e,b)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?d.readAsDataURL(a):d.readAsText(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(), +e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"), +null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root, +a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW]))); +for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")}; +EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()): +(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))}; +EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,h=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))): +this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(I){}return a}if(f.source== +(window.opener||window.parent)){var h=f.data;if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(E){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var l=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey): +null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==h.action){l=null;l="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):g(h.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft", +result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()})); +try{l.init()}catch(E){k.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();var l=1==h.enableRecent,p=1==h.enableSearch,l=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=h.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null, +null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,p?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"== +h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var n=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body, +n):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var m=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(m); +k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(m))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),w=q.getGlobalVariable,y=this.pages[0];q.getGlobalVariable=function(a){return"page"== +a?y.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(y.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(m)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()? +t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);n=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),n.xml=mxUtils.getXml(l),n.data=this.getFileData(null,null,!0,null,null,null,l),n.format=h.format;else if("html"==h.format)m=this.editor.getGraphXml(),n.data=this.getHtml(m,this.editor.graph), +n.xml=mxUtils.getXml(m),n.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);n.xml=this.getFileData(!0);n.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0); +this.spinner.stop();n.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(n),"*")}));return}l="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));n.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(n), +"*")}return}if("load"==h.action)c=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop= +"6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}h=g(h);d=!0;try{a(h,f)}catch(E){this.handleError(E)}d=!1;null!=urlParams.modified&& +this.editor.setStatus("");var L=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=L();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=L();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged", +b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}})); +var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title", +mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding= +"4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b); +this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv= +function(a){try{var b=a.split("\n"),d=[];if(0<b.length){var c={},e=null,h=null,k="auto",l="auto",p=40,q=40,t=0,x=this.editor.graph;x.getGraphBounds();for(var z=function(){x.setSelectionCells(T);x.scrollCellToVisible(x.getSelectionCell())},F=x.getFreeInsertPoint(),B=F.x,G=F.y,F=G,C=null,H="auto",y=[],L=null,E=null,I=0;I<b.length&&"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!= +a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var R=mxUtils.trim(a.substring(1,Y)),P=mxUtils.trim(a.substring(Y+1));"label"==R?C=x.sanitizeHtml(P):"style"==R?e=P:"identity"==R&&0<P.length&&"-"!=P?h=P:"width"==R?k=P:"height"==R?l=P:"ignore"==R?E=P.split(","):"connect"==R?y.push(JSON.parse(P)):"link"==R?L=P:"padding"==R?t=parseFloat(P):"edgespacing"==R?p=parseFloat(P):"nodespacing"==R?q=parseFloat(P):"layout"==R&&(H=P)}}}var K=this.editor.csvToArray(b[I]);a=null;if(null!=h)for(var J=0;J<K.length;J++)if(h== +K[J]){a=J;break}null==C&&(C="%"+K[0]+"%");if(null!=y)for(var M=0;M<y.length;M++)null==c[y[M].to]&&(c[y[M].to]={});x.model.beginUpdate();try{for(J=I+1;J<b.length;J++){var S=this.editor.csvToArray(b[J]);if(S.length==K.length){var D=null,W=null!=a?S[a]:null;null!=W&&(D=x.model.getCell(W));null==D&&(D=new mxCell(C,new mxGeometry(B,F,0,0),e||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=W);for(var Q=0;Q<S.length;Q++)x.setAttributeForCell(D,K[Q],S[Q]);x.setAttributeForCell(D,"placeholders","1");D.style=x.replacePlaceholders(D, +D.style);for(M=0;M<y.length;M++)c[y[M].to][D.getAttribute(y[M].to)]=D;null!=L&&"link"!=L&&(x.setLinkForCell(D,D.getAttribute(L)),x.setAttributeForCell(D,L,null));x.fireEvent(new mxEventObject("cellsInserted","cells",[D]));var X=this.editor.graph.getPreferredSizeForCell(D);D.geometry.width="auto"==k?X.width+t:parseFloat(k);D.geometry.height="auto"==l?X.height+t:parseFloat(l);F+=D.geometry.height+q;d.push(x.addCell(D))}}for(var U=d.slice(),T=d.slice(),M=0;M<y.length;M++)for(var O=y[M],J=0;J<d.length;J++){var D= +d[J],ca=D.getAttribute(O.from);if(null!=ca){x.setAttributeForCell(D,O.from,null);for(var V=ca.split(","),Q=0;Q<V.length;Q++){var Z=c[O.to][V[Q]];null!=Z&&(C=O.label,null!=O.fromlabel&&(C=(D.getAttribute(O.fromlabel)||"")+(C||"")),null!=O.tolabel&&(C=(C||"")+(Z.getAttribute(O.tolabel)||"")),T.push(x.insertEdge(null,null,C||"",O.invert?Z:D,O.invert?D:Z,O.style||x.createCurrentEdgeStyle())),mxUtils.remove(O.invert?D:Z,U))}}}if(null!=E)for(J=0;J<d.length;J++)for(D=d[J],Q=0;Q<E.length;Q++)x.setAttributeForCell(D, +mxUtils.trim(E[Q]),null);var aa=new mxParallelEdgeLayout(x);aa.spacing=p;var ia=function(){aa.execute(x.getDefaultParent());for(var a=0;a<d.length;a++){var b=x.getCellGeometry(d[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==k&&(b.width=Math.round(x.snap(b.width)));"auto"==l&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==H){var da=new mxCircleLayout(x);da.resetEdges=!1;var ma=da.isVertexIgnored;da.isVertexIgnored=function(a){return ma.apply(this,arguments)||0>mxUtils.indexOf(d, +a)};this.executeLayout(function(){da.execute(x.getDefaultParent());ia()},!0,z);z=null}else if("horizontaltree"==H||"verticaltree"==H||"auto"==H&&T.length==2*d.length-1&&1==U.length){x.view.validate();var fa=new mxCompactTreeLayout(x,"horizontaltree"==H);fa.levelDistance=q;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(x.getDefaultParent(),0<U.length?U[0]:null)},!0,z);z=null}else if("horizontalflow"==H||"verticalflow"==H||"auto"==H&&1==U.length){x.view.validate();var ja= +new mxHierarchicalLayout(x,"horizontalflow"==H?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=q;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(x.getDefaultParent(),T);x.moveCells(T,B,G)},!0,z);z=null}else if("organic"==H||"auto"==H&&T.length>d.length){x.view.validate();var ba=new mxFastOrganicLayout(x);ba.forceConstant=3*q;ba.resetEdges=!1;var qa=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return qa.apply(this,arguments)||0>mxUtils.indexOf(d,a)}; +aa=new mxParallelEdgeLayout(x);aa.spacing=p;this.executeLayout(function(){ba.execute(x.getDefaultParent());ia()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(na){this.handleError(na)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}else b=window.location.search;return b}; +EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container, +440,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/ +b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c= +this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ +a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&& +null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var d=0;null==this.drive&&"function"!==typeof window.DriveClient||d++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;b||null==this.gitHub||d++;b||null==this.trello&&"function"!==typeof window.TrelloClient|| +d++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&d++;mxClient.IS_IOS||d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c); +this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").setEnabled(c);a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b); +this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div"); +this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this, +function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b='<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b= +'<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e, +"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates= +function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&& +!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!= +c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog), +this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,h){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),l=Math.floor(g.width*k/d.view.scale), +p=Math.floor(g.height*k/d.view.scale);f.length<=MAX_REQUEST_SIZE&&l*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+p+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")}; DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))} -SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,d=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState); -b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,b,e,d){SelectPage.call(this,a,e);this.relatedPage=b;this.index=d;this.previousIndex=null} +SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,c=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,c);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState); +b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,b,e,c){SelectPage.call(this,a,e);this.relatedPage=b;this.index=c;this.previousIndex=null} mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)}; EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null}; -EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=this.tabContainer.style.height;this.tabContainer.style.height= -null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,d=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft= -a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),d=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===typeof Editor.MathJaxClear|| -this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}; -Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),d=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"== -a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=d&&null!=k?new mxRectangle(0,0,parseFloat(d),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"), +EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var c=this.tabContainer.style.height;this.tabContainer.style.height= +null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,c=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft= +a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===typeof Editor.MathJaxClear|| +this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}; +Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"== +a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=k?new mxRectangle(0,0,parseFloat(c),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"), selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}}; Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(), arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}}; @@ -2980,131 +2980,131 @@ Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteX a.pageFormat,this.view.scale=a.scale,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultParent,this.connectionArrowsEnabled=a.arrows,this.setTooltips(a.tooltips),this.setConnectable(a.connect),this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=a.translate&&(this.view.translate=a.translate)):(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize= mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.background=this.defaultGraphBackground,this.backgroundImage=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize= this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var b=this.editor.extractGraphModel(a.node);if(null!=b){a.graphModelNode=b;a.viewState=this.editor.graph.createViewState(b);var e=new mxCodec(b.ownerDocument);a.root=e.decode(b).root}else a.root=this.editor.graph.model.createRoot()}return a}; -EditorUi.prototype.selectPage=function(a,b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var d=new SelectPage(this,a);d.execute();e.add(d);e.notify();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))}; +EditorUi.prototype.selectPage=function(a,b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var c=new SelectPage(this,a);c.execute();e.add(c);e.notify();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))}; EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a}; EditorUi.prototype.createPage=function(a){var b=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));b.setName(null!=a?a:this.createPageName());return b};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e}; -EditorUi.prototype.removePage=function(a){var b=this.editor.graph;if(b.isEnabled()){b.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var d=mxUtils.indexOf(this.pages,a);d==this.pages.length-1?d--:d++;e=this.pages[d]}else e=this.insertPage(),b.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));b.model.execute(new ChangePage(this,a,e))}finally{b.model.endUpdate()}}return a}; -EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,d=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),d=a.node.cloneNode(!1),d.removeAttribute("id"),d=new DiagramPage(d),d.root=e.cloneCells([e.model.root])[0],d.viewState=e.getViewState(),d.viewState.scale=1,d.viewState.scrollLeft=null,d.viewState.scrollRight=null,d.setName(b),d=this.insertPage(d,mxUtils.indexOf(this.pages,a)+1));return d}; +EditorUi.prototype.removePage=function(a){var b=this.editor.graph;if(b.isEnabled()){b.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var c=mxUtils.indexOf(this.pages,a);c==this.pages.length-1?c--:c++;e=this.pages[c]}else e=this.insertPage(),b.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));b.model.execute(new ChangePage(this,a,e))}finally{b.model.endUpdate()}}return a}; +EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,c=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),c=a.node.cloneNode(!1),c.removeAttribute("id"),c=new DiagramPage(c),c.root=e.cloneCells([e.model.root])[0],c.viewState=e.getViewState(),c.viewState.scale=1,c.viewState.scrollLeft=null,c.viewState.scrollRight=null,c.setName(b),c=this.insertPage(c,mxUtils.indexOf(this.pages,a)+1));return c}; EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))}; EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a}; -EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- -e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d, -"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b); -d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4," ❮ ");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var q=this.createControlTab(4, -" ❯");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var r=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=r+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,r-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p, -0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,r-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; +EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- +e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",c.style.fontWeight="bold",c.style.borderTopStyle="none"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=d):mxEvent.consume(b)}));mxEvent.addListener(c, +"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=k&&d!=k&&this.movePage(k,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(l,this.createTabForPage(this.pages[l],c,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b); +c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4," ❮ ");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var q=this.createControlTab(4, +" ❯");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=t+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p, +0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor; b.style.cursor="default";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b}; EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e}; -EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this, -function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"), -null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(d,k,null,a);this.setCurrentMenu(b); +EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=0;c<this.pages.length;c++)mxUtils.bind(this, +function(d){var c=a.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),b);this.pages[d]==this.currentPage&&a.addCheckmark(c,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"), +null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var c=mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(c,k,null,a);this.setCurrentMenu(b); mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a}; -EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var d=a.getName();e.setAttribute("title",d);mxUtils.write(e,d);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e}; -EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),r=mxEvent.getClientY(l);p.popup(q,r,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))}; -EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a, -mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};mxCodecRegistry.register(a)})(); -(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,d){d.setAttribute("page",e.page.getId());return d};a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.page=a.ui.getPageById(e.getAttribute("page"));d.previous=d.name;return d};mxCodecRegistry.register(a)})(); -(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,d){d.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(d.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,d));return d};a.beforeDecode=function(a,e,d){d.ui=a.ui;d.relatedPage=d.ui.getPageById(e.getAttribute("relatedPage"));if(null==d.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",e.getAttribute("relatedPage")); -b.setAttribute("name",e.getAttribute("name"));d.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(d.relatedPage.root=a.decodeCell(b,!1),d=b.nextSibling,b.parentNode.removeChild(b),b=d;null!=b;){d=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var l=b.getAttribute("id");null==a.lookup(l)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=d}}return e};a.afterDecode=function(a,e,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells; -Graph.prototype.foldCells=function(a,d,e,q,r){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],h=0;h<e.length;h++){var k=this.view.getState(e[h]),l=null!=k?k.style:this.getCellStyle(e[h]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[h],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[h]&&f.push(a);return a==e[h]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[h], -a))}for(h=0;h<f.length;h++)this.model.setVisible(f[h],!a);e=c;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType); -return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function q(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())< -a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function r(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var d=g.model.getParent(a),c=g.getIncomingEdges(a),e=g.cloneCells([c[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(c[0],!0),!0);var f=q(a),h=d.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+ -10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);g.view.currentRoot!=d&&(e[1].geometry.x-=h.x,e[1].geometry.y-=h.y);var k=g.view.getState(a),l=g.view.scale;if(null!=k){var p=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?p.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:p.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var m=g.getOutgoingEdges(g.model.getTerminal(c[0], -!0));if(null!=m){for(var n=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=h=c=0;r<m.length;r++){var t=g.model.getTerminal(m[r],!1);if(f==q(t)){var u=g.view.getState(t);t!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(p,u)&&(c=10+Math.max(c,(Math.min(p.x+p.width,u.x+u.width)-Math.max(p.x,u.x))/l),h=10+Math.max(h,(Math.min(p.y+p.height,u.y+u.height)-Math.max(p.y,u.y))/l))}}n?h=0:c=0;for(r=0;r<m.length;r++)if(t=g.model.getTerminal(m[r], -!1),f==q(t)&&(u=g.view.getState(t),t!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY()))){var z=[];g.traverse(u.cell,!0,function(a,b){null!=b&&z.push(b);z.push(a);return!0});g.moveCells(z,(b?1:-1)*c,(b?1:-1)*h)}}}return g.addCells(e,d)}finally{g.model.endUpdate()}}function c(a){g.model.beginUpdate();try{var b=q(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1); -var e=g.model.getParent(a),f=e.geometry,h=[];g.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);g.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);g.moveCells(h,k,l);return g.addCells(d,e)}finally{g.model.endUpdate()}}function f(a){g.model.beginUpdate();try{var b= -g.model.getParent(a),d=g.getIncomingEdges(a),c=g.cloneCells([d[0],a]);g.model.setTerminal(c[0],a,!0);var d=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var h=0;h<d.length;h++){var k=g.model.getTerminal(d[h],!1);null!=k&&f.push(k)}var l=g.view.getBounds(f),p=q(a),m=g.view.translate,n=g.view.scale;p==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(l.x+l.width)/n-m.x-e.x+10,c[1].geometry.y+=a.geometry.height- -e.y+40):p==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(l.x+l.width)/n-m.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height-e.y+40):(c[1].geometry.x=p==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width-e.x+40):c[1].geometry.x+(a.geometry.width-e.x+40),c[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-c[1].geometry.height)/2:(l.y+l.height)/n-m.y+-e.y+10);return g.addCells(c,b)}finally{g.model.endUpdate()}}function h(a, -b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function m(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| -c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=h(g.model.getTerminal(c[0],!0),d,a),c=g.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,x=g.getModel();mxResources.parse("selectChildren=Select Children"); -mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var u=n.menus.createPopupMenu;n.menus.createPopupMenu=function(a,c,d){u.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&& -(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(), -a=g.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=g.getOutgoingEdges(g.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);null!=a&&0<a.length&&g.setSelectionCell(g.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants", -function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),b=[];g.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});g.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=g.removeCells;g.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var h=a[f];x.isEdge(h)&&d(h)&&(e.push(h),h=x.getTerminal(h,!1));b(h)?(g.traverse(h,!0, -function(a,b){null!=b&&e.push(b);e.push(a);return!0}),h=g.getIncomingEdges(a[f]),a=a.concat(h)):e.push(a[f])}a=e;return v.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var h=g.getIncomingEdges(f.cell),f=0;f<h.length;f++)mxUtils.remove(h[f], -a)}this.model.beginUpdate();try{var k=t.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=g.getIncomingEdges(k[e]),h=g.getIncomingEdges(a[e]);if(0==l.length&&0<h.length){var p=this.cloneCells([h[0]])[0];this.addEdge(p,g.getDefaultParent(),this.model.getTerminal(h[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var A=g.moveCells;g.moveCells=function(a,c,d,e,f,h,k){var l=null;this.model.beginUpdate();try{var p=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f); -if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||g.model.isEdge(a[q])&&null==g.model.getTerminal(a[q],!0)){f=g.model.getParent(a[q]);break}if(null!=p&&f!=p&&null!=this.view.getState(a[0])){var r=g.getIncomingEdges(a[0]);if(0<r.length){var t=g.view.getState(g.model.getTerminal(r[0],!0));if(null!=t){var u=g.view.getState(p);null!=u&&(c=(u.getCenterX()-t.getCenterX())/g.view.scale,d=(u.getCenterY()-t.getCenterY())/g.view.scale)}}}}l=A.apply(this,arguments); -if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(p)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],p,!0);else if(b(a[q])&&(r=g.getIncomingEdges(a[q]),0<r.length))if(!e)b(p)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],p,!0);else if(0==g.getIncomingEdges(l[q]).length){m=p;if(null==m||m==g.model.getParent(a[q]))m=g.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e, -g.getDefaultParent(),m,l[q])}}finally{this.model.endUpdate()}return l};if(null!=n.sidebar){var y=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,h=null;f.beginUpdate();try{if(h=y.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(f.isEdge(h[k])&&null==f.getTerminal(h[k],!0)){f.setTerminal(h[k],a,!0);var l=g.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return h}}var w={88:n.actions.get("selectChildren"), -84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},F=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&b(g.getSelectionCell())&&1==g.getSelectionCount()){var d=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(g.getSelectionCell()):f(g.getSelectionCell()):13==a.which&&(d=r(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&g.model.isEdge(d[0])?g.setSelectionCell(g.model.getTerminal(d[0], -!1)):g.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=w[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(m(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(m(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(m(g.getSelectionCell(), -mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(m(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(I){console.log("error",I)}mxEvent.isConsumed(a)||F.apply(this,arguments)};var B=g.connectVertex;g.connectVertex=function(a,d,e,h,k,l){var p=g.getIncomingEdges(a);return b(a)&&0<p.length?(e=q(a),h=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):h==k?c(a):r(a,d!=mxConstants.DIRECTION_NORTH&& -d!=mxConstants.DIRECTION_WEST)):B.call(this,a,d,e,h,k,l)};g.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&g.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"), +EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var c=a.getName();e.setAttribute("title",c);mxUtils.write(e,c);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e}; +EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu(); +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!c){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),t=mxEvent.getClientY(l);p.popup(q,t,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))}; +EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,c){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a, +mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};mxCodecRegistry.register(a)})(); +(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,c){c.setAttribute("page",e.page.getId());return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.page=a.ui.getPageById(e.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})(); +(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,c){c.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(c.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,c));return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(e.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",e.getAttribute("relatedPage")); +b.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var l=b.getAttribute("id");null==a.lookup(l)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return e};a.afterDecode=function(a,e,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells; +Graph.prototype.foldCells=function(a,c,e,q,t){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[g], +a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=b?b.style:h.getCellStyle(a)).containerType); +return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function q(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())< +a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+ +10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),l=h.view.scale;if(null!=k){var p=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?p.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:p.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var m=h.getOutgoingEdges(h.model.getTerminal(d[0], +!0));if(null!=m){for(var n=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<m.length;r++){var t=h.model.getTerminal(m[r],!1);if(f==q(t)){var y=h.view.getState(t);t!=a&&null!=y&&(n&&b!=y.getCenterX()<k.getCenterX()||!n&&b!=y.getCenterY()<k.getCenterY())&&mxUtils.intersects(p,y)&&(d=10+Math.max(d,(Math.min(p.x+p.width,y.x+y.width)-Math.max(p.x,y.x))/l),g=10+Math.max(g,(Math.min(p.y+p.height,y.y+y.height)-Math.max(p.y,y.y))/l))}}n?g=0:d=0;for(r=0;r<m.length;r++)if(t=h.model.getTerminal(m[r], +!1),f==q(t)&&(y=h.view.getState(t),t!=a&&null!=y&&(n&&b!=y.getCenterX()<k.getCenterX()||!n&&b!=y.getCenterY()<k.getCenterY()))){var u=[];h.traverse(y.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});h.moveCells(u,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function d(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1); +var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);h.moveCells(g,k,l);return h.addCells(d,e)}finally{h.model.endUpdate()}}function f(a){h.model.beginUpdate();try{var b= +h.model.getParent(a),d=h.getIncomingEdges(a),c=h.cloneCells([d[0],a]);h.model.setTerminal(c[0],a,!0);var d=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<d.length;g++){var k=h.model.getTerminal(d[g],!1);null!=k&&f.push(k)}var l=h.view.getBounds(f),p=q(a),m=h.view.translate,n=h.view.scale;p==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(l.x+l.width)/n-m.x-e.x+10,c[1].geometry.y+=a.geometry.height- +e.y+40):p==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(l.x+l.width)/n-m.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height-e.y+40):(c[1].geometry.x=p==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width-e.x+40):c[1].geometry.x+(a.geometry.width-e.x+40),c[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-c[1].geometry.height)/2:(l.y+l.height)/n-m.y+-e.y+10);return h.addCells(c,b)}finally{h.model.endUpdate()}}function g(a, +b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=h.view.getState(h.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| +c==mxConstants.DIRECTION_WEST)==d&&c!=b?m.actions.get("selectParent").funct():c==b?(d=h.getOutgoingEdges(a),null!=d&&0<d.length&&h.setSelectionCell(h.model.getTerminal(d[0],!1))):(c=h.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(h.model.getTerminal(c[0],!0),d,a),c=h.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&h.setSelectionCell(d[c].cell)))))}var m=this,h=m.editor.graph,w=h.getModel();mxResources.parse("selectChildren=Select Children"); +mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var u=m.menus.createPopupMenu;m.menus.createPopupMenu=function(a,c,d){u.apply(this,arguments);if(1==h.getSelectionCount()){c=h.getSelectionCell();var e=h.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(h.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(h.getSelectionCell())&& +(a.addSeparator(),0<h.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};m.actions.addAction("selectChildren",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+X");m.actions.addAction("selectSiblings",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(), +a=h.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=h.getOutgoingEdges(h.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+S");m.actions.addAction("selectParent",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);null!=a&&0<a.length&&h.setSelectionCell(h.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");m.actions.addAction("selectDescendants", +function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=h.removeCells;h.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&c(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(h.traverse(g,!0, +function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};m.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var r=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f], +a)}this.model.beginUpdate();try{var k=r.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==l.length&&0<g.length){var p=this.cloneCells([g[0]])[0];this.addEdge(p,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var A=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var p=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f); +if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||h.model.isEdge(a[q])&&null==h.model.getTerminal(a[q],!0)){f=h.model.getParent(a[q]);break}if(null!=p&&f!=p&&null!=this.view.getState(a[0])){var r=h.getIncomingEdges(a[0]);if(0<r.length){var t=h.view.getState(h.model.getTerminal(r[0],!0));if(null!=t){var u=h.view.getState(p);null!=u&&(c=(u.getCenterX()-t.getCenterX())/h.view.scale,d=(u.getCenterY()-t.getCenterY())/h.view.scale)}}}}l=A.apply(this,arguments); +if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(p)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],p,!0);else if(b(a[q])&&(r=h.getIncomingEdges(a[q]),0<r.length))if(!e)b(p)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],p,!0);else if(0==h.getIncomingEdges(l[q]).length){m=p;if(null==m||m==h.model.getParent(a[q]))m=h.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e, +h.getDefaultParent(),m,l[q])}}finally{this.model.endUpdate()}return l};if(null!=m.sidebar){var x=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var l=h.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:m.actions.get("selectChildren"), +84:m.actions.get("selectSubtree"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},F=m.onKeyDown;m.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var c=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(c=t(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&h.model.isEdge(c[0])?h.setSelectionCell(h.model.getTerminal(c[0], +!1)):h.setSelectionCell(c[c.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(h.view.getState(h.getSelectionCell())),h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(h.getSelectionCell(), +mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(n(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(I){console.log("error",I)}mxEvent.isConsumed(a)||F.apply(this,arguments)};var B=h.connectVertex;h.connectVertex=function(a,c,e,g,k,l){var p=h.getIncomingEdges(a);return b(a)&&0<p.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?f(a):g==k?d(a):t(a,c!=mxConstants.DIRECTION_NORTH&& +c!=mxConstants.DIRECTION_WEST)):B.call(this,a,c,e,g,k,l)};h.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"), this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells); this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top= -this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container", +this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container", function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;"); -b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;"); -e.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");h.geometry.relative=!0;h.edge=!0;b.insertEdge(h,!0);e.insertEdge(h,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var g=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -x.geometry.relative=!0;x.edge=!0;b.insertEdge(x,!0);g.insertEdge(x,!1);a.insert(c);a.insert(h);a.insert(l);a.insert(x);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(g);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], +b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;"); +e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var h=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");h.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);h.insertEdge(w,!1);a.insert(d);a.insert(g);a.insert(l);a.insert(w);a.insert(b);a.insert(c);a.insert(e);a.insert(k);a.insert(h);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0, -0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var d=new mxCell("Organization", -new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");c.geometry.relative=!0;c.edge=!0; -d.insertEdge(c,!0);e.insertEdge(c,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");h.geometry.relative=!0;h.edge=!0;d.insertEdge(h,!0);f.insertEdge(h,!1);a.insert(c);a.insert(h);a.insert(d);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a], +0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization", +new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=!0;d.edge=!0; +c.insertEdge(d,!0);e.insertEdge(d,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;c.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(d);a.insert(g);a.insert(c);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a], a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;"); a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;"); -a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0, -0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],220,60,"Sub Sections")})])}}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; +a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0, +0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1; GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0; GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled= 0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b), -null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)}; -mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:k.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length); -this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var f=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});this.addListener("xmlNodeChanged", -f);f();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow}; +null!=a)){var c=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)}; +mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var k=this.graph.getGlobalVariable,c=this;this.graph.getGlobalVariable=function(a){var b=e[c.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(c.currentPage+1):"pagenumber"==a?c.currentPage+1:k.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length); +this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var f=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=d&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),d=this.xmlNode)});this.addListener("xmlNodeChanged", +f);f();urlParams.page=c.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow}; this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title", -this.graphConfig.title)});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),d())}));l.observe(k,{attributes:!0})}else d()}}; +this.graphConfig.title)});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),c())}));l.observe(k,{attributes:!0})}else c()}}; GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a}; GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))}; GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})}; -GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<b.width+this.graph.border?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},b={left:b.left- +GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var c=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<b.width+this.graph.border?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},b={left:b.left- c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),k=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||l||(l=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom|| -(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container, -d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,this.toolbarHeight),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(p);l||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph), -100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var q=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var c= -null;null!=this.graphConfig["max-height"]&&(c=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(c)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}}; +(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",c),this.graph.addListener("size",c)):new ResizeSensor(this.graph.container, +c));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,this.toolbarHeight),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=k=null,c=mxUtils.bind(this,function(){window.clearTimeout(p);l||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph), +100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",c):new ResizeSensor(this.graph.container,c))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",c);var q=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d= +null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}}; GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"}; -GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),p=0;p<l;p++)k.setVisible(k.getChildAt(k.root,p),null!=b?d.isVisible(d.getChildAt(d.root,p)):!1);if(null==d)for(p=0;p<e.length;p++)k.setVisible(k.getChildAt(k.root,parseInt(e[p])),!0)}finally{k.endUpdate()}}}; -GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var h=document.createElement("div");h.style.borderRight="1px solid #d0d0d0";h.style.padding="3px 6px 3px 6px";mxEvent.addListener(h,"click",a);null!=c&&h.setAttribute("title",c);h.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(h,"mouseenter",function(){h.style.backgroundColor="#ddd"}),mxEvent.addListener(h,"mouseleave", -function(){h.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),h.style.cursor="pointer"):mxUtils.setOpacity(h,30);h.appendChild(a);e.appendChild(h);f++;return h}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box"; -e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e, -0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove": -"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,r=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft= -q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<r&&Math.abs(this.scrollTop-q.container.scrollTop)<r&&Math.abs(this.startX-b.getGraphX())<r&&Math.abs(this.startY-b.getGraphY())<r&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var c=this.toolbarItems,f=0,h=null,m=null,n=0;n<c.length;n++){var g=c[n];if("pages"==g){m=b.ownerDocument.createElement("div"); -m.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(m,70);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");x.style.borderRightStyle="none";x.style.paddingLeft="0px";x.style.paddingRight="0px";e.appendChild(m);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ -1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";g=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,this.currentPage+1+" / "+this.diagrams.length);m.style.display=1<this.diagrams.length?"inline-block":"none";x.style.display=m.style.display;u.style.display=m.style.display});this.addListener("graphChanged",g);g()}else if("zoom"==g)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, -mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==g){if(this.layersEnabled){var v=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=h)h.parentNode.removeChild(h), -h=null;else{h=this.graph.createLayersDialog();mxEvent.addListener(h,"mouseleave",function(){h.parentNode.removeChild(h);h=null});a=t.getBoundingClientRect();h.style.width="140px";h.style.padding="2px 0px 2px 0px";h.style.border="1px solid #d0d0d0";h.style.backgroundColor="#eee";h.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";h.style.fontSize="11px";h.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(h,80);var b=mxUtils.getDocumentScrollOrigin(document);h.style.left=b.x+a.left+ -"px";h.style.top=b.y+a.bottom+"px";document.body.appendChild(h)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){t.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});t.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==g?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(g=this.graphConfig["toolbar-buttons"][g], -null!=g&&a(null==g.enabled||g.enabled?g.handler:function(){},g.image,g.title,g.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(c=b.ownerDocument.createElement("div"),c.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",c.setAttribute("title",this.graphConfig.title),mxUtils.write(c,this.graphConfig.title),mxUtils.setOpacity(c, -70),e.appendChild(c));this.minToolbarWidth=34*f;var A=b.style.border,c=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px"; -e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=h&&(h.parentNode.removeChild(h), -h=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==h)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",c)}; -GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null==d||!a.isPageLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(k=d.indexOf(","),0<k&&(k=d.substring(k+ +GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),p=0;p<l;p++)k.setVisible(k.getChildAt(k.root,p),null!=b?c.isVisible(c.getChildAt(c.root,p)):!1);if(null==c)for(p=0;p<e.length;p++)k.setVisible(k.getChildAt(k.root,parseInt(e[p])),!0)}finally{k.endUpdate()}}}; +GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=c&&g.setAttribute("title",c);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave", +function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box"; +e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,k=null,l=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);c=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e, +0);c=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove": +"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,t=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft= +q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<t&&Math.abs(this.scrollTop-q.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var d=this.toolbarItems,f=0,g=null,n=null,m=0;m<d.length;m++){var h=d[m];if("pages"==h){n=b.ownerDocument.createElement("div"); +n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");w.style.borderRightStyle="none";w.style.paddingLeft="0px";w.style.paddingRight="0px";e.appendChild(n);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ +1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";h=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";w.style.display=n.style.display;u.style.display=n.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, +mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==h){if(this.layersEnabled){var v=this.graph.getModel(),r=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g), +g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=r.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+ +"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h], +null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d, +70),e.appendChild(d));this.minToolbarWidth=34*f;var A=b.style.border,d=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px"; +e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g), +g=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==g)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",d)}; +GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,c){if(null==c){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(c=k.getAttribute("href"))}null!=b?null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null==c||!a.isPageLink(c)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(k=c.indexOf(","),0<k&&(k=c.substring(k+ 1),this.selectPageById(k),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))}; GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&& (e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev= "1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()}; GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b); -var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode|| -10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh=function(){};mxEvent.addListener(b,"click",function(){d.destroy()}); -var k=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=d.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown", -k)):(b.style.display="none",e.style.display="none");var r=this;p.getImageFromBundles=function(a){return r.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return r.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= -"hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom= -"60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute", -d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(p,this.graph)}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})}; -GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var k=d[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[e]))}return b}; -GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}}; +var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){c.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode|| +10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var c=new EditorUi(new Editor(!0),document.createElement("div"),!0);c.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";c.refresh=function(){};mxEvent.addListener(b,"click",function(){c.destroy()}); +var k=mxUtils.bind(this,function(a){27==a.keyCode&&c.destroy()}),l=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=c.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown", +k)):(b.style.display="none",e.style.display="none");var t=this;p.getImageFromBundles=function(a){return t.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return t.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= +"hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,c);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom= +"60px";c.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(c.chromelessToolbar);c.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",c.chromelessToolbar.style.display="block",c.chromelessToolbar.style.position="absolute", +c.chromelessToolbar.style.bottom="",c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(p,this.graph)}),0);return c};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})}; +GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var c=document.getElementsByTagName("*"),b=[],e=0;e<c.length;e++){var k=c[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(c[e]))}return b}; +GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var c=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,c);null!=b&&b(e)};null!=c.url?GraphViewer.getUrl(c.url,function(a){k(a)}):k(c.xml)}}; GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}}; -GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; -(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached= +GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var c=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;c.open("GET",a);c.onload=function(){b(null!=c.getText?c.getText():c.responseText)};c.onerror=e;c.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; +(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,c){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached= new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>'; -b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],h=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};h();var m=!1,p=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(p))};a(p);var q,r,w,F,B=function(){if((w=b.offsetWidth)!=q||(F=b.offsetHeight)!=r)m=!0,q=w,r=F;h()},G=function(a,b,c){a.attachEvent? -a.attachEvent("on"+b,c):a.addEventListener(b,c)};G(d,"scroll",B);G(f,"scroll",B)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},r=Object.prototype.toString.call(e),c="[object Array]"===r||"[object NodeList]"===r||"[object HTMLCollection]"===r||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var r=0,f=e.length;r<f;r++)p(e[r],q);else p(e,q);this.detach=function(){if(c)for(var a=0,d=e.length;a<d;a++)b.detach(e[a]);else b.detach(e)}}; +b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,t,z,F,B=function(){if((z=b.offsetWidth)!=q||(F=b.offsetHeight)!=t)n=!0,q=z,t=F;g()},G=function(a,b,c){a.attachEvent? +a.attachEvent("on"+b,c):a.addEventListener(b,c)};G(d,"scroll",B);G(f,"scroll",B)}var q=function(){GraphViewer.resizeSensorEnabled&&c()},t=Object.prototype.toString.call(e),d="[object Array]"===t||"[object NodeList]"===t||"[object HTMLCollection]"===t||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var t=0,f=e.length;t<f;t++)p(e[t],q);else p(e,q);this.detach=function(){if(d)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}}; b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})(); diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js index c9142ec945559d00d4a7a21e8ba29f439bd5df04..7a88a67f33d2951b762a14b83b62a575e81fece4 100644 --- a/src/main/webapp/js/atlas.min.js +++ b/src/main/webapp/js/atlas.min.js @@ -316,7 +316,7 @@ mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this. mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))}; mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null; mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a}; -mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)}; +mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&"file://"!=a.substring(0,7)}; mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a}; function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.stop()});mxEvent.addListener(document,"mouseup",this.mouseUpListener);var b=mxUtils.bind(this, function(){this.scrollbars=mxUtils.hasScrollbars(a.container);this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;this.scrollbars?(a.panGraph(-a.container.scrollLeft-Math.ceil(this.dx),-a.container.scrollTop-Math.ceil(this.dy)),a.panDx=this.scrollLeft-a.container.scrollLeft,a.panDy=this.scrollTop-a.container.scrollTop,a.fireEvent(new mxEventObject(mxEvent.PAN))):a.panGraph(this.getDx(), @@ -2524,7 +2524,7 @@ return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform", "translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var z=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,p){var D=this.state;if(null!=this.foAltText&&(0==d||0!=D.fontSize&&f.length<5*d/D.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+D.fontSize)/ 2));q.setAttribute("fill",D.fontColor||"black");q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(D.fontSize)+"px");q.setAttribute("font-family",D.fontFamily);(D.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(D.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(D.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline"); -mxUtils.write(q,f);return q}return z.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var n=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&n.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas= +q.innerHTML=f;return q}return z.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var n=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&n.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas= function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b= window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)}; Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b; @@ -6323,271 +6323,271 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6 "yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos", "yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos", "youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))])}})(); -DrawioFile=function(a,e){mxEventSource.call(this);this.ui=a;this.data=e||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))}; -DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,e,d,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,e,d){};DrawioFile.prototype.saveFile=function(a,e,d,b){};DrawioFile.prototype.getPublicUrl=function(a){a(null)}; -DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,e,d){};DrawioFile.prototype.isMovable=function(){return!1}; -DrawioFile.prototype.move=function(a,e,d){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data}; -DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){var d=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=d&&d.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this|| +DrawioFile=function(a,d){mxEventSource.call(this);this.ui=a;this.data=d||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))}; +DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,d,e,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,d,e){};DrawioFile.prototype.saveFile=function(a,d,e,b){};DrawioFile.prototype.getPublicUrl=function(a){a(null)}; +DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,d,e){};DrawioFile.prototype.isMovable=function(){return!1}; +DrawioFile.prototype.move=function(a,d,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data}; +DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){var e=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this|| this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener); this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)}; DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"), 0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))}; -DrawioFile.prototype.autosave=function(a,e,d,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<e?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=d&&d(a)}), -mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=d&&d(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay}; -DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,e){if(null!=a&&null!=e){var d=a.lastIndexOf("."),b=0<d?a.substring(d):"",d=e.lastIndexOf(".");return b===(0<d?e.substring(d):"")}return a==e}; -DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,e,d,b){DrawioFile.call(this,a,e);this.title=d;this.mode=b?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)}; -LocalFile.prototype.saveFile=function(a,e,d,b){this.title=a;this.updateFileData();e=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,h?"image/png":"text/xml",h);else if(b.length<MAX_REQUEST_SIZE){var e=a.lastIndexOf("."),e=0<e?a.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ -(h?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=d&&d()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):k(e)};LocalFile.prototype.rename=function(a,e,d){this.title=a;this.descriptorChanged();null!=e&&e()}; -LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,e,d){LocalFile.call(this,a,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,e,d){DrawioFile.call(this,a,e);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title}; -StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(a,e,d){this.saveAs(this.getTitle(),e,d)};StorageFile.prototype.saveAs=function(a,e,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,e,d)}; -StorageFile.prototype.saveFile=function(a,e,d,b){if(this.isEditable()){var h=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(k){null!=b&&b(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=a&&null!=d?this.ui.confirm(mxResources.get("replaceIt", -[a]),h,b):h()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,e,d){var b=this.getTitle();b!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(h){var k=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,e)}),d)});null!=h?this.ui.confirm(mxResources.get("replaceIt",[a]),k,d):k()})):e()}; -StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,e,d){StorageFile.call(this,a,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title}; -StorageLibrary.prototype.isRenamable=function(a,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,e,d){StorageFile.call(this,a,e,d);a=d;e=a.lastIndexOf("/");0<=e&&(a=a.substring(e+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,e,d){return!1};UrlLibrary.prototype.saveAs=function(a,e,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,e,d){function b(b,u,t,q,v,h){function B(){mxEvent.addListener(p,"click",null!=h?h:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,c.checked);e()})):(a.setMode(t,c.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";p.style.display= -mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.boxSizing="border-box";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 10px 12px 10px";p.style.width="88px";p.style.height="100px";p.style.whiteSpace="nowrap";p.setAttribute("title",u);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var y=document.createElement("div");y.style.textOverflow="ellipsis";y.style.overflow="hidden";if(null!=b){var k=document.createElement("img"); -k.setAttribute("src",b);k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="60px";k.style.height="60px";k.style.paddingBottom="6px";p.appendChild(k)}else y.style.paddingTop="5px",y.style.whiteSpace="normal",mxClient.IS_IOS?(p.style.padding="0px 10px 20px 10px",p.style.top="6px"):mxClient.IS_FF&&(y.style.paddingTop="0px",y.style.marginTop="-2px");p.appendChild(y);mxUtils.write(y,u);if(null!=v)for(b=0;b<v.length;b++)mxUtils.br(y),mxUtils.write(y,v[b]);if(null!=q&&null==a[q]){k.style.visibility= -"hidden";mxUtils.setOpacity(y,10);var l=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});l.spin(p);var x=window.setTimeout(function(){null==a[q]&&(l.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[q]&&(window.clearTimeout(x),mxUtils.setOpacity(y,100),k.style.visibility="",l.stop(),B(),"drive"==q&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else B(); -n.appendChild(p);++f>=d&&(mxUtils.br(n),f=0)}d=null!=d?d:2;var h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";h.style.paddingTop="0px";h.style.paddingBottom="20px";var k=a.addLanguageMenu(h,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target", +DrawioFile.prototype.autosave=function(a,d,e,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<d?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}), +mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=e&&e(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay}; +DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,d){if(null!=a&&null!=d){var e=a.lastIndexOf("."),b=0<e?a.substring(e):"",e=d.lastIndexOf(".");return b===(0<e?d.substring(e):"")}return a==d}; +DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,d,e,b){DrawioFile.call(this,a,d);this.title=e;this.mode=b?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,d,e){this.saveAs(this.title,d,e)};LocalFile.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)}; +LocalFile.prototype.saveFile=function(a,d,e,b){this.title=a;this.updateFileData();d=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,h?"image/png":"text/xml",h);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ +(h?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):k(d)};LocalFile.prototype.rename=function(a,d,e){this.title=a;this.descriptorChanged();null!=d&&d()}; +LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,d,e){LocalFile.call(this,a,d,e)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,d,e){DrawioFile.call(this,a,d);this.title=e};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title}; +StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(a,d,e){this.saveAs(this.getTitle(),d,e)};StorageFile.prototype.saveAs=function(a,d,e){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,d,e)}; +StorageFile.prototype.saveFile=function(a,d,e,b){if(this.isEditable()){var h=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=e&&e()}))}catch(k){null!=b&&b(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(e){this.isRenamable()&&this.getTitle()!=a&&null!=e?this.ui.confirm(mxResources.get("replaceIt", +[a]),h,b):h()}))}else null!=e&&e()};StorageFile.prototype.rename=function(a,d,e){var b=this.getTitle();b!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(h){var k=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,d)}),e)});null!=h?this.ui.confirm(mxResources.get("replaceIt",[a]),k,e):k()})):d()}; +StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,d,e){StorageFile.call(this,a,d,e)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title}; +StorageLibrary.prototype.isRenamable=function(a,d,e){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,d,e){StorageFile.call(this,a,d,e);a=e;d=a.lastIndexOf("/");0<=d&&(a=a.substring(d+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,d,e){return!1};UrlLibrary.prototype.saveAs=function(a,d,e){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,d,e){function b(b,u,t,p,w,h){function q(){mxEvent.addListener(v,"click",null!=h?h:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,c.checked);d()})):(a.setMode(t,c.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}var v=document.createElement("a");v.style.overflow="hidden";v.style.display= +mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.boxSizing="border-box";v.style.fontSize="11px";v.style.position="relative";v.style.margin="4px";v.style.padding="8px 10px 12px 10px";v.style.width="88px";v.style.height="100px";v.style.whiteSpace="nowrap";v.setAttribute("title",u);mxClient.IS_QUIRKS&&(v.style.cssFloat="left",v.style.zoom="1");var z=document.createElement("div");z.style.textOverflow="ellipsis";z.style.overflow="hidden";if(null!=b){var k=document.createElement("img"); +k.setAttribute("src",b);k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="60px";k.style.height="60px";k.style.paddingBottom="6px";v.appendChild(k)}else z.style.paddingTop="5px",z.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(z.style.paddingTop="0px",z.style.marginTop="-2px");v.appendChild(z);mxUtils.write(z,u);if(null!=w)for(b=0;b<w.length;b++)mxUtils.br(z),mxUtils.write(z,w[b]);if(null!=p&&null==a[p]){k.style.visibility= +"hidden";mxUtils.setOpacity(z,10);var l=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});l.spin(v);var y=window.setTimeout(function(){null==a[p]&&(l.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(y),mxUtils.setOpacity(z,100),k.style.visibility="",l.stop(),q(),"drive"==p&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else q(); +n.appendChild(v);++f>=e&&(mxUtils.br(n),f=0)}e=null!=e?e:2;var h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";h.style.paddingTop="0px";h.style.paddingBottom="20px";var k=a.addLanguageMenu(h,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target", "_blank");k.style.position="absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);l.style.marginRight="2px";k.appendChild(l);mxUtils.write(k,mxResources.get("help"));h.appendChild(k)}var m=document.createElement("div");m.style.position="absolute";m.style.cursor="pointer"; m.style.fontSize="12px";m.style.bottom="28px";m.style.color="gray";mxUtils.write(m,mxResources.get("decideLater"));a.isOfflineApp()?m.style.right="20px":(mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)"),m.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)m.style.marginLeft=-Math.round(m.clientWidth/2)+"px"};h.appendChild(m);mxEvent.addListener(m,"click",function(){a.hideDialog();var c=Editor.useLocalStorage;a.createFile(a.defaultFilename,null, null,null,null,null,null,!0);Editor.useLocalStorage=c});var n=document.createElement("div");mxClient.IS_QUIRKS&&(n.style.whiteSpace="nowrap",n.style.cssFloat="left");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";n.style.padding="12px 0px 12px 0px";var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;var f=0,g=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding= "0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");h.appendChild(k);"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||b(IMAGE_PATH+ -"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);h.appendChild(n);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(c);l=document.createElement("span");l.style.color="gray";l.style.fontSize="12px";mxUtils.write(l," "+mxResources.get("rememberThisSetting"));k.appendChild(l);mxUtils.br(k);var p= -a.getRecent();if(null!=p&&0<p.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var t=document.createElement("option");t.setAttribute("value","");t.setAttribute("selected","selected");t.style.textAlign="center";mxUtils.write(t,mxResources.get("openRecent")+"...");u.appendChild(t);for(t=0;t<p.length;t++)(function(a){var c=a.mode;c==App.MODE_GOOGLE?c="googleDrive":c==App.MODE_ONEDRIVE&&(c="oneDrive");var f=document.createElement("option");f.setAttribute("value", -a.id);mxUtils.write(f,a.title+" ("+mxResources.get(c)+")");u.appendChild(f)})(p[t]);k.appendChild(u);mxEvent.addListener(u,"change",function(c){""!=u.value&&a.loadFile(u.value)})}else k.style.marginTop="20px",n.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(p=document.createElement("div"),p.style.cursor="pointer",p.style.padding="18px 0px 6px 0px",p.style.fontSize="12px",p.style.color="gray",mxUtils.write(p,mxResources.get("import")+" "+mxResources.get("gliffy")+ -", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(p,"click",function(){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&(a.hideDialog(),a.openFiles(c.files,!0))});c.click()}),k.appendChild(p),n.style.paddingBottom="4px");n.appendChild(k);mxEvent.addListener(l,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&& +"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);h.appendChild(n);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(c);l=document.createElement("span");l.style.color="gray";l.style.fontSize="12px";mxUtils.write(l," "+mxResources.get("rememberThisSetting"));k.appendChild(l);mxUtils.br(k);var q= +a.getRecent();if(null!=q&&0<q.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var t=document.createElement("option");t.setAttribute("value","");t.setAttribute("selected","selected");t.style.textAlign="center";mxUtils.write(t,mxResources.get("openRecent")+"...");u.appendChild(t);for(t=0;t<q.length;t++)(function(a){var c=a.mode;c==App.MODE_GOOGLE?c="googleDrive":c==App.MODE_ONEDRIVE&&(c="oneDrive");var f=document.createElement("option");f.setAttribute("value", +a.id);mxUtils.write(f,a.title+" ("+mxResources.get(c)+")");u.appendChild(f)})(q[t]);k.appendChild(u);mxEvent.addListener(u,"change",function(c){""!=u.value&&a.loadFile(u.value)})}else k.style.marginTop="20px",n.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+" "+mxResources.get("gliffy")+ +", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&(a.hideDialog(),a.openFiles(c.files,!0))});c.click()}),k.appendChild(q),n.style.paddingBottom="4px");n.appendChild(k);mxEvent.addListener(l,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&& "0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(g.style.padding="8px",g.style.fontSize="9pt",g.style.marginTop="-14px",g.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",h.appendChild(g))}, -5E3);this.container=h},SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";a.addLanguageMenu(e,!0);var d=null,b=a.getServiceCount();!a.isOffline()&&1<b&&(d=document.createElement("a"),d.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage"),d.setAttribute("title",mxResources.get("help")),d.setAttribute("target","_blank"),d.style.position="absolute",d.style.fontSize="12px",d.style.textDecoration="none",d.style.cursor="pointer",d.style.bottom= -"22px",d.style.left="26px",d.style.color="gray",b=document.createElement("img"),b.setAttribute("border","0"),b.setAttribute("valign","bottom"),b.setAttribute("src",Editor.helpImage),b.style.marginRight="2px",d.appendChild(b),mxUtils.write(d,mxResources.get("help")),e.appendChild(d));b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";var h=document.createElement("img");h.setAttribute("border","0");h.setAttribute("align", -"absmiddle");h.style.width="40px";h.style.height="40px";h.style.marginRight="12px";h.style.paddingBottom="4px";var k="";a.mode==App.MODE_GOOGLE?(h.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive"),null!=d&&d.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Google+Drive")):a.mode==App.MODE_DROPBOX?(h.src=IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox"),null!=d&&d.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Dropbox")): -a.mode==App.MODE_ONEDRIVE?(h.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive"),null!=d&&d.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+OneDrive")):a.mode==App.MODE_GITHUB?(h.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):a.mode==App.MODE_TRELLO?(h.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(h.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):(h.src=IMAGE_PATH+"/osa_drive-harddisk.png", -k=mxResources.get("device"));var l=document.createElement("div");l.style.margin="4px 0px 0px 0px";var m=document.createElement("button");m.className="geBigButton";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(l.style.padding="42px 0px 56px 0px",m.style.marginBottom="12px"):(b.appendChild(h),mxUtils.write(b,k),e.appendChild(b),l.style.border="1px solid #d3d3d3",l.style.borderWidth="1px 0px 1px 0px",l.style.padding="18px 0px 24px 0px",m.style.marginBottom= +5E3);this.container=h},SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";a.addLanguageMenu(d,!0);var e=null,b=a.getServiceCount();!a.isOffline()&&1<b&&(e=document.createElement("a"),e.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage"),e.setAttribute("title",mxResources.get("help")),e.setAttribute("target","_blank"),e.style.position="absolute",e.style.fontSize="12px",e.style.textDecoration="none",e.style.cursor="pointer",e.style.bottom= +"22px",e.style.left="26px",e.style.color="gray",b=document.createElement("img"),b.setAttribute("border","0"),b.setAttribute("valign","bottom"),b.setAttribute("src",Editor.helpImage),b.style.marginRight="2px",e.appendChild(b),mxUtils.write(e,mxResources.get("help")),d.appendChild(e));b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";var h=document.createElement("img");h.setAttribute("border","0");h.setAttribute("align", +"absmiddle");h.style.width="40px";h.style.height="40px";h.style.marginRight="12px";h.style.paddingBottom="4px";var k="";a.mode==App.MODE_GOOGLE?(h.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive"),null!=e&&e.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Google+Drive")):a.mode==App.MODE_DROPBOX?(h.src=IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox"),null!=e&&e.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Dropbox")): +a.mode==App.MODE_ONEDRIVE?(h.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive"),null!=e&&e.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+OneDrive")):a.mode==App.MODE_GITHUB?(h.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):a.mode==App.MODE_TRELLO?(h.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(h.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):(h.src=IMAGE_PATH+"/osa_drive-harddisk.png", +k=mxResources.get("device"));var l=document.createElement("div");l.style.margin="4px 0px 0px 0px";var m=document.createElement("button");m.className="geBigButton";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(l.style.padding="42px 0px 56px 0px",m.style.marginBottom="12px"):(b.appendChild(h),mxUtils.write(b,k),d.appendChild(b),l.style.border="1px solid #d3d3d3",l.style.borderWidth="1px 0px 1px 0px",l.style.padding="18px 0px 24px 0px",m.style.marginBottom= "8px");mxClient.IS_QUIRKS&&(l.style.whiteSpace="nowrap",l.style.cssFloat="left");mxClient.IS_QUIRKS&&(m.style.width="340px");mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){a.hideDialog();a.actions.get("new").funct()});l.appendChild(m);mxUtils.br(l);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_QUIRKS&&(m.style.width="340px");mxUtils.write(m,mxResources.get("openExistingDiagram")); -mxEvent.addListener(m,"click",function(){a.actions.get("open").funct()});l.appendChild(m);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP|| +mxEvent.addListener(m,"click",function(){a.actions.get("open").funct()});l.appendChild(m);e="undefined";a.mode==App.MODE_GOOGLE?e=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?e=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?e=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?e=mxResources.get("github"):a.mode==App.MODE_TRELLO?e=mxResources.get("trello"):a.mode==App.MODE_DEVICE?e=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(e=mxResources.get("browser"));mxClient.IS_CHROMEAPP|| EditorUi.isElectronApp||(h=function(b){m.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});l.appendChild(c)},b=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=b?(m.style.marginBottom= "24px",h=document.createElement("a"),h.setAttribute("href","javascript:void(0)"),h.style.display="block",h.style.marginTop="6px",mxUtils.write(h,mxResources.get("changeUser")+" ("+b.displayName+")"),m.style.marginBottom="16px",l.style.paddingBottom="18px",mxEvent.addListener(h,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog(); a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),l.appendChild(h)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?h(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?h(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&h(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&h(function(){a.dropbox.logout(); -a.openLink("https://www.dropbox.com/logout")}),h=document.createElement("a"),h.setAttribute("href","javascript:void(0)"),h.style.display="block",h.style.marginTop="8px",mxUtils.write(h,mxResources.get("notUsingService",[d])),mxEvent.addListener(h,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),l.appendChild(h));e.appendChild(l);this.container=e},ConfirmDialog=function(a,e,d,b,h,k,l,m,n){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div"); -f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,e);c.appendChild(f);f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(g.checked)});k.className="geBtn";null!=m&&(k.innerHTML=m+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop= -"8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&f.appendChild(k);h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(g.checked)});f.appendChild(h);null!=l?(h.innerHTML=l+"<br>"+h.innerHTML+"<br>",h.style.paddingBottom="8px",h.style.paddingTop="8px",h.style.height="auto",h.className="geBtn",h.style.width="40%"):h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(k);c.appendChild(f);n?(f.style.marginTop="10px",f=document.createElement("p"), -f.style.marginTop="20px",f.appendChild(g),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),f.appendChild(l),c.appendChild(f),mxEvent.addListener(l,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.container=c},ErrorDialog=function(a,e,d,b,h,k,l,m,n){n=null!=n?n:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=e){var f=document.createElement("div");f.style.padding="0px";f.style.margin="0px"; -f.style.fontSize="18px";f.style.paddingBottom="16px";f.style.marginBottom="16px";f.style.borderBottom="1px solid #c0c0c0";f.style.color="gray";mxUtils.write(f,e);c.appendChild(f)}e=document.createElement("div");e.style.padding="6px";e.innerHTML=d;c.appendChild(e);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";null!=k&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),e.className="geBtn",d.appendChild(e),d.style.textAlign="center");var g= -mxUtils.button(b,function(){n&&a.hideDialog();null!=h&&h()});g.className="geBtn";d.appendChild(g);null!=l&&(b=mxUtils.button(l,function(){n&&a.hideDialog();null!=m&&m()}),b.className="geBtn gePrimaryBtn",d.appendChild(b));this.init=function(){g.focus()};c.appendChild(d);this.container=c},EmbedDialog=function(a,e,d,b,h){b=document.createElement("div");var k=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);mxUtils.write(b,mxResources.get(5E5>e.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b); -var l=document.createElement("div");l.style.position="absolute";l.style.top="30px";l.style.right="30px";l.style.color="gray";mxUtils.write(l,a.formatFileSize(e.length));b.appendChild(l);var m=document.createElement("textarea");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none";m.style.height="150px";m.style.width="440px";m.style.border="1px solid gray";m.value= -mxResources.get("updatingDocument");b.appendChild(m);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>e.length?(m.value=e,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):(m.setAttribute("readonly","true"),m.value=e.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};l=document.createElement("div");l.style.position="absolute";l.style.bottom="36px";l.style.right="32px";var n= -null;mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var c=5E5>e.length?m.value:e;if(null!=h)h(c);else if(k)try{var f=a.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}), -d||500)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var b=window.open().document;b.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>");b.close()}}),n.className="geBtn",l.appendChild(n));if(!k||7500<e.length){var c=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",e,"text/plain")});c.className="geBtn";l.appendChild(c)}if(k&&(!a.isOffline()|| -mxClient.IS_CHROMEAPP)){if(51200>e.length){var f=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(c)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");f.appendChild(c);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+ -" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";l.appendChild(f)}7168>e.length&&(f=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(m.value);a.openLink(c)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width", +a.openLink("https://www.dropbox.com/logout")}),h=document.createElement("a"),h.setAttribute("href","javascript:void(0)"),h.style.display="block",h.style.marginTop="8px",mxUtils.write(h,mxResources.get("notUsingService",[e])),mxEvent.addListener(h,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),l.appendChild(h));d.appendChild(l);this.container=d},ConfirmDialog=function(a,d,e,b,h,k,l,m,n){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div"); +f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,d);c.appendChild(f);f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(g.checked)});k.className="geBtn";null!=m&&(k.innerHTML=m+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop= +"8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&f.appendChild(k);h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(g.checked)});f.appendChild(h);null!=l?(h.innerHTML=l+"<br>"+h.innerHTML+"<br>",h.style.paddingBottom="8px",h.style.paddingTop="8px",h.style.height="auto",h.className="geBtn",h.style.width="40%"):h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(k);c.appendChild(f);n?(f.style.marginTop="10px",f=document.createElement("p"), +f.style.marginTop="20px",f.appendChild(g),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),f.appendChild(l),c.appendChild(f),mxEvent.addListener(l,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.container=c},ErrorDialog=function(a,d,e,b,h,k,l,m,n){n=null!=n?n:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=d){var f=document.createElement("div");f.style.padding="0px";f.style.margin="0px"; +f.style.fontSize="18px";f.style.paddingBottom="16px";f.style.marginBottom="16px";f.style.borderBottom="1px solid #c0c0c0";f.style.color="gray";mxUtils.write(f,d);c.appendChild(f)}d=document.createElement("div");d.style.padding="6px";d.innerHTML=e;c.appendChild(d);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="right";null!=k&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),d.className="geBtn",e.appendChild(d),e.style.textAlign="center");var g= +mxUtils.button(b,function(){n&&a.hideDialog();null!=h&&h()});g.className="geBtn";e.appendChild(g);null!=l&&(b=mxUtils.button(l,function(){n&&a.hideDialog();null!=m&&m()}),b.className="geBtn gePrimaryBtn",e.appendChild(b));this.init=function(){g.focus()};c.appendChild(e);this.container=c},EmbedDialog=function(a,d,e,b,h){b=document.createElement("div");var k=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);mxUtils.write(b,mxResources.get(5E5>d.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b); +var l=document.createElement("div");l.style.position="absolute";l.style.top="30px";l.style.right="30px";l.style.color="gray";mxUtils.write(l,a.formatFileSize(d.length));b.appendChild(l);var m=document.createElement("textarea");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none";m.style.height="150px";m.style.width="440px";m.style.border="1px solid gray";m.value= +mxResources.get("updatingDocument");b.appendChild(m);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>d.length?(m.value=d,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):(m.setAttribute("readonly","true"),m.value=d.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};l=document.createElement("div");l.style.position="absolute";l.style.bottom="36px";l.style.right="32px";var n= +null;mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>d.length?"preview":"openInNewWindow"),function(){var c=5E5>d.length?m.value:d;if(null!=h)h(c);else if(k)try{var f=a.openLink(c);null!=f&&(null==e||0<e)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}), +e||500)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var b=window.open().document;b.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>");b.close()}}),n.className="geBtn",l.appendChild(n));if(!k||7500<d.length){var c=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",d,"text/plain")});c.className="geBtn";l.appendChild(c)}if(k&&(!a.isOffline()|| +mxClient.IS_CHROMEAPP)){if(51200>d.length){var f=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(c)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");f.appendChild(c);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+ +" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";l.appendChild(f)}7168>d.length&&(f=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(m.value);a.openLink(c)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width", "18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",f.appendChild(c),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",l.appendChild(f))}c=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.appendChild(c);f=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?c.className="geBtn gePrimaryBtn":(l.appendChild(f),f.className="geBtn gePrimaryBtn",c.className="geBtn"):(l.appendChild(n),c.className="geBtn",n.className="geBtn gePrimaryBtn");b.appendChild(l);this.container=b},GoogleSitesDialog=function(a,e){function d(){var a=null!=A.getTitle()?A.getTitle(): -this.defaultFilename;if(x.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<z.length&&(b+="&s="+z);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=g.value&&(b+="&height="+g.value);b+="&pan="+(t.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(v.checked?"1":"0");b+="&resize="+(q.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;h.mathEnabled&&(b+="&math=1"); -B.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+encodeURIComponent(a)),""!=g.value&&(a=parseInt(g.value)+parseInt(f.value),b+="&height="+ +mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?c.className="geBtn gePrimaryBtn":(l.appendChild(f),f.className="geBtn gePrimaryBtn",c.className="geBtn"):(l.appendChild(n),c.className="geBtn",n.className="geBtn gePrimaryBtn");b.appendChild(l);this.container=b},GoogleSitesDialog=function(a,d){function e(){var a=null!=A.getTitle()?A.getTitle(): +this.defaultFilename;if(y.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<B.length&&(b+="&s="+B);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=g.value&&(b+="&height="+g.value);b+="&pan="+(t.checked?"1":"0");b+="&zoom="+(x.checked?"1":"0");b+="&fit="+(w.checked?"1":"0");b+="&resize="+(p.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;h.mathEnabled&&(b+="&math=1"); +v.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+encodeURIComponent(a)),""!=g.value&&(a=parseInt(g.value)+parseInt(f.value),b+="&height="+ a),c.value=b):c.value=""}var b=document.createElement("div"),h=a.editor.graph,k=h.getGraphBounds(),l=h.view.scale,m=Math.floor(k.x/l-h.view.translate.x),n=Math.floor(k.y/l-h.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";b.appendChild(c);mxUtils.br(b);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=m;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginLeft="4px";g.value=Math.ceil(k.height/l);b.appendChild(g); -mxUtils.br(b);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";b.appendChild(k);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=e||"";b.appendChild(p);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var u=document.createElement("input"); -u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";b.appendChild(t);mxUtils.write(b,mxResources.get("pan")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft= -"8px";b.appendChild(w);mxUtils.write(b,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);b.appendChild(y);mxUtils.write(b,mxResources.get("edit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";b.appendChild(B);mxUtils.write(b,mxResources.get("asNew")+" ");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type", -"checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";b.appendChild(q);mxUtils.write(b,mxResources.get("resize")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b,mxResources.get("embed")+" ");var z=a.getBasenames().join(";"), -A=a.getCurrentFile();mxEvent.addListener(t,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(g,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(p,"change",d);d();mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";k.appendChild(l);b.appendChild(k);this.container=b},CreateGraphDialog=function(a,e,d){var b=document.createElement("div");b.style.textAlign="right";this.init=function(){var e=document.createElement("div");e.style.position="relative";e.style.border= -"1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);b.appendChild(e);var k=new Graph(e);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var l="curved=1;";k.cellRenderer.installCellOverlayListeners=function(a,c,f){mxCellRenderer.prototype.installCellOverlayListeners.apply(this, +mxUtils.br(b);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";b.appendChild(k);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=d||"";b.appendChild(q);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var u=document.createElement("input"); +u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";b.appendChild(t);mxUtils.write(b,mxResources.get("pan")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft= +"8px";b.appendChild(x);mxUtils.write(b,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);b.appendChild(z);mxUtils.write(b,mxResources.get("edit")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("asNew")+" ");mxUtils.br(b);var p=document.createElement("input");p.setAttribute("type", +"checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";b.appendChild(p);mxUtils.write(b,mxResources.get("resize")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";b.appendChild(w);mxUtils.write(b,mxResources.get("fit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"), +A=a.getCurrentFile();mxEvent.addListener(t,"change",e);mxEvent.addListener(x,"change",e);mxEvent.addListener(p,"change",e);mxEvent.addListener(w,"change",e);mxEvent.addListener(z,"change",e);mxEvent.addListener(v,"change",e);mxEvent.addListener(y,"change",e);mxEvent.addListener(g,"change",e);mxEvent.addListener(f,"change",e);mxEvent.addListener(u,"change",e);mxEvent.addListener(q,"change",e);e();mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";k.appendChild(l);b.appendChild(k);this.container=b},CreateGraphDialog=function(a,d,e){var b=document.createElement("div");b.style.textAlign="right";this.init=function(){var d=document.createElement("div");d.style.position="relative";d.style.border= +"1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);b.appendChild(d);var k=new Graph(d);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var l="curved=1;";k.cellRenderer.installCellOverlayListeners=function(a,c,f){mxCellRenderer.prototype.installCellOverlayListeners.apply(this, arguments);mxEvent.addListener(f.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(f.node,"touchstart",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null, -null,null,null,l);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var m=k.getDefaultParent(),n=mxUtils.bind(this,function(a){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,f){k.connectionHandler.reset();k.clearSelection();var b=k.getCellGeometry(a),q;g(function(){q=k.insertVertex(m,null,"Entry",b.x,b.y,80,30,"rounded=1;");n(q);k.view.refresh(q);k.insertEdge(m,null,"",a,q,l)},function(){k.scrollCellToVisible(q)})}); -c.addListener("pointerdown",function(a,c){var f=c.getProperty("event"),b=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var q=mxUtils.convertPoint(k.container,mxEvent.getClientX(f),mxEvent.getClientY(f));k.connectionHandler.start(b,q.x,q.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(f);mxEvent.consume(f)});k.addCellOverlay(a,c)});k.getModel().beginUpdate();var c;try{c=k.insertVertex(m,null,"Start",0,0,80,30,"ellipse"),n(c)}finally{k.getModel().endUpdate()}var f; -"horizontalTree"==d?(f=new mxCompactTreeLayout(k),f.edgeRouting=!1,f.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(f=new mxCompactTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(f=new mxRadialTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST): -"organic"==d?(f=new mxFastOrganicLayout(k,!1),f.forceConstant=80):"circle"==d&&(f=new mxCircleLayout(k));if(null!=f){var g=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),f.execute(k.getDefaultParent(),c)}catch(q){throw q;}finally{var g=new mxMorphing(k);g.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));g.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,c,f,b,u){p.apply(this,arguments);g()};k.resizeCell= -function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var t=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();var c=a.editor.graph.getFreeInsertPoint(), -c=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),c.x,c.y),f=a.editor.graph.view,b=f.getBounds(c);b.x-=f.translate.x;b.y-=f.translate.y;a.editor.graph.scrollRectToVisible(b);a.editor.graph.setSelectionCells(c);null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()});b.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(u)};this.container=b}; +null,null,null,l);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var m=k.getDefaultParent(),n=mxUtils.bind(this,function(a){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,f){k.connectionHandler.reset();k.clearSelection();var b=k.getCellGeometry(a),p;g(function(){p=k.insertVertex(m,null,"Entry",b.x,b.y,80,30,"rounded=1;");n(p);k.view.refresh(p);k.insertEdge(m,null,"",a,p,l)},function(){k.scrollCellToVisible(p)})}); +c.addListener("pointerdown",function(a,c){var f=c.getProperty("event"),b=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var p=mxUtils.convertPoint(k.container,mxEvent.getClientX(f),mxEvent.getClientY(f));k.connectionHandler.start(b,p.x,p.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(f);mxEvent.consume(f)});k.addCellOverlay(a,c)});k.getModel().beginUpdate();var c;try{c=k.insertVertex(m,null,"Start",0,0,80,30,"ellipse"),n(c)}finally{k.getModel().endUpdate()}var f; +"horizontalTree"==e?(f=new mxCompactTreeLayout(k),f.edgeRouting=!1,f.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==e?(f=new mxCompactTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==e?(f=new mxRadialTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==e?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==e?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST): +"organic"==e?(f=new mxFastOrganicLayout(k,!1),f.forceConstant=80):"circle"==e&&(f=new mxCircleLayout(k));if(null!=f){var g=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),f.execute(k.getDefaultParent(),c)}catch(p){throw p;}finally{var g=new mxMorphing(k);g.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));g.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,c,f,b,u){q.apply(this,arguments);g()};k.resizeCell= +function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var t=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();var c=a.editor.graph.getFreeInsertPoint(), +c=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),c.x,c.y),f=a.editor.graph.view,b=f.getBounds(c);b.x-=f.translate.x;b.y-=f.translate.y;a.editor.graph.scrollRectToVisible(b);a.editor.graph.setSelectionCells(c);null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(u)};this.container=b}; CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+ "/handle-connect.png",26,26); -var BackgroundImageDialog=function(a,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";d.appendChild(b);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var b=a.editor.graph.backgroundImage,h=document.createElement("input");h.setAttribute("type","text");h.style.marginTop="4px";h.style.marginBottom="4px";h.style.width="350px";h.value= -null!=b?b.src:"";var k=!1,l=function(){k||""==h.value||a.isOffline()?(m.value="",n.value=""):a.loadImage(mxUtils.trim(h.value),function(a){m.value=a.width;n.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));h.value="";m.value="";n.value=""})};this.init=function(){h.focus();if(Graph.fileSupport){h.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=d.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(a){null!= +var BackgroundImageDialog=function(a,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";e.appendChild(b);mxUtils.write(e,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(e);var b=a.editor.graph.backgroundImage,h=document.createElement("input");h.setAttribute("type","text");h.style.marginTop="4px";h.style.marginBottom="4px";h.style.width="350px";h.value= +null!=b?b.src:"";var k=!1,l=function(){k||""==h.value||a.isOffline()?(m.value="",n.value=""):a.loadImage(mxUtils.trim(h.value),function(a){m.value=a.width;n.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));h.value="";m.value="";n.value=""})};this.init=function(){h.focus();if(Graph.fileSupport){h.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=e.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(a){null!= f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,c,f,b,g,u){h.value=a;l()},function(){}, -function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&(h.value=decodeURIComponent(b),l())}c.stopPropagation();c.preventDefault()}),!1)}};d.appendChild(h);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var m=document.createElement("input"); -m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=b?b.width:"";d.appendChild(m);mxUtils.write(d,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=b?b.height:"";d.appendChild(n);b=mxUtils.button(mxResources.get("reset"),function(){h.value="";m.value="";n.value="";k=!1});mxEvent.addListener(b,"mousedown", -function(){k=!0});mxEvent.addListener(b,"touchstart",function(){k=!0});b.className="geBtn";b.width="100";d.appendChild(b);mxUtils.br(d);mxEvent.addListener(h,"change",l);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(h.value=a.url,l()));h.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); +function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&(h.value=decodeURIComponent(b),l())}c.stopPropagation();c.preventDefault()}),!1)}};e.appendChild(h);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("width")+":");var m=document.createElement("input"); +m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=b?b.width:"";e.appendChild(m);mxUtils.write(e,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=b?b.height:"";e.appendChild(n);b=mxUtils.button(mxResources.get("reset"),function(){h.value="";m.value="";n.value="";k=!1});mxEvent.addListener(b,"mousedown", +function(){k=!0});mxEvent.addListener(b,"touchstart",function(){k=!0});b.className="geBtn";b.width="100";e.appendChild(b);mxUtils.br(e);mxEvent.addListener(h,"change",l);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(h.value=a.url,l()));h.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}); f.className="geBtn";b.appendChild(f);null!=a.drive&&"1"==urlParams.photos&&(f=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD); -a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e(""!=h.value?new mxImage(mxUtils.trim(h.value),m.value,n.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(c);d.appendChild(b);this.container=d},ParseDialog=function(a,e){function d(c,f){var b=c.split("\n");if("plantUmlPng"==f||"plantUmlSvg"== -f){var b="plantUmlPng"==f?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},e=function(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=d(c1&63);r+=d(c2&63);r+=d(c3&63);return r+=d(c4&63)},p= -new XMLHttpRequest;p.open("GET",b+function(a){r="";for(l=0;l<a.length;l+=3)r=l+2==a.length?r+e(a.charCodeAt(l),a.charCodeAt(l+1),0):l+1==a.length?r+e(a.charCodeAt(l),0,0):r+e(a.charCodeAt(l),a.charCodeAt(l+1),a.charCodeAt(l+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(c))))),!0);p.responseType="blob";p.onload=function(b){200<=this.status&&300>this.status?(b=new FileReader,b.readAsDataURL(this.response),b.onload=function(b){var f=new Image;f.onload=function(){a.spinner.stop(); -var q=f.width,d=f.height;if(0==q&&0==d){var e=b.target.result,v=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(v+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(q=parseFloat(e[0].getAttribute("width")),d=parseFloat(e[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,c,h.x,h.y,q,d,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(b.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell); -g.scrollCellToVisible(g.getSelectionCell())};f.src=b.target.result},b.onerror=function(c){a.handleError(c)}):(a.spinner.stop(),a.handleError(b))};p.onerror=function(c){a.handleError(c)};p.send()}}else if("table"==f){for(var q=null,v=[],k=0,l=0;l<b.length;l++)if(p=mxUtils.trim(b[l]),"create table"==p.substring(0,12).toLowerCase())p=mxUtils.trim(p.substring(12)),"("==p.charAt(p.length-1)&&(p=p.substring(0,p.lastIndexOf(" "))),q=new mxCell(p,new mxGeometry(k,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"), -q.vertex=!0,v.push(q),p=a.editor.graph.getPreferredSizeForCell(m),null!=p&&(q.geometry.width=p.width+10);else if(null!=q&&")"==p.charAt(0))k+=q.geometry.width+40,q=null;else if("("!=p&&null!=q&&(p=p.substring(0,","==p.charAt(p.length-1)?p.length-1:p.length),"primary key"!=p.substring(0,11).toLowerCase())){var m=new mxCell(p,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"); -m.vertex=!0;p=sb.cloneCell(m,"");p.connectable=!1;p.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";p.geometry.width=30;p.geometry.height=26;m.insert(p);p=a.editor.graph.getPreferredSizeForCell(m);null!=p&&q.geometry.width<p.width+10&&(q.geometry.width=p.width+10);q.insert(m);q.geometry.height+=26}0<v.length&&(g=a.editor.graph,b=g.view,p=g.getGraphBounds(), -g.setSelectionCells(g.importCells(v,Math.ceil(Math.max(0,p.x/b.scale-b.translate.x)+4*g.gridSize),Math.ceil(Math.max(0,(p.y+p.height)/b.scale-b.translate.y)+4*g.gridSize))),g.scrollCellToVisible(g.getSelectionCell()))}else if("list"==f){if(0<b.length){g=a.editor.graph;m=new mxCell(b[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");m.vertex=!0; -p=g.getPreferredSizeForCell(m);null!=p&&m.geometry.width<p.width+10&&(m.geometry.width=p.width+10);q=[m];if(1<b.length)for(l=1;l<b.length;l++)"--"==b[l]?(p=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),p.vertex=!0,m.geometry.height+=p.geometry.height,m.insert(p),q.push(p)):0<b[l].length&&";"!=b[l].charAt(0)&&(k=new mxCell(b[l], -new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),k.vertex=!0,p=g.getPreferredSizeForCell(k),null!=p&&k.geometry.width<p.width&&(k.geometry.width=p.width),m.geometry.width=Math.max(m.geometry.width,k.geometry.width),m.geometry.height+=k.geometry.height,m.insert(k),q.push(k));g.getModel().beginUpdate();try{m=g.importCells([m],h.x,h.y)[0],g.fireEvent(new mxEventObject("cellsInserted", -"cells",[m].concat(m.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(m);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var m=function(a){var c=n[a];null==c&&(c=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,n[a]=c,v.push(c));return c},n={},v=[],l=0;l<b.length;l++)if(";"!=b[l].charAt(0)){var F=b[l].split("->");if(2<=F.length){var k=m(F[0]),D=m(F[F.length-1]),F=new mxCell(2<F.length?F[1]:"",new mxGeometry);F.edge=!0;k.insertEdge(F,!0);D.insertEdge(F, -!1);v.push(F)}}if(0<v.length){b=document.createElement("div");b.style.visibility="hidden";document.body.appendChild(b);g=new Graph(b);g.getModel().beginUpdate();try{v=g.importCells(v);for(l=0;l<v.length;l++)g.getModel().isVertex(v[l])&&(p=g.getPreferredSizeForCell(v[l]),v[l].geometry.width=Math.max(v[l].geometry.width,p.width),v[l].geometry.height=Math.max(v[l].geometry.height,p.height));q=new mxFastOrganicLayout(g);q.disableEdgeStyle=!1;q.forceConstant=120;q.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays(); -q=[];a.editor.graph.getModel().beginUpdate();try{q=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),h.x,h.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(q[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();b.parentNode.removeChild(b)}}}function b(){return"list"==m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean": +a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d(""!=h.value?new mxImage(mxUtils.trim(h.value),m.value,n.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(c);e.appendChild(b);this.container=e},ParseDialog=function(a,d){function e(c,f){var b=c.split("\n");if("plantUmlPng"==f||"plantUmlSvg"== +f){var b="plantUmlPng"==f?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var e=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},d=function(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)},v= +new XMLHttpRequest;v.open("GET",b+function(a){r="";for(k=0;k<a.length;k+=3)r=k+2==a.length?r+d(a.charCodeAt(k),a.charCodeAt(k+1),0):k+1==a.length?r+d(a.charCodeAt(k),0,0):r+d(a.charCodeAt(k),a.charCodeAt(k+1),a.charCodeAt(k+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(c))))),!0);v.responseType="blob";v.onload=function(b){200<=this.status&&300>this.status?(b=new FileReader,b.readAsDataURL(this.response),b.onload=function(b){var f=new Image;f.onload=function(){a.spinner.stop(); +var p=f.width,e=f.height;if(0==p&&0==e){var d=b.target.result,u=d.indexOf(","),d=decodeURIComponent(escape(atob(d.substring(u+1)))),d=mxUtils.parseXml(d).getElementsByTagName("svg");0<d.length&&(p=parseFloat(d[0].getAttribute("width")),e=parseFloat(d[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,c,h.x,h.y,p,e,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(b.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell); +g.scrollCellToVisible(g.getSelectionCell())};f.src=b.target.result},b.onerror=function(c){a.handleError(c)}):(a.spinner.stop(),a.handleError(b))};v.onerror=function(c){a.handleError(c)};v.send()}}else if("table"==f){for(var p=null,w=[],q=0,k=0;k<b.length;k++)if(v=mxUtils.trim(b[k]),"create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=v.substring(0,v.lastIndexOf(" "))),p=new mxCell(v,new mxGeometry(q,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"), +p.vertex=!0,w.push(p),v=a.editor.graph.getPreferredSizeForCell(l),null!=v&&(p.geometry.width=v.width+10);else if(null!=p&&")"==v.charAt(0))q+=p.geometry.width+40,p=null;else if("("!=v&&null!=p&&(v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length),"primary key"!=v.substring(0,11).toLowerCase())){var l=new mxCell(v,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"); +l.vertex=!0;v=sb.cloneCell(l,"");v.connectable=!1;v.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";v.geometry.width=30;v.geometry.height=26;l.insert(v);v=a.editor.graph.getPreferredSizeForCell(l);null!=v&&p.geometry.width<v.width+10&&(p.geometry.width=v.width+10);p.insert(l);p.geometry.height+=26}0<w.length&&(g=a.editor.graph,b=g.view,v=g.getGraphBounds(), +g.setSelectionCells(g.importCells(w,Math.ceil(Math.max(0,v.x/b.scale-b.translate.x)+4*g.gridSize),Math.ceil(Math.max(0,(v.y+v.height)/b.scale-b.translate.y)+4*g.gridSize))),g.scrollCellToVisible(g.getSelectionCell()))}else if("list"==f){if(0<b.length){g=a.editor.graph;l=new mxCell(b[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");l.vertex=!0; +v=g.getPreferredSizeForCell(l);null!=v&&l.geometry.width<v.width+10&&(l.geometry.width=v.width+10);p=[l];if(1<b.length)for(k=1;k<b.length;k++)"--"==b[k]?(v=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),v.vertex=!0,l.geometry.height+=v.geometry.height,l.insert(v),p.push(v)):0<b[k].length&&";"!=b[k].charAt(0)&&(q=new mxCell(b[k], +new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),q.vertex=!0,v=g.getPreferredSizeForCell(q),null!=v&&q.geometry.width<v.width&&(q.geometry.width=v.width),l.geometry.width=Math.max(l.geometry.width,q.geometry.width),l.geometry.height+=q.geometry.height,l.insert(q),p.push(q));g.getModel().beginUpdate();try{l=g.importCells([l],h.x,h.y)[0],g.fireEvent(new mxEventObject("cellsInserted", +"cells",[l].concat(l.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(l);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var l=function(a){var c=m[a];null==c&&(c=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,m[a]=c,w.push(c));return c},m={},w=[],k=0;k<b.length;k++)if(";"!=b[k].charAt(0)){var n=b[k].split("->");if(2<=n.length){var q=l(n[0]),D=l(n[n.length-1]),n=new mxCell(2<n.length?n[1]:"",new mxGeometry);n.edge=!0;q.insertEdge(n,!0);D.insertEdge(n, +!1);w.push(n)}}if(0<w.length){b=document.createElement("div");b.style.visibility="hidden";document.body.appendChild(b);g=new Graph(b);g.getModel().beginUpdate();try{w=g.importCells(w);for(k=0;k<w.length;k++)g.getModel().isVertex(w[k])&&(v=g.getPreferredSizeForCell(w[k]),w[k].geometry.width=Math.max(w[k].geometry.width,v.width),w[k].geometry.height=Math.max(w[k].geometry.height,v.height));p=new mxFastOrganicLayout(g);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays(); +p=[];a.editor.graph.getModel().beginUpdate();try{p=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),h.x,h.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",p))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(p[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();b.parentNode.removeChild(b)}}}function b(){return"list"==m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean": "table"==m.value?"CREATE TABLE Persons\n(\nPersonID int,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\n);":"plantUmlPng"==m.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":"plantUmlSvg"==m.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml": ";Example:\na->b\nb->edge label->c\nc->a\n"}var h=a.editor.graph.getFreeInsertPoint(),k=document.createElement("div");k.style.textAlign="right";var l=document.createElement("textarea");l.style.resize="none";l.style.width="100%";l.style.height="354px";l.style.marginBottom="16px";var m=document.createElement("select"),n=document.createElement("option");n.setAttribute("value","list");n.setAttribute("selected","selected");mxUtils.write(n,mxResources.get("list"));m.appendChild(n);n=document.createElement("option"); n.setAttribute("value","table");mxUtils.write(n,mxResources.get("table"));m.appendChild(n);n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));m.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+ mxResources.get("formatPng")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(m.appendChild(n),m.appendChild(c));var f=b();l.value=f;k.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){l.value=a.target.result}; -c.readAsText(a)}},!1));k.appendChild(m);mxEvent.addListener(m,"change",function(){var a=b();if(0==l.value.length||l.value==f)f=a,l.value=f});n=mxUtils.button(mxResources.get("close"),function(){l.value==f?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});n.className="geBtn";a.editor.cancelFirst&&k.appendChild(n);c=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(l.value,m.value)});k.appendChild(c);c.className="geBtn gePrimaryBtn";a.editor.cancelFirst|| -k.appendChild(n);this.container=k},NewDialog=function(a,e,d,b,h,k,l,m,n,c,f,g,p,u){function t(){for(var a=!0;E<V.length&&(a||0!=mxUtils.mod(E,30));)a=V[E++],B(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info),a=!1}function w(){if(S)a.hideDialog(),u(S,M,A.value);else if(b)d||a.hideDialog(),b(Q,A.value);else{var c=A.value;null!=c&&0<c.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)? -a.mode:null,function(b){a.createFile(c,Q,null!=P&&0<P.length?P:null,null,function(){a.hideDialog()},null,b)})}}function y(a,c,b,f,q){null!=O&&(O.style.backgroundColor="transparent",O.style.border="1px solid transparent");F.removeAttribute("disabled");Q=c;P=b;O=a;S=f;M=q;O.style.backgroundColor=m;O.style.border=n}function B(a,c,b,f,q,g,d){var e=document.createElement("div");e.className="geTemplate";e.style.height=L+"px";e.style.width=X+"px";null!=f&&0<f.length&&e.setAttribute("title",f);if(null!=g)e.style.backgroundImage= -"url("+g+")",e.style.backgroundSize="contain",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",mxEvent.addListener(e,"click",function(c){y(e,null,null,a,d)}),mxEvent.addListener(e,"dblclick",function(a){w()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);e.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(e,"click",function(b){F.setAttribute("disabled", -"disabled");e.style.backgroundColor="transparent";e.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(y(e,a.getText(),c),v&&w())}))});mxEvent.addListener(e,"dblclick",function(a){v=!0})}else e.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(b)+"</td></tr></table>",q&&y(e),mxEvent.addListener(e,"click",function(a){y(e)}),mxEvent.addListener(e,"dblclick",function(a){w()}); -J.appendChild(e)}function q(){mxEvent.addListener(J,"scroll",function(a){J.scrollTop+J.clientHeight>=J.scrollHeight&&(t(),mxEvent.consume(a))});var a=null,b;for(b in N){var f=document.createElement("div"),q=mxResources.get(b),g=N[b];null==q&&(q=b.substring(0,1).toUpperCase()+b.substring(1));18<q.length&&(q=q.substring(0,18)+"…");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";f.setAttribute("title",q+" ("+ -g.length+")");mxUtils.write(f,f.getAttribute("title"));null!=c&&(f.style.padding=c);T.appendChild(f);null==a&&(a=f,a.style.backgroundColor=l);(function(c,b){mxEvent.addListener(f,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,J.scrollTop=0,J.innerHTML="",E=0,V=N[c],H=null,t())})})(b,f)}t()}d=null!=d?d:!0;h=null!=h?h:!1;l=null!=l?l:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:TEMPLATE_PATH+"/index.xml";var v=document.createElement("div"); -v.style.height="100%";var x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="46px";d&&v.appendChild(x);var z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.width="40px";z.style.height="40px";z.style.marginRight="10px";z.style.paddingBottom="4px";z.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg": -a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!e&&d&&x.appendChild(z);d&&mxUtils.write(x,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");z=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?z=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?z=a.dropbox.extension: -a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?z=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?z=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(z=a.trello.extension);var A=document.createElement("input");A.setAttribute("value",a.defaultFilename+z);A.style.marginRight="20px";A.style.marginLeft="10px";A.style.width=e?"220px":"430px";this.init=function(){d&&(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?A.select():document.execCommand("selectAll", -!1,null))};d&&x.appendChild(A);var x=!1,E=0,F=mxUtils.button(mxResources.get("create"),function(){w()});F.className="geBtn gePrimaryBtn";if(g||p){var D=[],H=null,C=function(a){F.setAttribute("disabled","disabled");for(var c=0;c<D.length;c++)D[c].className=c==a?"geBtn gePrimaryBtn":"geBtn"},x=!0,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";v.appendChild(z);var G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){T.style.display="";J.style.left= -"160px";C(0);J.scrollTop=0;J.innerHTML="";E=0;H!=V&&(V=H,t(),H=null)});D.push(G);z.appendChild(G);var I=function(a){T.style.display="none";J.style.left="30px";C(a?-1:1);null==H&&(H=V);J.scrollTop=0;J.innerHTML="";var c=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});c.spin(J);E=0;var b=function(a,b){c.stop();V=a;b?J.innerHTML=b:0==a.length?J.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(J.innerHTML= -"",t())};a?p(K.value,b):g(b)};g&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){I()}),z.appendChild(G),D.push(G));if(p){G=document.createElement("span");G.style.marginLeft="10px";G.innerHTML=mxResources.get("search")+":";z.appendChild(G);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&I(!0)});z.appendChild(K);G=mxUtils.button(mxResources.get("search"), -function(){I(!0)});G.className="geBtn";z.appendChild(G)}C(0)}var P=null,Q=null,O=null,S=null,M=null,J=document.createElement("div");J.style.border="1px solid #d3d3d3";J.style.position="absolute";J.style.left="160px";J.style.right="34px";x=(d?72:40)+(x?30:0);J.style.top=x+"px";J.style.bottom="68px";J.style.margin="6px 0 0 -1px";J.style.padding="6px";J.style.overflow="auto";var T=document.createElement("div");T.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;"; -var L=140,X=140,N={},Y=1;N.basic=[{title:"blankDiagram",select:!0}];var V=N.basic;if(!e){v.appendChild(T);v.appendChild(J);var U=!1;mxUtils.get(f,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var c=a.getAttribute("url");if(null!=c){var b=c.indexOf("/"),c=c.substring(0,b),b=N[c];null==b&&(Y++,b=[],N[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a= -a.nextSibling}q()}})}mxEvent.addListener(A,"keypress",function(a){13==a.keyCode&&w()});f=document.createElement("div");f.style.marginTop=e?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";x=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});x.className="geBtn";!a.editor.cancelFirst||h&&null==k||f.appendChild(x);e||a.isOffline()||!d||null!=b||h||(z=mxUtils.button(mxResources.get("help"), -function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",f.appendChild(z));e||"1"==urlParams.embed||h||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(a,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(A.value)+"&create="+encodeURIComponent(c)),null==a.getCurrentFile()?window.location.href=c:window.openWindow(c))}, -mxResources.get("url"));a.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",f.appendChild(e));f.appendChild(F);a.editor.cancelFirst||null!=b||h&&null==k||f.appendChild(x);v.appendChild(f);this.container=v},CreateDialog=function(a,e,d,b,h,k,l,m,n,c,f,g,p,u,t){function w(c,b,f,q){function d(){mxEvent.addListener(u,"click",function(){var c=f;if(l){var b=v.value,q=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>q){var c=null!=c?c:A.value,g="";c==App.MODE_GOOGLE?g=a.drive.extension:c== -App.MODE_GITHUB?g=a.gitHub.extension:c==App.MODE_TRELLO?g=a.trello.extension:c==App.MODE_DROPBOX?g=a.dropbox.extension:c==App.MODE_ONEDRIVE?g=a.oneDrive.extension:c==App.MODE_DEVICE&&(g=".xml");0<=q&&(b=b.substring(0,q));v.value=b+g}}y(f)})}var u=document.createElement("a");u.style.overflow="hidden";var p=document.createElement("img");p.src=c;p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.style.paddingBottom="6px";u.style.display=mxClient.IS_QUIRKS? -"inline":"inline-block";u.className="geBaseButton";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 8px 10px 8px";u.style.whiteSpace="nowrap";u.appendChild(p);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");u.style.color="gray";u.style.fontSize="11px";var h=document.createElement("div");u.appendChild(h);mxUtils.write(h,b);if(null!=q&&null==a[q]){p.style.visibility="hidden";mxUtils.setOpacity(h,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0, -color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(u);var B=window.setTimeout(function(){null==a[q]&&(t.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[q]&&(window.clearTimeout(B),mxUtils.setOpacity(h,100),p.style.visibility="",t.stop(),d())}))}else d();x.appendChild(u);++z==g&&(mxUtils.br(x),z=0)}function y(c){var b=v.value;if(null==c||null!=b&&0<b.length)a.hideDialog(),d(b,c)}l=null!=l?l:!0;m=null!=m?m:!0;g=null!= -g?g:4;var B=document.createElement("div");null==b&&a.addLanguageMenu(B);var q=document.createElement("h2");mxUtils.write(q,h||mxResources.get("create"));q.style.marginTop="0px";q.style.marginBottom="24px";B.appendChild(q);mxUtils.write(B,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",e);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? -v.select():document.execCommand("selectAll",!1,null)};B.appendChild(v);null!=p&&null!=u&&"image/"==u.substring(0,6)&&(v.style.width="160px",h=null,"image/svg+xml"==u&&mxClient.IS_SVG?(h=document.createElement("div"),h.innerHTML=mxUtils.trim(p),p=h.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),t=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+u+" "+t),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(h=document.createElement("img"),h.setAttribute("src", -"data:"+u+(t?";base64,":";utf8,")+p)),h.style.position="absolute",h.style.top="70px",h.style.right="100px",h.style.maxWidth="120px",h.style.maxHeight="80px",mxUtils.setPrefixedStyle(h.style,"transform","translate(50%,-50%)"),B.appendChild(h),n&&(h.style.cursor="pointer",mxEvent.addListener(h,"click",function(){y("_blank")})));mxUtils.br(B);var x=document.createElement("div");x.style.textAlign="center";var z=0;x.style.marginTop="6px";B.appendChild(x);var A=document.createElement("select");A.style.marginLeft= -"10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(h,mxResources.get("googleDrive")),A.appendChild(h),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(h,mxResources.get("oneDrive")),A.appendChild(h),a.mode== -App.MODE_ONEDRIVE&&h.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(h,mxResources.get("dropbox")),A.appendChild(h),a.mode==App.MODE_DROPBOX&&h.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(h= -document.createElement("option"),h.setAttribute("value",App.MODE_GITHUB),mxUtils.write(h,mxResources.get("github")),A.appendChild(h),w(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_TRELLO),mxUtils.write(h,mxResources.get("trello")),A.appendChild(h),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage|| -null!=a.getCurrentFile()&&!mxClient.IS_IOS)h=document.createElement("option"),h.setAttribute("value",App.MODE_DEVICE),mxUtils.write(h,mxResources.get("device")),A.appendChild(h),a.mode!=App.MODE_DEVICE&&m||h.setAttribute("selected","selected"),f&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_BROWSER),mxUtils.write(m,mxResources.get("browser")),A.appendChild(m), -a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="right";null!=c&&(h=mxUtils.button(mxResources.get("help"),function(){a.openLink(c)}),h.className="geBtn",m.appendChild(h));h=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});h.className= -"geBtn";a.editor.cancelFirst&&m.appendChild(h);null==b&&(p=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),p.className="geBtn",m.appendChild(p));n&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),n.className="geBtn",m.appendChild(n));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){y(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",m.appendChild(k));a.editor.cancelFirst||m.appendChild(h);mxEvent.addListener(v, -"keypress",function(c){13==c.keyCode?y(App.MODE_DEVICE):27==c.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});B.appendChild(m);this.container=B},PopupDialog=function(a,e,d,b,h){h=null!=h?h:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var l=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=b&&b()});l.className="geBtn";l.style.marginBottom="8px";l.style.width= -"280px";k.appendChild(l);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){h&&a.hideDialog();null!=d&&d();a.openLink(e)});m.className="geBtn gePrimaryBtn";m.style.width=l.style.width;k.appendChild(m);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,e,d,b,h,k){k=null!=k?k:!0;var l=a.editor.graph,m=document.createElement("div");mxUtils.write(m,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor= -"transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var n=document.createElement("input");n.setAttribute("value",d);n.setAttribute("type","text");n.setAttribute("spellcheck","false");n.setAttribute("autocorrect","off");n.setAttribute("autocomplete","off");n.setAttribute("autocapitalize","off");n.style.marginTop="6px";n.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS? -20:-20)+"px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+ -a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){n.value="";n.focus()});e.appendChild(n);e.appendChild(d);m.appendChild(e);var c=function(c,f,g){var e="data:"==c.substring(0,5);!a.isOffline()||e&&"undefined"===typeof chrome?0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(e){a.spinner.stop();a.hideDialog();var q=null!=f&&null!=g?Math.max(f/e.width,g/e.height):Math.min(1,Math.min(520/e.width,520/e.height));k&&(c=a.convertDataUri(c)); -b(c,Math.round(Number(e.width)*q),Math.round(Number(e.height)*q))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),f=null==f?120:f,g=null==g?100:g,a.hideDialog(),b(c,f,g))},f=function(f){if(null!=f){var g=h?null:l.getModel().getGeometry(l.getSelectionCell());null!=g?c(f,g.width,g.height):c(f)}else a.hideDialog(),b(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder", +c.readAsText(a)}},!1));k.appendChild(m);mxEvent.addListener(m,"change",function(){var a=b();if(0==l.value.length||l.value==f)f=a,l.value=f});n=mxUtils.button(mxResources.get("close"),function(){l.value==f?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});n.className="geBtn";a.editor.cancelFirst&&k.appendChild(n);c=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();e(l.value,m.value)});k.appendChild(c);c.className="geBtn gePrimaryBtn";a.editor.cancelFirst|| +k.appendChild(n);this.container=k},NewDialog=function(a,d,e,b,h,k,l,m,n,c,f,g,q,u){function t(){for(var a=!0;I<V.length&&(a||0!=mxUtils.mod(I,30));)a=V[I++],v(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info),a=!1}function x(){if(S)a.hideDialog(),u(S,M,A.value);else if(b)e||a.hideDialog(),b(Q,A.value);else{var c=A.value;null!=c&&0<c.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)? +a.mode:null,function(b){a.createFile(c,Q,null!=P&&0<P.length?P:null,null,function(){a.hideDialog()},null,b)})}}function z(a,c,b,f,p){null!=O&&(O.style.backgroundColor="transparent",O.style.border="1px solid transparent");E.removeAttribute("disabled");Q=c;P=b;O=a;S=f;M=p;O.style.backgroundColor=m;O.style.border=n}function v(a,c,b,f,p,g,e){var d=document.createElement("div");d.className="geTemplate";d.style.height=L+"px";d.style.width=X+"px";null!=f&&0<f.length&&d.setAttribute("title",f);if(null!=g)d.style.backgroundImage= +"url("+g+")",d.style.backgroundSize="contain",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",mxEvent.addListener(d,"click",function(c){z(d,null,null,a,e)}),mxEvent.addListener(d,"dblclick",function(a){x()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);d.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var u=!1;mxEvent.addListener(d,"click",function(b){E.setAttribute("disabled", +"disabled");d.style.backgroundColor="transparent";d.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(z(d,a.getText(),c),u&&x())}))});mxEvent.addListener(d,"dblclick",function(a){u=!0})}else d.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(b)+"</td></tr></table>",p&&z(d),mxEvent.addListener(d,"click",function(a){z(d)}),mxEvent.addListener(d,"dblclick",function(a){x()}); +J.appendChild(d)}function p(){mxEvent.addListener(J,"scroll",function(a){J.scrollTop+J.clientHeight>=J.scrollHeight&&(t(),mxEvent.consume(a))});var a=null,b;for(b in N){var f=document.createElement("div"),p=mxResources.get(b),g=N[b];null==p&&(p=b.substring(0,1).toUpperCase()+b.substring(1));18<p.length&&(p=p.substring(0,18)+"…");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";f.setAttribute("title",p+" ("+ +g.length+")");mxUtils.write(f,f.getAttribute("title"));null!=c&&(f.style.padding=c);T.appendChild(f);null==a&&(a=f,a.style.backgroundColor=l);(function(c,b){mxEvent.addListener(f,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,J.scrollTop=0,J.innerHTML="",I=0,V=N[c],G=null,t())})})(b,f)}t()}e=null!=e?e:!0;h=null!=h?h:!1;l=null!=l?l:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:TEMPLATE_PATH+"/index.xml";var w=document.createElement("div"); +w.style.height="100%";var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="46px";e&&w.appendChild(y);var B=document.createElement("img");B.setAttribute("border","0");B.setAttribute("align","absmiddle");B.style.width="40px";B.style.height="40px";B.style.marginRight="10px";B.style.paddingBottom="4px";B.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg": +a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!d&&e&&y.appendChild(B);e&&mxUtils.write(y,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");B=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?B=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?B=a.dropbox.extension: +a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?B=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?B=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(B=a.trello.extension);var A=document.createElement("input");A.setAttribute("value",a.defaultFilename+B);A.style.marginRight="20px";A.style.marginLeft="10px";A.style.width=d?"220px":"430px";this.init=function(){e&&(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?A.select():document.execCommand("selectAll", +!1,null))};e&&y.appendChild(A);var y=!1,I=0,E=mxUtils.button(mxResources.get("create"),function(){x()});E.className="geBtn gePrimaryBtn";if(g||q){var D=[],G=null,C=function(a){E.setAttribute("disabled","disabled");for(var c=0;c<D.length;c++)D[c].className=c==a?"geBtn gePrimaryBtn":"geBtn"},y=!0,B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="30px";w.appendChild(B);var F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){T.style.display="";J.style.left= +"160px";C(0);J.scrollTop=0;J.innerHTML="";I=0;G!=V&&(V=G,t(),G=null)});D.push(F);B.appendChild(F);var H=function(a){T.style.display="none";J.style.left="30px";C(a?-1:1);null==G&&(G=V);J.scrollTop=0;J.innerHTML="";var c=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});c.spin(J);I=0;var b=function(a,b){c.stop();V=a;b?J.innerHTML=b:0==a.length?J.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(J.innerHTML= +"",t())};a?q(K.value,b):g(b)};g&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){H()}),B.appendChild(F),D.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerHTML=mxResources.get("search")+":";B.appendChild(F);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&H(!0)});B.appendChild(K);F=mxUtils.button(mxResources.get("search"), +function(){H(!0)});F.className="geBtn";B.appendChild(F)}C(0)}var P=null,Q=null,O=null,S=null,M=null,J=document.createElement("div");J.style.border="1px solid #d3d3d3";J.style.position="absolute";J.style.left="160px";J.style.right="34px";y=(e?72:40)+(y?30:0);J.style.top=y+"px";J.style.bottom="68px";J.style.margin="6px 0 0 -1px";J.style.padding="6px";J.style.overflow="auto";var T=document.createElement("div");T.style.cssText="position:absolute;left:30px;width:128px;top:"+y+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;"; +var L=140,X=140,N={},Y=1;N.basic=[{title:"blankDiagram",select:!0}];var V=N.basic;if(!d){w.appendChild(T);w.appendChild(J);var U=!1;mxUtils.get(f,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var c=a.getAttribute("url");if(null!=c){var b=c.indexOf("/"),c=c.substring(0,b),b=N[c];null==b&&(Y++,b=[],N[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a= +a.nextSibling}p()}})}mxEvent.addListener(A,"keypress",function(a){13==a.keyCode&&x()});f=document.createElement("div");f.style.marginTop=d?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";y=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});y.className="geBtn";!a.editor.cancelFirst||h&&null==k||f.appendChild(y);d||a.isOffline()||!e||null!=b||h||(B=mxUtils.button(mxResources.get("help"), +function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),B.className="geBtn",f.appendChild(B));d||"1"==urlParams.embed||h||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(a,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(A.value)+"&create="+encodeURIComponent(c)),null==a.getCurrentFile()?window.location.href=c:window.openWindow(c))}, +mxResources.get("url"));a.showDialog(c.container,300,80,!0,!0);c.init()}),d.className="geBtn",f.appendChild(d));f.appendChild(E);a.editor.cancelFirst||null!=b||h&&null==k||f.appendChild(y);w.appendChild(f);this.container=w},CreateDialog=function(a,d,e,b,h,k,l,m,n,c,f,g,q,u,t){function x(c,b,f,p){function e(){mxEvent.addListener(u,"click",function(){var c=f;if(l){var b=w.value,p=b.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>p){var c=null!=c?c:A.value,g="";c==App.MODE_GOOGLE?g=a.drive.extension:c== +App.MODE_GITHUB?g=a.gitHub.extension:c==App.MODE_TRELLO?g=a.trello.extension:c==App.MODE_DROPBOX?g=a.dropbox.extension:c==App.MODE_ONEDRIVE?g=a.oneDrive.extension:c==App.MODE_DEVICE&&(g=".xml");0<=p&&(b=b.substring(0,p));w.value=b+g}}z(f)})}var u=document.createElement("a");u.style.overflow="hidden";var h=document.createElement("img");h.src=c;h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="60px";h.style.height="60px";h.style.paddingBottom="6px";u.style.display=mxClient.IS_QUIRKS? +"inline":"inline-block";u.className="geBaseButton";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 8px 10px 8px";u.style.whiteSpace="nowrap";u.appendChild(h);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");u.style.color="gray";u.style.fontSize="11px";var v=document.createElement("div");u.appendChild(v);mxUtils.write(v,b);if(null!=p&&null==a[p]){h.style.visibility="hidden";mxUtils.setOpacity(v,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0, +color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(u);var q=window.setTimeout(function(){null==a[p]&&(t.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(q),mxUtils.setOpacity(v,100),h.style.visibility="",t.stop(),e())}))}else e();y.appendChild(u);++B==g&&(mxUtils.br(y),B=0)}function z(c){var b=w.value;if(null==c||null!=b&&0<b.length)a.hideDialog(),e(b,c)}l=null!=l?l:!0;m=null!=m?m:!0;g=null!= +g?g:4;var v=document.createElement("div");null==b&&a.addLanguageMenu(v);var p=document.createElement("h2");mxUtils.write(p,h||mxResources.get("create"));p.style.marginTop="0px";p.style.marginBottom="24px";v.appendChild(p);mxUtils.write(v,mxResources.get("filename")+":");var w=document.createElement("input");w.setAttribute("value",d);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? +w.select():document.execCommand("selectAll",!1,null)};v.appendChild(w);null!=q&&null!=u&&"image/"==u.substring(0,6)&&(w.style.width="160px",h=null,"image/svg+xml"==u&&mxClient.IS_SVG?(h=document.createElement("div"),h.innerHTML=mxUtils.trim(q),q=h.getElementsByTagName("svg")[0],u=parseInt(q.getAttribute("width")),t=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+u+" "+t),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(h=document.createElement("img"),h.setAttribute("src", +"data:"+u+(t?";base64,":";utf8,")+q)),h.style.position="absolute",h.style.top="70px",h.style.right="100px",h.style.maxWidth="120px",h.style.maxHeight="80px",mxUtils.setPrefixedStyle(h.style,"transform","translate(50%,-50%)"),v.appendChild(h),n&&(h.style.cursor="pointer",mxEvent.addListener(h,"click",function(){z("_blank")})));mxUtils.br(v);var y=document.createElement("div");y.style.textAlign="center";var B=0;y.style.marginTop="6px";v.appendChild(y);var A=document.createElement("select");A.style.marginLeft= +"10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(h,mxResources.get("googleDrive")),A.appendChild(h),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(h,mxResources.get("oneDrive")),A.appendChild(h),a.mode== +App.MODE_ONEDRIVE&&h.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(h,mxResources.get("dropbox")),A.appendChild(h),a.mode==App.MODE_DROPBOX&&h.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(h= +document.createElement("option"),h.setAttribute("value",App.MODE_GITHUB),mxUtils.write(h,mxResources.get("github")),A.appendChild(h),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_TRELLO),mxUtils.write(h,mxResources.get("trello")),A.appendChild(h),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage|| +null!=a.getCurrentFile()&&!mxClient.IS_IOS)h=document.createElement("option"),h.setAttribute("value",App.MODE_DEVICE),mxUtils.write(h,mxResources.get("device")),A.appendChild(h),a.mode!=App.MODE_DEVICE&&m||h.setAttribute("selected","selected"),f&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_BROWSER),mxUtils.write(m,mxResources.get("browser")),A.appendChild(m), +a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="right";null!=c&&(h=mxUtils.button(mxResources.get("help"),function(){a.openLink(c)}),h.className="geBtn",m.appendChild(h));h=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});h.className= +"geBtn";a.editor.cancelFirst&&m.appendChild(h);null==b&&(q=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),q.className="geBtn",m.appendChild(q));n&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){z("_blank")}),n.className="geBtn",m.appendChild(n));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){z(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",m.appendChild(k));a.editor.cancelFirst||m.appendChild(h);mxEvent.addListener(w, +"keypress",function(c){13==c.keyCode?z(App.MODE_DEVICE):27==c.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});v.appendChild(m);this.container=v},PopupDialog=function(a,d,e,b,h){h=null!=h?h:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var l=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=b&&b()});l.className="geBtn";l.style.marginBottom="8px";l.style.width= +"280px";k.appendChild(l);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){h&&a.hideDialog();null!=e&&e();a.openLink(d)});m.className="geBtn gePrimaryBtn";m.style.width=l.style.width;k.appendChild(m);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,d,e,b,h,k){k=null!=k?k:!0;var l=a.editor.graph,m=document.createElement("div");mxUtils.write(m,d);d=document.createElement("div");d.className="geTitle";d.style.backgroundColor= +"transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";mxClient.IS_VML||(d.style.paddingRight="20px");var n=document.createElement("input");n.setAttribute("value",e);n.setAttribute("type","text");n.setAttribute("spellcheck","false");n.setAttribute("autocorrect","off");n.setAttribute("autocomplete","off");n.setAttribute("autocapitalize","off");n.style.marginTop="6px";n.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS? +20:-20)+"px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";e=document.createElement("div");e.setAttribute("title",mxResources.get("reset"));e.style.position="relative";e.style.left="-16px";e.style.width="12px";e.style.height="14px";e.style.cursor="pointer";e.style.display=mxClient.IS_VML?"inline":"inline-block";e.style.top=(mxClient.IS_VML?0:3)+"px";e.style.background="url('"+ +a.editor.transparentImage+"')";mxEvent.addListener(e,"click",function(){n.value="";n.focus()});d.appendChild(n);d.appendChild(e);m.appendChild(d);var c=function(c,f,g){var d="data:"==c.substring(0,5);!a.isOffline()||d&&"undefined"===typeof chrome?0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(d){a.spinner.stop();a.hideDialog();var p=null!=f&&null!=g?Math.max(f/d.width,g/d.height):Math.min(1,Math.min(520/d.width,520/d.height));k&&(c=a.convertDataUri(c)); +b(c,Math.round(Number(d.width)*p),Math.round(Number(d.height)*p))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),f=null==f?120:f,g=null==g?100:g,a.hideDialog(),b(c,f,g))},f=function(f){if(null!=f){var g=h?null:l.getModel().getGeometry(l.getSelectionCell());null!=g?c(f,g.width,g.height):c(f)}else a.hideDialog(),b(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder", mxResources.get("dragImagesHere"));var c=m.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files, -0,0,a.maxImageSize,function(a,c,b,g,e,d){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!mxEvent.isControlDown(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var g=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(g)&&f(decodeURIComponent(g))}c.stopPropagation();c.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign= -"right";e=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(n.value=a.url));n.focus()};if(Graph.fileSupport){var g=document.createElement("input");g.setAttribute("multiple","multiple");g.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(g, -"change",function(c){a.importFiles(g.files,0,0,a.maxImageSize,function(a,c,b,g,q,e){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0)});var p=mxUtils.button(mxResources.get("open"),function(){g.click()});p.className="geBtn";d.appendChild(p)}}document.createElement("canvas").getContext&&"data:image/"==n.value.substring(0,11)&&"data:image/svg"!=n.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var c=new CropImageDialog(a, -n.value,function(a){n.value=a});a.showDialog(c.container,200,180,!0,!0);c.init()}),p.className="geBtn",d.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(p=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}), -p.className="geBtn",d.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD); -a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),p.className="geBtn",d.appendChild(p)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&f(n.value)});p=mxUtils.button(mxResources.get("apply"),function(){f(n.value)});p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(e);Graph.fileSupport&&(d.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.backgroundPosition= -"center 65%",m.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position="absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),m.appendChild(e));m.appendChild(d);this.container=m},LinkDialog=function(a,e,d,b,h){function k(a,c,b){b=mxUtils.button("",b);b.className="geBtn";b.setAttribute("title",c);c=document.createElement("img");c.style.height="26px"; -c.style.width="26px";c.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";b.appendChild(c);y.appendChild(b)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";mxClient.IS_VML||(m.style.paddingRight="20px");var n=document.createElement("input"); +0,0,a.maxImageSize,function(a,c,b,g,d,e){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!mxEvent.isControlDown(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var g=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(g)&&f(decodeURIComponent(g))}c.stopPropagation();c.preventDefault()}),!1)}};e=document.createElement("div");e.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";e.style.textAlign= +"right";d=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&e.appendChild(d);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(n.value=a.url));n.focus()};if(Graph.fileSupport){var g=document.createElement("input");g.setAttribute("multiple","multiple");g.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(g, +"change",function(c){a.importFiles(g.files,0,0,a.maxImageSize,function(a,c,b,g,p,d){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){g.click()});q.className="geBtn";e.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==n.value.substring(0,11)&&"data:image/svg"!=n.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var c=new CropImageDialog(a, +n.value,function(a){n.value=a});a.showDialog(c.container,200,180,!0,!0);c.init()}),q.className="geBtn",e.appendChild(q));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(q=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}), +q.className="geBtn",e.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&(q=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD); +a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),q.className="geBtn",e.appendChild(q)));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&f(n.value)});q=mxUtils.button(mxResources.get("apply"),function(){f(n.value)});q.className="geBtn gePrimaryBtn";e.appendChild(q);a.editor.cancelFirst||e.appendChild(d);Graph.fileSupport&&(e.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.backgroundPosition= +"center 65%",m.style.backgroundRepeat="no-repeat",d=document.createElement("div"),d.style.position="absolute",d.style.width="420px",d.style.top="58%",d.style.textAlign="center",d.style.fontSize="18px",d.style.color="#a0c3ff",mxUtils.write(d,mxResources.get("dragImagesHere")),m.appendChild(d));m.appendChild(e);this.container=m},LinkDialog=function(a,d,e,b,h){function k(a,c,b){b=mxUtils.button("",b);b.className="geBtn";b.setAttribute("title",c);c=document.createElement("img");c.style.height="26px"; +c.style.width="26px";c.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";b.appendChild(c);z.appendChild(b)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";mxClient.IS_VML||(m.style.paddingRight="20px");var n=document.createElement("input"); n.setAttribute("placeholder",mxResources.get("dragUrlsHere"));n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="400px";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer"; c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){n.value="";n.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;"; -g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="380px";if(h&&null!=a.pages){null!=e&&a.editor.graph.isPageLink(e)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(n.setAttribute("value",e),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.style.width="380px";m.appendChild(f);m.appendChild(n);m.appendChild(c);mxUtils.br(m);m.appendChild(g);h=!1;for(c=0;c<a.pages.length;c++){var u= -document.createElement("option");mxUtils.write(u,a.pages[c].getName()||mxResources.get("pageWithNumber",[c+1]));u.setAttribute("value","data:page/id,"+a.pages[c].getId());e==u.getAttribute("value")&&(u.setAttribute("selected","selected"),h=!0);p.appendChild(u)}if(!h&&g.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");p.appendChild(t);mxEvent.addListener(p, -"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}m.appendChild(p)}else n.setAttribute("value",e),m.appendChild(n),m.appendChild(c);l.appendChild(m);var w=mxUtils.button(d,function(){a.hideDialog();b(g.checked?"pageNotFound"!==p.value?p.value:e:n.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){g.checked?p.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? -n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){f.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(n,"focus",function(){g.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var c=l.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover", -mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div"); -y.style.marginTop="20px";y.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&y.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var c=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(c=DriveClient.prototype.oldAppHostname,c= +g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");var q=document.createElement("select");q.style.width="380px";if(h&&null!=a.pages){null!=d&&a.editor.graph.isPageLink(d)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(n.setAttribute("value",d),f.setAttribute("checked","checked"),f.defaultChecked=!0);n.style.width="380px";m.appendChild(f);m.appendChild(n);m.appendChild(c);mxUtils.br(m);m.appendChild(g);h=!1;for(c=0;c<a.pages.length;c++){var u= +document.createElement("option");mxUtils.write(u,a.pages[c].getName()||mxResources.get("pageWithNumber",[c+1]));u.setAttribute("value","data:page/id,"+a.pages[c].getId());d==u.getAttribute("value")&&(u.setAttribute("selected","selected"),h=!0);q.appendChild(u)}if(!h&&g.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");q.appendChild(t);mxEvent.addListener(q, +"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}m.appendChild(q)}else n.setAttribute("value",d),m.appendChild(n),m.appendChild(c);l.appendChild(m);var x=mxUtils.button(e,function(){a.hideDialog();b(g.checked?"pageNotFound"!==q.value?q.value:d:n.value,LinkDialog.selectedDocs)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?q.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? +n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){f.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(n,"focus",function(){g.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var c=l.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover", +mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,x.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div"); +z.style.marginTop="20px";z.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.style.verticalAlign="middle";e.className="geBtn";a.editor.cancelFirst&&z.appendChild(e);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var c=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(c=DriveClient.prototype.oldAppHostname,c= "https://"+c+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(c=DriveClient.prototype.newAppHostname,c="https://"+c+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(c="https://drive.google.com/#folders/"+a.docs[0].id);n.value=c;n.focus()}else LinkDialog.selectedDocs=null;n.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg", mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var c=gapi.auth.getToken().access_token,b=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0), c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(b).addView(f).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&c.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD); a.linkPicker=c.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){n.value=a[0].link;n.focus()}})});null!=a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,c){n.value=c.value[0].webUrl; -n.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var c=a[0],b=a[1],f=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+c+"/"+b+"/blob/"+f+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),b(g.checked?p.value:n.value,LinkDialog.selectedDocs))});y.appendChild(w);a.editor.cancelFirst||y.appendChild(d);l.appendChild(y);this.container= -l},AboutDialog=function(a){var e=document.createElement("div");e.style.marginTop="6px";e.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+ -"/logo-flat.png"));e.appendChild(d);mxUtils.br(e);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";e.appendChild(d);mxUtils.br(e);mxUtils.br(e);d=document.createElement("small");d.style.color="#505050";d.innerHTML='© 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';e.appendChild(d);mxEvent.addListener(e,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container= -e},FeedbackDialog=function(a){var e=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");e.appendChild(d);var b=document.createElement("input");b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var h=mxUtils.button(mxResources.get("sendMessage"), +n.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var c=a[0],b=a[1],f=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+c+"/"+b+"/blob/"+f+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),b(g.checked?q.value:n.value,LinkDialog.selectedDocs))});z.appendChild(x);a.editor.cancelFirst||z.appendChild(e);l.appendChild(z);this.container= +l},AboutDialog=function(a){var d=document.createElement("div");d.style.marginTop="6px";d.setAttribute("align","center");var e=document.createElement("img");e.style.border="0px";mxClient.IS_SVG?(e.setAttribute("width","164"),e.setAttribute("height","221"),e.style.width="164px",e.style.height="221px",e.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(e.setAttribute("width","176"),e.setAttribute("height","219"),e.style.width="170px",e.style.height="219px",e.setAttribute("src",IMAGE_PATH+ +"/logo-flat.png"));d.appendChild(e);mxUtils.br(d);e=document.createElement("small");e.innerHTML="v "+EditorUi.VERSION;e.style.color="#505050";d.appendChild(e);mxUtils.br(d);mxUtils.br(d);e=document.createElement("small");e.style.color="#505050";e.innerHTML='© 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';d.appendChild(e);mxEvent.addListener(d,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container= +d},FeedbackDialog=function(a){var d=document.createElement("div"),e=document.createElement("div");mxUtils.write(e,mxResources.get("sendYourFeedbackToDrawIo"));e.style.fontSize="18px";e.style.marginBottom="18px";d.appendChild(e);e=document.createElement("div");mxUtils.write(e,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");d.appendChild(e);var b=document.createElement("input");b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var h=mxUtils.button(mxResources.get("sendMessage"), function(){var c=(l.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;c.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(b.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+n.value+c), function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});h.className="geBtn gePrimaryBtn";h.setAttribute("disabled","disabled");var k=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(b,"change", -function(){0<b.value.length&&0<k.test(b.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&k.test(b.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});e.appendChild(b);this.init=function(){b.focus()};var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(l); -var m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(m);mxEvent.addListener(m,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));e.appendChild(d);var n=document.createElement("textarea");n.style.resize="none";n.style.width="600px";n.style.height="140px";n.style.marginTop="6px";n.setAttribute("placeholder",mxResources.get("commentsNotes")); -e.appendChild(n);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(h)):(d.appendChild(h),d.appendChild(m));e.appendChild(d);this.container=e};FeedbackDialog.maxAttachmentSize=1E6; -var RevisionDialog=function(a,e,d){var b=document.createElement("div"),h=document.createElement("h3");h.style.marginTop="0px";mxUtils.write(h,mxResources.get("revisionHistory"));b.appendChild(h);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";b.appendChild(k);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height= +function(){0<b.value.length&&0<k.test(b.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&k.test(b.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});d.appendChild(b);this.init=function(){b.focus()};var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;e=document.createElement("p");e.style.marginTop="14px";e.appendChild(l); +var m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));e.appendChild(m);mxEvent.addListener(m,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});d.appendChild(e);e=document.createElement("div");mxUtils.write(e,mxResources.get("feedback"));d.appendChild(e);var n=document.createElement("textarea");n.style.resize="none";n.style.width="600px";n.style.height="140px";n.style.marginTop="6px";n.setAttribute("placeholder",mxResources.get("commentsNotes")); +d.appendChild(n);e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(e.appendChild(m),e.appendChild(h)):(e.appendChild(h),e.appendChild(m));d.appendChild(e);this.container=d};FeedbackDialog.maxAttachmentSize=1E6; +var RevisionDialog=function(a,d,e){var b=document.createElement("div"),h=document.createElement("h3");h.style.marginTop="0px";mxUtils.write(h,mxResources.get("revisionHistory"));b.appendChild(h);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";b.appendChild(k);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height= "376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);b.appendChild(l);var m=new Graph(l);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var n=0,c=null,f=0,g=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=c&&null!=c[f]?c[f].getAttribute("name"):"pagenumber"==a?f+1:g.apply(this,arguments)};m.getLinkForCell=function(){return null};Editor.MathJaxRender&& -m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,b){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),t=null,w=null,y=null,B=null,q=mxUtils.button("",function(){null!=y&&m.zoomIn()});q.className="geSprite geSprite-zoomin";q.setAttribute("title",mxResources.get("zoomIn")); -q.style.outline="none";q.style.border="none";q.style.margin="2px";q.setAttribute("disabled","disabled");mxUtils.setOpacity(q,20);var v=mxUtils.button("",function(){null!=y&&m.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var x=mxUtils.button("",function(){null!=y&&(m.maxFitScale=8,m.fit(8),m.center())});x.className= -"geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var z=mxUtils.button("",function(){null!=y&&(m.zoomActual(),m.center())});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var A= -document.createElement("div");A.style.position="absolute";A.style.textAlign="right";A.style.color="gray";A.style.marginTop="10px";A.style.backgroundColor="transparent";A.style.top="440px";A.style.right="32px";A.style.maxWidth="380px";A.style.cursor="default";var E=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var c=a.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():a.defaultFilename,b=mxUtils.getXml(y.documentElement);a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"): -(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(a.editor.graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=B&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(B):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(c){a.spinner.stop(); -a.replaceFileData(B);a.hideDialog()},function(c){a.spinner.stop();a.editor.setStatus("");a.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)})})});F.className="geBtn";F.setAttribute("disabled","disabled");var D=document.createElement("select");D.setAttribute("disabled","disabled");D.style.maxWidth="80px";D.style.position="relative";D.style.top="-2px";D.style.verticalAlign="bottom";D.style.marginRight="6px";D.style.display="none";var H=null;mxEvent.addListener(D,"change",function(a){null!= -H&&(H(a),mxEvent.consume(a))});var C=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),window.openWindow(a.getUrl()))});C.className="geBtn";C.setAttribute("disabled","disabled");null!=d&&(C.style.display="none");var G=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl())});G.className="geBtn gePrimaryBtn";G.setAttribute("disabled", -"disabled");null!=d&&(G.style.display="none",F.className="geBtn gePrimaryBtn");h=document.createElement("div");h.style.position="absolute";h.style.top="482px";h.style.width="640px";h.style.textAlign="right";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.padding="2px";I.style.border="none";I.style.left="199px";I.style.top="442px";var K=null;if(null!=e&&0<e.length){l.style.cursor="move";var P=document.createElement("table");P.style.border= -"1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var Q=document.createElement("tbody"),O=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var S=e.length-1;0<=S;S--){var M=function(b){var g=new Date(b.modifiedDate),d=null;if(0<=g.getTime()){var h=function(b){p.stop();var e=mxUtils.parseXml(b),h=a.editor.extractGraphModel(e.documentElement,!0);if(null!=h){var t=function(c){null!=c&&(c= -k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c},k=function(a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";l.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};D.style.display="none";D.innerHTML="";y=e;B=b;c=parseSelectFunction=null;f=0;if("mxfile"==h.nodeName){e=h.getElementsByTagName("diagram");c=[];for(b=0;b<e.length;b++)c.push(e[b]); -f=Math.min(n,c.length-1);0<c.length&&t(c[f]);if(1<c.length)for(D.removeAttribute("disabled"),D.style.display="",b=0;b<c.length;b++)e=document.createElement("option"),mxUtils.write(e,c[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),e.setAttribute("value",b),b==f&&e.setAttribute("selected","selected"),D.appendChild(e);H=function(){f=n=parseInt(D.value);t(c[n])}}else k(h);A.innerHTML="";mxUtils.write(A,g.toLocaleDateString()+" "+g.toLocaleTimeString());A.setAttribute("title",d.getAttribute("title")); -q.removeAttribute("disabled");v.removeAttribute("disabled");x.removeAttribute("disabled");z.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),G.removeAttribute("disabled"),C.removeAttribute("disabled"));mxUtils.setOpacity(q,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(z,60)}else D.style.display="none",D.innerHTML="",A.innerHTML="",mxUtils.write(A,mxResources.get("errorLoadingFile"))}, -d=document.createElement("tr");d.style.borderBottom="1px solid lightGray";d.style.fontSize="12px";d.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==e[e.length-1]?mxUtils.write(k,mxResources.get("current")):g.toDateString()===O?mxUtils.write(k,g.toLocaleTimeString()):mxUtils.write(k,g.toLocaleDateString()+" "+g.toLocaleTimeString());d.appendChild(k);d.setAttribute("title",g.toLocaleDateString()+" "+g.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+ -(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(a){w!=b&&(p.stop(),null!=t&&(t.style.backgroundColor=""),w=b,t=d,t.style.backgroundColor="#ebf2f9",B=y=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",m.getModel().clear(),F.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),z.setAttribute("disabled", -"disabled"),x.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),mxUtils.setOpacity(q,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(z,20),p.spin(l),b.getXml(function(a){w==b&&h(a)},function(a){p.stop();D.style.display="none";D.innerHTML="";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(d,"dblclick",function(a){G.click(); -window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Q.appendChild(d)}return d}(e[S]);null!=M&&S==e.length-1&&(K=M)}P.appendChild(Q);k.appendChild(P)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(l.style.display="none",I.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(l.style.display="none",I.style.display="none",mxUtils.write(k, -mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";I.appendChild(D);I.appendChild(q);I.appendChild(v);I.appendChild(z);I.appendChild(x);a.editor.cancelFirst?(h.appendChild(k),h.appendChild(E),h.appendChild(C),h.appendChild(F),h.appendChild(G)):(h.appendChild(E),h.appendChild(C),h.appendChild(F),h.appendChild(G),h.appendChild(k));b.appendChild(h);b.appendChild(I);b.appendChild(A);this.container= -b},DraftDialog=function(a,e,d,b,h,k,l,m){var n=document.createElement("div"),c=document.createElement("div");c.style.marginTop="0px";c.style.whiteSpace="nowrap";c.style.overflow="auto";mxUtils.write(c,e);n.appendChild(c);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);n.appendChild(f);var g=new Graph(f); -g.setEnabled(!1);g.setPanning(!0);g.panningHandler.ignoreCell=!0;g.panningHandler.useLeftButtonForPanning=!0;g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;e=mxUtils.parseXml(d);var p=a.editor.extractGraphModel(e.documentElement,!0),u=0,t=null,w=g.getGlobalVariable;g.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[u]?t[u].getAttribute("name"):"pagenumber"==a?u+1:w.apply(this,arguments)};g.getLinkForCell=function(){return null};e=mxUtils.button("",function(){g.zoomIn()});e.className= -"geSprite geSprite-zoomin";e.setAttribute("title",mxResources.get("zoomIn"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){g.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);c=mxUtils.button("",function(){g.maxFitScale=8;g.fit(8);g.center()});c.className="geSprite geSprite-fit";c.setAttribute("title", -mxResources.get("fit"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);var y=mxUtils.button("",function(){g.zoomActual();g.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";mxUtils.setOpacity(y,60);h=mxUtils.button(l||mxResources.get("discard"),h);h.className="geBtn";var B=document.createElement("select");B.style.maxWidth="80px";B.style.position= -"relative";B.style.top="-2px";B.style.verticalAlign="bottom";B.style.marginRight="6px";B.style.display="none";b=mxUtils.button(k||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";l=document.createElement("div");l.className="geToolbarContainer";l.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;"; -this.init=function(){function c(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";f.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center()}}function b(b){null!=b&&(b=c(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(B,"change",function(a){u=parseInt(B.value);b(t[u]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var e=p.getElementsByTagName("diagram"); -t=[];for(var d=0;d<e.length;d++)t.push(e[d]);0<t.length&&b(t[u]);if(1<t.length)for(B.style.display="",d=0;d<t.length;d++)e=document.createElement("option"),mxUtils.write(e,t[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),e.setAttribute("value",d),d==u&&e.setAttribute("selected","selected"),B.appendChild(e)}else c(p)};l.appendChild(B);l.appendChild(e);l.appendChild(d);l.appendChild(y);l.appendChild(c);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.className= -"geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(k.appendChild(e),null!=m&&k.appendChild(m),k.appendChild(h),k.appendChild(b)):(k.appendChild(b),k.appendChild(h),null!=m&&k.appendChild(m),k.appendChild(e));n.appendChild(k);n.appendChild(l);this.container=n},FindWindow=function(a,e,d,b,h){function k(a,c,b){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var f=0;f<c.length;f++)if("label"!=c[f].nodeName){var g= -mxUtils.trim(c[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&g.substring(0,b.length)===b||null!=a&&a.test(g))return!0}}return!1}function l(){var a=n.model.getDescendants(n.model.getRoot()),b=p.value.toLowerCase(),g=u.checked?new RegExp(b):null,e=null;c!=b&&(c=b,f=null);var d=null==f;if(0<b.length)for(var h=0;h<a.length;h++){var l=n.view.getState(a[h]);if(null!=l&&null!=l.cell.value&&(d||null==e)&&(n.model.isVertex(l.cell)||n.model.isEdge(l.cell))&&(n.isHtmlLabel(l.cell)? -(t.innerHTML=n.getLabel(l.cell),label=mxUtils.extractTextWithWhitespace([t])):label=n.getLabel(l.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==g&&(label.substring(0,b.length)===b||k(g,l.cell,b))||null!=g&&(g.test(label)||k(g,l.cell,b))))if(d){e=l;break}else null==e&&(e=l);d=d||l==f}null!=e?(f=e,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=e} -var m=a.actions.get("find"),n=a.editor.graph,c=null,f=null,g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom="6px";p.style.width="170px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";g.appendChild(p);var u=document.createElement("input"); -u.setAttribute("type","checkbox");g.appendChild(u);mxUtils.write(g,mxResources.get("regularExpression"));var t=document.createElement("div");mxUtils.br(g);var w=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";c=f=null;p.focus()});w.setAttribute("title",mxResources.get("reset"));w.style.marginTop="6px";w.style.marginRight="4px";w.style.backgroundColor="#f5f5f5";w.style.backgroundImage="none";w.className="geBtn";g.appendChild(w);w=mxUtils.button(mxResources.get("find"), -function(){try{p.style.backgroundColor=l()?"":"#ffcfcf"}catch(y){a.handleError(y)}});w.setAttribute("title",mxResources.get("find")+" (Enter)");w.style.marginTop="6px";w.style.backgroundColor="#4d90fe";w.style.backgroundImage="none";w.className="geBtn gePrimaryBtn";g.appendChild(w);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(c!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=l()?"":"#ffcfcf"}catch(B){p.style.backgroundColor= -"#ffcfcf"}});mxEvent.addListener(g,"keydown",function(c){70==c.keyCode&&a.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});this.window=new mxWindow(mxResources.get("find"),g,e,d,b,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? -p.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},TagsWindow=function(a,e,d,b,h){function k(a){a=null!=a?a:m.model.getDescendants(m.model.getRoot());for(var c=f.value.split(" "),b=[],g=0;g<a.length;g++)if(m.model.isVertex(a[g])||m.model.isEdge(a[g])){var e=null!=a[g].value&&"object"==typeof a[g].value?mxUtils.trim(a[g].value.getAttribute(n)||""):"",q=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),d=0;d<c.length&&q;d++)var p=mxUtils.trim(c[d]).toLowerCase(),q=q&& -(0==p.length||0<=mxUtils.indexOf(e,p));else q=0==mxUtils.trim(f.value).length;q&&b.push(a[g])}return b}function l(a,c){m.model.beginUpdate();try{for(var b=0;b<a.length;b++)m.model.setVisible(a[b],c)}finally{m.model.endUpdate()}}var m=a.editor.graph,n="tags",c=document.createElement("div");c.style.userSelect="none";c.style.overflow="hidden";c.style.padding="10px";c.style.height="100%";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("allTags"));f.setAttribute("type", +m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,b){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),t=null,x=null,z=null,v=null,p=mxUtils.button("",function(){null!=z&&m.zoomIn()});p.className="geSprite geSprite-zoomin";p.setAttribute("title",mxResources.get("zoomIn")); +p.style.outline="none";p.style.border="none";p.style.margin="2px";p.setAttribute("disabled","disabled");mxUtils.setOpacity(p,20);var w=mxUtils.button("",function(){null!=z&&m.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var y=mxUtils.button("",function(){null!=z&&(m.maxFitScale=8,m.fit(8),m.center())});y.className= +"geSprite geSprite-fit";y.setAttribute("title",mxResources.get("fit"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var B=mxUtils.button("",function(){null!=z&&(m.zoomActual(),m.center())});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var A= +document.createElement("div");A.style.position="absolute";A.style.textAlign="right";A.style.color="gray";A.style.marginTop="10px";A.style.backgroundColor="transparent";A.style.top="440px";A.style.right="32px";A.style.maxWidth="380px";A.style.cursor="default";var I=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var c=a.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():a.defaultFilename,b=mxUtils.getXml(z.documentElement);a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"): +(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(a.editor.graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});I.className="geBtn";I.setAttribute("disabled","disabled");var E=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=v&&a.confirm(mxResources.get("areYouSure"),function(){null!=e?e(v):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(c){a.spinner.stop(); +a.replaceFileData(v);a.hideDialog()},function(c){a.spinner.stop();a.editor.setStatus("");a.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)})})});E.className="geBtn";E.setAttribute("disabled","disabled");var D=document.createElement("select");D.setAttribute("disabled","disabled");D.style.maxWidth="80px";D.style.position="relative";D.style.top="-2px";D.style.verticalAlign="bottom";D.style.marginRight="6px";D.style.display="none";var G=null;mxEvent.addListener(D,"change",function(a){null!= +G&&(G(a),mxEvent.consume(a))});var C=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),window.openWindow(a.getUrl()))});C.className="geBtn";C.setAttribute("disabled","disabled");null!=e&&(C.style.display="none");var F=mxUtils.button(mxResources.get("show"),function(){null!=x&&a.openLink(x.getUrl())});F.className="geBtn gePrimaryBtn";F.setAttribute("disabled", +"disabled");null!=e&&(F.style.display="none",E.className="geBtn gePrimaryBtn");h=document.createElement("div");h.style.position="absolute";h.style.top="482px";h.style.width="640px";h.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var K=null;if(null!=d&&0<d.length){l.style.cursor="move";var P=document.createElement("table");P.style.border= +"1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var Q=document.createElement("tbody"),O=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var S=d.length-1;0<=S;S--){var M=function(b){var g=new Date(b.modifiedDate),e=null;if(0<=g.getTime()){var h=function(b){q.stop();var d=mxUtils.parseXml(b),h=a.editor.extractGraphModel(d.documentElement,!0);if(null!=h){var t=function(c){null!=c&&(c= +k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c},k=function(a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";l.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};D.style.display="none";D.innerHTML="";z=d;v=b;c=parseSelectFunction=null;f=0;if("mxfile"==h.nodeName){d=h.getElementsByTagName("diagram");c=[];for(b=0;b<d.length;b++)c.push(d[b]); +f=Math.min(n,c.length-1);0<c.length&&t(c[f]);if(1<c.length)for(D.removeAttribute("disabled"),D.style.display="",b=0;b<c.length;b++)d=document.createElement("option"),mxUtils.write(d,c[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),d.setAttribute("value",b),b==f&&d.setAttribute("selected","selected"),D.appendChild(d);G=function(){f=n=parseInt(D.value);t(c[n])}}else k(h);A.innerHTML="";mxUtils.write(A,g.toLocaleDateString()+" "+g.toLocaleTimeString());A.setAttribute("title",e.getAttribute("title")); +p.removeAttribute("disabled");w.removeAttribute("disabled");y.removeAttribute("disabled");B.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&E.removeAttribute("disabled"),I.removeAttribute("disabled"),F.removeAttribute("disabled"),C.removeAttribute("disabled"));mxUtils.setOpacity(p,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(y,60);mxUtils.setOpacity(B,60)}else D.style.display="none",D.innerHTML="",A.innerHTML="",mxUtils.write(A,mxResources.get("errorLoadingFile"))}, +e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(k,mxResources.get("current")):g.toDateString()===O?mxUtils.write(k,g.toLocaleTimeString()):mxUtils.write(k,g.toLocaleDateString()+" "+g.toLocaleTimeString());e.appendChild(k);e.setAttribute("title",g.toLocaleDateString()+" "+g.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+ +(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){x!=b&&(q.stop(),null!=t&&(t.style.backgroundColor=""),x=b,t=e,t.style.backgroundColor="#ebf2f9",v=z=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",m.getModel().clear(),E.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),B.setAttribute("disabled", +"disabled"),y.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),mxUtils.setOpacity(p,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(B,20),q.spin(l),b.getXml(function(a){x==b&&h(a)},function(a){q.stop();D.style.display="none";D.innerHTML="";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){F.click(); +window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Q.appendChild(e)}return e}(d[S]);null!=M&&S==d.length-1&&(K=M)}P.appendChild(Q);k.appendChild(P)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(l.style.display="none",H.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(l.style.display="none",H.style.display="none",mxUtils.write(k, +mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";H.appendChild(D);H.appendChild(p);H.appendChild(w);H.appendChild(B);H.appendChild(y);a.editor.cancelFirst?(h.appendChild(k),h.appendChild(I),h.appendChild(C),h.appendChild(E),h.appendChild(F)):(h.appendChild(I),h.appendChild(C),h.appendChild(E),h.appendChild(F),h.appendChild(k));b.appendChild(h);b.appendChild(H);b.appendChild(A);this.container= +b},DraftDialog=function(a,d,e,b,h,k,l,m){var n=document.createElement("div"),c=document.createElement("div");c.style.marginTop="0px";c.style.whiteSpace="nowrap";c.style.overflow="auto";mxUtils.write(c,d);n.appendChild(c);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);n.appendChild(f);var g=new Graph(f); +g.setEnabled(!1);g.setPanning(!0);g.panningHandler.ignoreCell=!0;g.panningHandler.useLeftButtonForPanning=!0;g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;d=mxUtils.parseXml(e);var q=a.editor.extractGraphModel(d.documentElement,!0),u=0,t=null,x=g.getGlobalVariable;g.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[u]?t[u].getAttribute("name"):"pagenumber"==a?u+1:x.apply(this,arguments)};g.getLinkForCell=function(){return null};d=mxUtils.button("",function(){g.zoomIn()});d.className= +"geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);e=mxUtils.button("",function(){g.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);c=mxUtils.button("",function(){g.maxFitScale=8;g.fit(8);g.center()});c.className="geSprite geSprite-fit";c.setAttribute("title", +mxResources.get("fit"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);var z=mxUtils.button("",function(){g.zoomActual();g.center()});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";mxUtils.setOpacity(z,60);h=mxUtils.button(l||mxResources.get("discard"),h);h.className="geBtn";var v=document.createElement("select");v.style.maxWidth="80px";v.style.position= +"relative";v.style.top="-2px";v.style.verticalAlign="bottom";v.style.marginRight="6px";v.style.display="none";b=mxUtils.button(k||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";l=document.createElement("div");l.className="geToolbarContainer";l.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;"; +this.init=function(){function c(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";f.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,g.getModel());g.maxFitScale=1;g.fit(8);g.center()}}function b(b){null!=b&&(b=c(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(v,"change",function(a){u=parseInt(v.value);b(t[u]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var d=q.getElementsByTagName("diagram"); +t=[];for(var e=0;e<d.length;e++)t.push(d[e]);0<t.length&&b(t[u]);if(1<t.length)for(v.style.display="",e=0;e<t.length;e++)d=document.createElement("option"),mxUtils.write(d,t[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==u&&d.setAttribute("selected","selected"),v.appendChild(d)}else c(q)};l.appendChild(v);l.appendChild(d);l.appendChild(e);l.appendChild(z);l.appendChild(c);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.className= +"geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(k.appendChild(d),null!=m&&k.appendChild(m),k.appendChild(h),k.appendChild(b)):(k.appendChild(b),k.appendChild(h),null!=m&&k.appendChild(m),k.appendChild(d));n.appendChild(k);n.appendChild(l);this.container=n},FindWindow=function(a,d,e,b,h){function k(a,c,b){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var f=0;f<c.length;f++)if("label"!=c[f].nodeName){var g= +mxUtils.trim(c[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&g.substring(0,b.length)===b||null!=a&&a.test(g))return!0}}return!1}function l(){var a=n.model.getDescendants(n.model.getRoot()),b=q.value.toLowerCase(),g=u.checked?new RegExp(b):null,d=null;c!=b&&(c=b,f=null);var e=null==f;if(0<b.length)for(var h=0;h<a.length;h++){var l=n.view.getState(a[h]);if(null!=l&&null!=l.cell.value&&(e||null==d)&&(n.model.isVertex(l.cell)||n.model.isEdge(l.cell))&&(n.isHtmlLabel(l.cell)? +(t.innerHTML=n.getLabel(l.cell),label=mxUtils.extractTextWithWhitespace([t])):label=n.getLabel(l.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==g&&(label.substring(0,b.length)===b||k(g,l.cell,b))||null!=g&&(g.test(label)||k(g,l.cell,b))))if(e){d=l;break}else null==d&&(d=l);e=e||l==f}null!=d?(f=d,n.scrollCellToVisible(f.cell),n.isEnabled()?n.setSelectionCell(f.cell):n.highlightCell(f.cell)):n.isEnabled()&&n.clearSelection();return 0==b.length||null!=d} +var m=a.actions.get("find"),n=a.editor.graph,c=null,f=null,g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width="170px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";g.appendChild(q);var u=document.createElement("input"); +u.setAttribute("type","checkbox");g.appendChild(u);mxUtils.write(g,mxResources.get("regularExpression"));var t=document.createElement("div");mxUtils.br(g);var x=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";c=f=null;q.focus()});x.setAttribute("title",mxResources.get("reset"));x.style.marginTop="6px";x.style.marginRight="4px";x.style.backgroundColor="#f5f5f5";x.style.backgroundImage="none";x.className="geBtn";g.appendChild(x);x=mxUtils.button(mxResources.get("find"), +function(){try{q.style.backgroundColor=l()?"":"#ffcfcf"}catch(z){a.handleError(z)}});x.setAttribute("title",mxResources.get("find")+" (Enter)");x.style.marginTop="6px";x.style.backgroundColor="#4d90fe";x.style.backgroundImage="none";x.className="geBtn gePrimaryBtn";g.appendChild(x);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(c!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=l()?"":"#ffcfcf"}catch(v){q.style.backgroundColor= +"#ffcfcf"}});mxEvent.addListener(g,"keydown",function(c){70==c.keyCode&&a.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});this.window=new mxWindow(mxResources.get("find"),g,d,e,b,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS? +q.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},TagsWindow=function(a,d,e,b,h){function k(a){a=null!=a?a:m.model.getDescendants(m.model.getRoot());for(var c=f.value.split(" "),b=[],g=0;g<a.length;g++)if(m.model.isVertex(a[g])||m.model.isEdge(a[g])){var d=null!=a[g].value&&"object"==typeof a[g].value?mxUtils.trim(a[g].value.getAttribute(n)||""):"",p=!0;if(0<d.length)for(var d=d.toLowerCase().split(" "),e=0;e<c.length&&p;e++)var u=mxUtils.trim(c[e]).toLowerCase(),p=p&& +(0==u.length||0<=mxUtils.indexOf(d,u));else p=0==mxUtils.trim(f.value).length;p&&b.push(a[g])}return b}function l(a,c){m.model.beginUpdate();try{for(var b=0;b<a.length;b++)m.model.setVisible(a[b],c)}finally{m.model.endUpdate()}}var m=a.editor.graph,n="tags",c=document.createElement("div");c.style.userSelect="none";c.style.overflow="hidden";c.style.padding="10px";c.style.height="100%";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("allTags"));f.setAttribute("type", "text");f.style.marginTop="4px";f.style.width="260px";f.style.fontSize="12px";f.style.borderRadius="4px";f.style.padding="6px";c.appendChild(f);mxEvent.addListener(f,"dblclick",function(){var c=new FilenameDialog(a,n,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(n=a)}),mxResources.get("enterPropertyName"));a.showDialog(c.container,300,80,!0,!0);c.init()});f.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(c);var g=mxUtils.button(mxResources.get("hide"), function(){l(k(),!1)});g.setAttribute("title",mxResources.get("hide"));g.style.marginTop="8px";g.style.marginRight="4px";g.style.backgroundColor="#f5f5f5";g.style.backgroundImage="none";g.className="geBtn";c.appendChild(g);g=mxUtils.button(mxResources.get("show"),function(){var a=k();l(a,!0);m.isEnabled()&&m.setSelectionCells(a)});g.setAttribute("title",mxResources.get("show"));g.style.marginTop="8px";g.style.marginRight="4px";g.style.backgroundColor="#f5f5f5";g.style.backgroundImage="none";g.className= -"geBtn";c.appendChild(g);var p=a.actions.get("tags"),g=mxUtils.button(mxResources.get("close"),function(){p.funct()});g.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");g.style.marginTop="8px";g.style.backgroundColor="#4d90fe";g.style.backgroundImage="none";g.className="geBtn gePrimaryBtn";c.appendChild(g);mxEvent.addListener(f,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||p.funct()});this.window=new mxWindow(mxResources.get("tags"),c,e,d,b,h,!0,!0);this.window.destroyOnClose=!1; -this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(f.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},AuthDialog=function(a,e,d,b){var h=document.createElement("div");h.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding= -"0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("authorizationRequired"));var l="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";e==a.drive?(l=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==a.dropbox?(l=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==a.oneDrive?(l=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"): -e==a.gitHub?(l=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):e==a.trello&&(l=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[l]));var n=document.createElement("input");n.setAttribute("type","checkbox");l=mxUtils.button(mxResources.get("authorize"),function(){b(n.checked)});l.insertBefore(m,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";h.appendChild(k);h.appendChild(a); -h.appendChild(l);d&&(d=document.createElement("p"),d.style.marginTop="20px",d.appendChild(n),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),d.appendChild(k),h.appendChild(d),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=h},MoreShapesDialog=function(a,e,d){d=null!=d?d:a.sidebar.entries;var b=document.createElement("div");if(e){e=document.createElement("div");e.className="geDialogTitle"; -mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var h=document.createElement("div"),k=document.createElement("div");h.style.position="absolute";h.style.top="40px";h.style.left="0px";h.style.width="202px";h.style.bottom="60px";h.style.overflow="auto";mxClient.IS_QUIRKS&&(h.style.height="437px",h.style.marginTop="1px");k.style.position= -"absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(e.style.width)-202+"px",k.style.height=h.style.height,k.style.marginTop=h.style.marginTop);var l=null,m=[],n=document.createElement("div");n.style.position="relative";n.style.left="0px";n.style.right="0px";for(var c=0;c<d.length;c++)(function(b){var f=n.cloneNode(!1); -f.style.fontWeight="bold";f.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";f.style.padding="6px 0px 6px 20px";mxUtils.write(f,b.title);h.appendChild(f);for(var g=0;g<b.entries.length;g++)(function(b){var f=n.cloneNode(!1);f.style.cursor="pointer";f.style.padding="4px 0px 4px 20px";var q=document.createElement("input");q.setAttribute("type","checkbox");q.checked=a.sidebar.isEntryVisible(b.id);q.defaultChecked=q.checked;f.appendChild(q);mxUtils.write(f," "+b.title);h.appendChild(f);var e= -function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=b.imageCallback?b.imageCallback(k):null!=b.image?k.innerHTML='<img border="0" src="'+b.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=l&&(l.style.backgroundColor=""),l=f,l.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(f,"click",e);mxEvent.addListener(f,"dblclick",function(a){q.checked=!q.checked;mxEvent.consume(a)});m.push(function(){return q.checked? -b.id:null});0==c&&0==g&&e()})(b.entries[g])})(d[c]);b.style.padding="30px";b.appendChild(e);b.appendChild(h);b.appendChild(k);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=e.style.width,d.style.paddingTop="12px");var f=document.createElement("input");f.setAttribute("type", -"checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=document.createElement("span"),e.style.paddingRight="20px",e.appendChild(f),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),f.checked=!0,f.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=f&&(f.checked=!f.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className= -"geBtn";var g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var c=[],b=0;b<m.length;b++){var g=m[b].apply(this,arguments);null!=g&&c.push(g)}a.sidebar.showEntries(c.join(";"),f.checked,!0)});g.className="geBtn gePrimaryBtn"}else{var p=document.createElement("table"),u=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";var t=document.createElement("tr");p.style.width="100%";e=document.createElement("td");var g=document.createElement("td"),w=document.createElement("td"), -y=mxUtils.bind(this,function(c,b,f){var g=document.createElement("input");g.type="checkbox";p.appendChild(g);g.checked=a.sidebar.isEntryVisible(f);var q=document.createElement("span");mxUtils.write(q,b);b=document.createElement("div");b.style.display="block";b.appendChild(g);b.appendChild(q);mxEvent.addListener(q,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});c.appendChild(b);return function(){return g.checked?f:null}});t.appendChild(e);t.appendChild(g);t.appendChild(w);u.appendChild(t); -p.appendChild(u);for(var m=[],B=0,c=0;c<d.length;c++)for(u=0;u<d[c].entries.length;u++)B++;for(var q=[e,g,w],v=0,c=0;c<d.length;c++)(function(a){for(var c=0;c<a.entries.length;c++){var b=a.entries[c];m.push(y(q[Math.floor(v/(B/3))],b.title,b.id));v++}})(d[c]);b.appendChild(p);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";f=document.createElement("input");isLocalStorage&&(f.setAttribute("type","checkbox"),f.checked=!0,f.defaultChecked=!0,d.appendChild(f),e=document.createElement("span"), -mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)}));b.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],b=0;b<m.length;b++){var g=m[b].apply(this,arguments);null!=g&&c.push(g)}a.sidebar.showEntries(0<c.length?c.join(";"):"",f.checked);a.hideDialog()});g.className= -"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(e),d.appendChild(g)):(d.appendChild(g),d.appendChild(e));b.appendChild(d);this.container=b},PluginsDialog=function(a){function e(){if(0==h.length)b.innerHTML=mxResources.get("noPlugins");else{b.innerHTML="";for(var c=0;c<h.length;c++){var f=document.createElement("span");f.style.whiteSpace="nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete"; -g.style.position="relative";g.style.cursor="pointer";g.style.top="5px";g.style.marginRight="4px";g.style.display="inline-block";f.appendChild(g);mxUtils.write(f,h[c]);b.appendChild(f);mxUtils.br(b);mxEvent.addListener(g,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+h[c]+'"?',function(){h.splice(c,1);e()})}}(c))}}}var d=document.createElement("div"),b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var h=mxSettings.getPlugins().slice(); -d.appendChild(b);e();var k=mxUtils.button(mxResources.get("add"),function(){var c="",b=urlParams.p;if(null!=b&&0<b.length){for(var g=b.split(";"),b=0;b<g.length;b++){var d=App.pluginRegistry[g[b]];null!=d&&(c+=d+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){g=a.split(";");for(a=0;a<g.length;a++)0<g[a].length&&0>mxUtils.indexOf(h,g[a])&&h.push(g[a]);e()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+ +"geBtn";c.appendChild(g);var q=a.actions.get("tags"),g=mxUtils.button(mxResources.get("close"),function(){q.funct()});g.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");g.style.marginTop="8px";g.style.backgroundColor="#4d90fe";g.style.backgroundImage="none";g.className="geBtn gePrimaryBtn";c.appendChild(g);mxEvent.addListener(f,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),c,d,e,b,h,!0,!0);this.window.destroyOnClose=!1; +this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(f.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},AuthDialog=function(a,d,e,b){var h=document.createElement("div");h.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding= +"0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("authorizationRequired"));var l="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";d==a.drive?(l=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?(l=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(l=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"): +d==a.gitHub?(l=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.trello&&(l=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[l]));var n=document.createElement("input");n.setAttribute("type","checkbox");l=mxUtils.button(mxResources.get("authorize"),function(){b(n.checked)});l.insertBefore(m,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";h.appendChild(k);h.appendChild(a); +h.appendChild(l);e&&(e=document.createElement("p"),e.style.marginTop="20px",e.appendChild(n),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),e.appendChild(k),h.appendChild(e),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=h},MoreShapesDialog=function(a,d,e){e=null!=e?e:a.sidebar.entries;var b=document.createElement("div");if(d){d=document.createElement("div");d.className="geDialogTitle"; +mxUtils.write(d,mxResources.get("shapes"));d.style.position="absolute";d.style.top="0px";d.style.left="0px";d.style.lineHeight="40px";d.style.height="40px";d.style.right="0px";mxClient.IS_QUIRKS&&(d.style.width="718px");var h=document.createElement("div"),k=document.createElement("div");h.style.position="absolute";h.style.top="40px";h.style.left="0px";h.style.width="202px";h.style.bottom="60px";h.style.overflow="auto";mxClient.IS_QUIRKS&&(h.style.height="437px",h.style.marginTop="1px");k.style.position= +"absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(d.style.width)-202+"px",k.style.height=h.style.height,k.style.marginTop=h.style.marginTop);var l=null,m=[],n=document.createElement("div");n.style.position="relative";n.style.left="0px";n.style.right="0px";for(var c=0;c<e.length;c++)(function(b){var f=n.cloneNode(!1); +f.style.fontWeight="bold";f.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";f.style.padding="6px 0px 6px 20px";mxUtils.write(f,b.title);h.appendChild(f);for(var g=0;g<b.entries.length;g++)(function(b){var f=n.cloneNode(!1);f.style.cursor="pointer";f.style.padding="4px 0px 4px 20px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.checked=a.sidebar.isEntryVisible(b.id);p.defaultChecked=p.checked;f.appendChild(p);mxUtils.write(f," "+b.title);h.appendChild(f);var d= +function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=b.imageCallback?b.imageCallback(k):null!=b.image?k.innerHTML='<img border="0" src="'+b.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=l&&(l.style.backgroundColor=""),l=f,l.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(f,"click",d);mxEvent.addListener(f,"dblclick",function(a){p.checked=!p.checked;mxEvent.consume(a)});m.push(function(){return p.checked? +b.id:null});0==c&&0==g&&d()})(b.entries[g])})(e[c]);b.style.padding="30px";b.appendChild(d);b.appendChild(h);b.appendChild(k);e=document.createElement("div");e.className="geDialogFooter";e.style.position="absolute";e.style.paddingRight="16px";e.style.color="gray";e.style.left="0px";e.style.right="0px";e.style.bottom="0px";e.style.height="60px";e.style.lineHeight="52px";mxClient.IS_QUIRKS&&(e.style.width=d.style.width,e.style.paddingTop="12px");var f=document.createElement("input");f.setAttribute("type", +"checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)d=document.createElement("span"),d.style.paddingRight="20px",d.appendChild(f),mxUtils.write(d," "+mxResources.get("rememberThisSetting")),f.checked=!0,f.defaultChecked=!0,mxEvent.addListener(d,"click",function(a){mxEvent.getSource(a)!=f&&(f.checked=!f.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(d.style.position="relative",d.style.top="-6px"),e.appendChild(d);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className= +"geBtn";var g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var c=[],b=0;b<m.length;b++){var g=m[b].apply(this,arguments);null!=g&&c.push(g)}a.sidebar.showEntries(c.join(";"),f.checked,!0)});g.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),u=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";var t=document.createElement("tr");q.style.width="100%";d=document.createElement("td");var g=document.createElement("td"),x=document.createElement("td"), +z=mxUtils.bind(this,function(c,b,f){var g=document.createElement("input");g.type="checkbox";q.appendChild(g);g.checked=a.sidebar.isEntryVisible(f);var p=document.createElement("span");mxUtils.write(p,b);b=document.createElement("div");b.style.display="block";b.appendChild(g);b.appendChild(p);mxEvent.addListener(p,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});c.appendChild(b);return function(){return g.checked?f:null}});t.appendChild(d);t.appendChild(g);t.appendChild(x);u.appendChild(t); +q.appendChild(u);for(var m=[],v=0,c=0;c<e.length;c++)for(u=0;u<e[c].entries.length;u++)v++;for(var p=[d,g,x],w=0,c=0;c<e.length;c++)(function(a){for(var c=0;c<a.entries.length;c++){var b=a.entries[c];m.push(z(p[Math.floor(w/(v/3))],b.title,b.id));w++}})(e[c]);b.appendChild(q);e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="center";f=document.createElement("input");isLocalStorage&&(f.setAttribute("type","checkbox"),f.checked=!0,f.defaultChecked=!0,e.appendChild(f),d=document.createElement("span"), +mxUtils.write(d," "+mxResources.get("rememberThisSetting")),e.appendChild(d),mxEvent.addListener(d,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)}));b.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],b=0;b<m.length;b++){var g=m[b].apply(this,arguments);null!=g&&c.push(g)}a.sidebar.showEntries(0<c.length?c.join(";"):"",f.checked);a.hideDialog()});g.className= +"geBtn gePrimaryBtn";e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right"}a.editor.cancelFirst?(e.appendChild(d),e.appendChild(g)):(e.appendChild(g),e.appendChild(d));b.appendChild(e);this.container=b},PluginsDialog=function(a){function d(){if(0==h.length)b.innerHTML=mxResources.get("noPlugins");else{b.innerHTML="";for(var c=0;c<h.length;c++){var f=document.createElement("span");f.style.whiteSpace="nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete"; +g.style.position="relative";g.style.cursor="pointer";g.style.top="5px";g.style.marginRight="4px";g.style.display="inline-block";f.appendChild(g);mxUtils.write(f,h[c]);b.appendChild(f);mxUtils.br(b);mxEvent.addListener(g,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+h[c]+'"?',function(){h.splice(c,1);d()})}}(c))}}}var e=document.createElement("div"),b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var h=mxSettings.getPlugins().slice(); +e.appendChild(b);d();var k=mxUtils.button(mxResources.get("add"),function(){var c="",b=urlParams.p;if(null!=b&&0<b.length){for(var g=b.split(";"),b=0;b<g.length;b++){var e=App.pluginRegistry[g[b]];null!=e&&(c+=e+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){g=a.split(";");for(a=0;a<g.length;a++)0<g[a].length&&0>mxUtils.indexOf(h,g[a])&&h.push(g[a]);d()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+ ")");a.showDialog(c.container,300,80,!0,!0);c.init()});k.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(h);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";a.editor.cancelFirst?(n.appendChild(l),n.appendChild(k), -n.appendChild(m)):(n.appendChild(k),n.appendChild(m),n.appendChild(l));d.appendChild(n);this.container=d},CropImageDialog=function(a,e,d){var b=document.createElement("div"),h=document.createElement("table"),k=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan","2");mxUtils.write(m,mxResources.get("loading")+"...");l.appendChild(m);k.appendChild(l);var l=document.createElement("tr"),n=document.createElement("td"), +n.appendChild(m)):(n.appendChild(k),n.appendChild(m),n.appendChild(l));e.appendChild(n);this.container=e},CropImageDialog=function(a,d,e){var b=document.createElement("div"),h=document.createElement("table"),k=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan","2");mxUtils.write(m,mxResources.get("loading")+"...");l.appendChild(m);k.appendChild(l);var l=document.createElement("tr"),n=document.createElement("td"), c=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();f.select()};c.appendChild(f);l.appendChild(n);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");c=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type", -"text");g.style.width="100px";g.value="0";c.appendChild(g);l.appendChild(n);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");c=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value="0";c.appendChild(p);l.appendChild(n);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");c=document.createElement("td"); +"text");g.style.width="100px";g.value="0";c.appendChild(g);l.appendChild(n);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");c=document.createElement("td");mxUtils.write(n,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";c.appendChild(q);l.appendChild(n);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");c=document.createElement("td"); mxUtils.write(n,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";c.appendChild(u);l.appendChild(n);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");c=document.createElement("td");mxUtils.write(n,mxResources.get("circle")+":");l.appendChild(n);var t=document.createElement("input");t.setAttribute("type","checkbox");c.appendChild(t);l.appendChild(c);k.appendChild(l);h.appendChild(k); -b.appendChild(h);var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),b=c.getContext("2d"),e=w.width,h=w.height,l=parseInt(f.value),k=parseInt(g.value),e=Math.max(1,e-l-parseInt(p.value)),h=Math.max(1,h-k-parseInt(u.value));c.width=e;c.height=h;t.checked&&(b.fillStyle="#000000",b.arc(e/2,h/2,Math.min(e/2,h/2),0,2*Math.PI),b.fill(),b.globalCompositeOperation= -"source-in");b.drawImage(w,l,k,e,h,0,0,e,h);d(c.toDataURL())});y.setAttribute("disabled","disabled");w.onload=function(){y.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+": "+w.height)};w.src=e;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&y.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(h),e.appendChild(y)):(e.appendChild(y), -e.appendChild(h));b.appendChild(e);this.container=b},EditGeometryDialog=function(a,e){var d=a.editor.graph,b=1==e.length?d.getCellGeometry(e[0]):null,h=document.createElement("div"),k=document.createElement("table"),l=document.createElement("tbody"),m=document.createElement("tr"),n=document.createElement("td"),c=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px"; +b.appendChild(h);var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=new Image,z=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),b=c.getContext("2d"),d=x.width,h=x.height,k=parseInt(f.value),l=parseInt(g.value),d=Math.max(1,d-k-parseInt(q.value)),h=Math.max(1,h-l-parseInt(u.value));c.width=d;c.height=h;t.checked&&(b.fillStyle="#000000",b.arc(d/2,h/2,Math.min(d/2,h/2),0,2*Math.PI),b.fill(),b.globalCompositeOperation= +"source-in");b.drawImage(x,k,l,d,h,0,0,d,h);e(c.toDataURL())});z.setAttribute("disabled","disabled");x.onload=function(){z.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+x.width+" "+mxResources.get("height")+": "+x.height)};x.src=d;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&z.click()});d=document.createElement("div");d.style.marginTop="20px";d.style.textAlign="right";a.editor.cancelFirst?(d.appendChild(h),d.appendChild(z)):(d.appendChild(z), +d.appendChild(h));b.appendChild(d);this.container=b},EditGeometryDialog=function(a,d){var e=a.editor.graph,b=1==d.length?e.getCellGeometry(d[0]):null,h=document.createElement("div"),k=document.createElement("table"),l=document.createElement("tbody"),m=document.createElement("tr"),n=document.createElement("td"),c=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px"; f.value=null!=b?b.x:"";this.init=function(){f.focus();f.select()};c.appendChild(f);m.appendChild(n);m.appendChild(c);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");c=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=b?b.y:"";c.appendChild(g);m.appendChild(n);m.appendChild(c);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td"); -c=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.width:"";c.appendChild(p);m.appendChild(n);m.appendChild(c);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");c=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!= -b?b.height:"";c.appendChild(u);m.appendChild(n);m.appendChild(c);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");c=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(t);m.appendChild(n);m.appendChild(c);l.appendChild(m);k.appendChild(l);h.appendChild(k); -var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var b=d.getCellGeometry(e[c]);null!=b&&(b=b.clone(),d.isCellMovable(e[c])&&(0<mxUtils.trim(f.value).length&&(b.x=Number(f.value)),0<mxUtils.trim(g.value).length&&(b.y=Number(g.value))),d.isCellResizable(e[c])&&(0<mxUtils.trim(p.value).length&&(b.width=Number(p.value)),0<mxUtils.trim(u.value).length&& -(b.height=Number(u.value))),d.getModel().setGeometry(e[c],b));0<mxUtils.trim(t.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[e[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(h,"keypress",function(a){13==a.keyCode&&w.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(b),k.appendChild(w)):(k.appendChild(w),k.appendChild(b));h.appendChild(k);this.container=h},LibraryDialog=function(a, -e,d,b,h,k){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var c=null;if(null!=a)for(var b=u.firstChild,c=0;null!=b&&b!=a;)b=b.nextSibling,c++;return c}function m(c,b,g,e,d,p,h,k,B){try{if(null==b||"image/"==b.substring(0,6))if(null==c&&null!=h||null==w[c]){var C=function(){E.innerHTML="";E.style.cursor="pointer";E.style.whiteSpace="nowrap";E.style.textOverflow="ellipsis";mxUtils.write(E,null!=H.title&&0<H.title.length?H.title:mxResources.get("untitled")); -E.style.color=null==H.title||0==H.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var z=d,n=p;if(d>a.maxImageSize||p>a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,d)),a.maxImageSize/Math.max(1,p));d*=A;p*=A}z>n?(n=Math.round(100*n/z),z=100):(z=Math.round(100*z/n),n=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";G.style.position="relative";G.style.cursor="move"; -mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");if(null!=c){var I=document.createElement("img");I.setAttribute("src",v.convert(c));I.style.width=z+"px";I.style.height=n+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-n)/2)+"px";I.style.paddingLeft=Math.floor((100-z)/2)+"px";G.appendChild(I)}else if(null!=h){var K=a.stringToCells(a.editor.graph.decompress(h.xml));0<K.length&&(a.sidebar.createThumb(K,100,100,G,null,!0,!1),G.firstChild.style.display=mxClient.IS_QUIRKS? -"inline":"inline-block",G.firstChild.style.cursor="")}var F=document.createElement("img");F.setAttribute("src",Editor.closeImage);F.setAttribute("border","0");F.setAttribute("title",mxResources.get("delete"));F.setAttribute("align","top");F.style.paddingTop="4px";F.style.marginLeft="-22px";F.style.cursor="pointer";mxEvent.addListener(F,"dragstart",function(a){mxEvent.consume(a)});null==c&&null!=h&&(F.style.position="relative");(function(a,c,b){mxEvent.addListener(F,"click",function(g){w[c]=null;for(var q= -0;q<f.length;q++)if(null!=f[q].data&&f[q].data==c||null!=f[q].xml&&null!=b&&f[q].xml==b.xml){f.splice(q,1);break}G.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(g)});mxEvent.addListener(F,"dblclick",function(a){mxEvent.consume(a)})})(G,c,h);G.appendChild(F);G.style.marginBottom="30px";var E=document.createElement("div");E.style.position="absolute";E.style.boxSizing="border-box";E.style.bottom="-18px";E.style.left= -"10px";E.style.right="10px";E.style.backgroundColor="#ffffff";E.style.overflow="hidden";E.style.textAlign="center";var H=null;null!=c?(H={data:c,w:d,h:p,title:B},null!=k&&(H.aspect=k),w[c]=I,f.push(H)):null!=h&&(h.aspect="fixed",f.push(h),H=h);mxEvent.addListener(E,"keydown",function(a){13==a.keyCode&&null!=q&&(q(),q=null,mxEvent.consume(a))});C();G.appendChild(E);mxEvent.addListener(E,"mousedown",function(a){"true"!=E.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(c){if(mxClient.IS_IOS|| -mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,H.title||"",mxResources.get("ok"),function(a){null!=a&&(H.title=a,C())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(c)}else if("true"!=E.getAttribute("contentEditable")){null!=q&&(q(),q=null);if(null==H.title||0==H.title.length)E.innerHTML="";E.style.textOverflow="";E.style.whiteSpace="";E.style.cursor="text";E.style.color="";E.setAttribute("contentEditable", -"true");E.focus();document.execCommand("selectAll",!1,null);q=function(){E.removeAttribute("contentEditable");E.style.cursor="pointer";H.title=E.innerHTML;C()};mxEvent.consume(c)}};mxEvent.addListener(E,"click",K);mxEvent.addListener(G,"dblclick",K);u.appendChild(G);mxEvent.addListener(G,"dragstart",function(a){null==c&&null!=h&&(F.style.visibility="hidden",E.style.visibility="hidden");mxClient.IS_FF&&null!=h.xml&&a.dataTransfer.setData("Text",h.xml);y=l(a);mxClient.IS_GC&&(G.style.opacity="0.9"); -window.setTimeout(function(){mxUtils.setPrefixedStyle(G.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(G,30);F.style.visibility="";E.style.visibility=""},0)});mxEvent.addListener(G,"dragend",function(a){"hidden"==F.style.visibility&&(F.style.visibility="",E.style.visibility="");y=null;mxUtils.setOpacity(G,100);mxUtils.setPrefixedStyle(G.style,"transform",null)})}else x||(x=!0,a.handleError({message:mxResources.get("fileExists")}));else{d=!1;try{if(a.spinner.stop(),z=mxUtils.parseXml(c),"mxlibrary"== -z.documentElement.nodeName){n=JSON.parse(mxUtils.getTextContent(z.documentElement));if(null!=n&&0<n.length)for(var D=0;D<n.length;D++)null!=n[D].xml?m(null,null,0,0,0,0,n[D]):m(n[D].data,null,0,0,n[D].w,n[D].h,null,"fixed",n[D].title);d=!0}else if("mxfile"==z.documentElement.nodeName){for(var P=z.documentElement.getElementsByTagName("diagram"),D=0;D<P.length;D++){var n=mxUtils.getTextContent(P[D]),K=a.stringToCells(a.editor.graph.decompress(n)),R=a.editor.graph.getBoundingBoxFromGeometry(K);m(null, -null,0,0,0,0,{xml:n,w:R.width,h:R.height})}d=!0}}catch(Z){}d||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function n(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function c(c){c.stopPropagation();c.preventDefault();x=!1;B=l(c);if(null!=y)null!=B&&B<u.children.length?(f.splice(B>y?B-1:B,0,f.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[B])):(f.push(f.splice(y,1)[0]),u.appendChild(u.children[y])); -else if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,z(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(b)||/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){m(b,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}c.stopPropagation();c.preventDefault()}var f=[];d=document.createElement("div"); -d.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";d.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",e);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==h||h.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==h||h.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF|| -5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};g.appendChild(p);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var t= -document.createElement("div");t.style.position="absolute";t.style.width="640px";t.style.top="260px";t.style.textAlign="center";t.style.fontSize="22px";t.style.color="#a0c3ff";mxUtils.write(t,mxResources.get("dragImagesHere"));d.appendChild(t);var w={},y=null,B=null,q=null;e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=q&&(q(),q=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart", -e);var v=new mxUrlConverter,x=!1;if(null!=b)for(e=0;e<b.length;e++)g=b[e],m(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(u,"dragleave",function(a){t.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==u||c==t){a.stopPropagation();a.preventDefault();break}c=c.parentNode}});var z=function(c){return function(b,f,g,q,e,d,p,h,v){null!=v&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,v.name)?a.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&& -(a.spinner.stop(),200<=b.status&&299>=b.status&&(m(b.responseText,f,g,q,e,d,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(b,f,g,q,e,d,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",c);mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",c);d.appendChild(u);b=document.createElement("div"); -b.style.textAlign="right";b.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);g=mxUtils.button(mxResources.get("export"),function(){var c=a.createLibraryDataFromImages(f),b=p.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document, -"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";b.appendChild(g);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(c){x=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,b,f,g,q,e,d,p,h){z(c)(a,b,f,g,q,e,d,p,h);A.value=""});u.scrollTop=u.scrollHeight}),g=mxUtils.button(mxResources.get("import"),function(){null!=q&&(q(),q=null);A.click()}),g.setAttribute("id", -"btnAddImage"),g.className="geBtn",b.appendChild(g));g=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=q&&(q(),q=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,c,b){x=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}m(a,null,0,0,c,b);u.scrollTop=u.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";b.appendChild(g);this.saveBtnClickHandler=function(c,b,f,g){a.saveLibrary(c, -b,f,g)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=q&&(q(),q=null);this.saveBtnClickHandler(p.value,f,h,k)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";b.appendChild(g);a.editor.cancelFirst||b.appendChild(e);d.appendChild(b);this.container=d},EditShapeDialog=function(a,e,d,b,h){b=null!=b?b:300;h=null!=h?h:120;var k,l,m=document.createElement("table"),n=document.createElement("tbody");m.style.cellPadding="4px";k=document.createElement("tr");l= -document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,d);k.appendChild(l);n.appendChild(k);k=document.createElement("tr");l=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=b-200+"px";c.style.height=h+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};l.appendChild(c);k.appendChild(l);l=document.createElement("td");d=document.createElement("div");d.style.position= -"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=h+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);l.appendChild(d);var f=new Graph(d);f.setEnabled(!1);var g=a.editor.graph.cloneCells([e])[0];f.addCells([g]);d=f.view.getState(g);var p="";null!=d.shape&&null!=d.shape.stencil&&(p=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(c,p||"");d=f.getGraphBounds();h=Math.min(160/d.width,(h-40)/d.height);f.view.scaleAndTranslate(h, -20/h-d.x,20/h-d.y);k.appendChild(l);n.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}), -d.className="geBtn",l.appendChild(d));var u=function(b,f,g){var e=c.value,q=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(q.documentElement),q=q.documentElement.getElementsByTagName("parsererror");if(null!=q&&0<q.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(g&&a.hideDialog(),q=!b.model.contains(f),!g||q||e!=p){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(q){var d=a.editor.graph.getInsertPoint();f.geometry.x=d.x; -f.geometry.y=d.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(x){throw x;}finally{b.getModel().endUpdate()}q&&b.setSelectionCell(f)}};d=mxUtils.button(mxResources.get("preview"),function(){u(f,g,!1)});d.className="geBtn";l.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";l.appendChild(d);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);n.appendChild(k);m.appendChild(n);this.container= -m},CustomDialog=function(a,e,d,b,h,k,l){var m=document.createElement("div");m.appendChild(e);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="right";null!=l&&e.appendChild(l);l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});l.className="geBtn";a.editor.cancelFirst&&e.appendChild(l);if(!a.isOffline()&&null!=k){var n=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)});n.className="geBtn";e.appendChild(n)}h=mxUtils.button(h|| -mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});e.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(l);m.appendChild(e);this.cancelBtn=l;this.okButton=h;this.container=m};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC": +c=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b?b.width:"";c.appendChild(q);m.appendChild(n);m.appendChild(c);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");c=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!= +b?b.height:"";c.appendChild(u);m.appendChild(n);m.appendChild(c);l.appendChild(m);m=document.createElement("tr");n=document.createElement("td");c=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=1==d.length?mxUtils.getValue(e.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(t);m.appendChild(n);m.appendChild(c);l.appendChild(m);k.appendChild(l);h.appendChild(k); +var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e.getModel().beginUpdate();try{for(var c=0;c<d.length;c++){var b=e.getCellGeometry(d[c]);null!=b&&(b=b.clone(),e.isCellMovable(d[c])&&(0<mxUtils.trim(f.value).length&&(b.x=Number(f.value)),0<mxUtils.trim(g.value).length&&(b.y=Number(g.value))),e.isCellResizable(d[c])&&(0<mxUtils.trim(q.value).length&&(b.width=Number(q.value)),0<mxUtils.trim(u.value).length&& +(b.height=Number(u.value))),e.getModel().setGeometry(d[c],b));0<mxUtils.trim(t.value).length&&e.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[d[c]])}}finally{e.getModel().endUpdate()}});mxEvent.addListener(h,"keypress",function(a){13==a.keyCode&&x.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(b),k.appendChild(x)):(k.appendChild(x),k.appendChild(b));h.appendChild(k);this.container=h},LibraryDialog=function(a, +d,e,b,h,k){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var c=null;if(null!=a)for(var b=u.firstChild,c=0;null!=b&&b!=a;)b=b.nextSibling,c++;return c}function m(c,b,g,d,e,h,q,k,v){try{if(null==b||"image/"==b.substring(0,6))if(null==c&&null!=q||null==x[c]){var C=function(){E.innerHTML="";E.style.cursor="pointer";E.style.whiteSpace="nowrap";E.style.textOverflow="ellipsis";mxUtils.write(E,null!=G.title&&0<G.title.length?G.title:mxResources.get("untitled")); +E.style.color=null==G.title||0==G.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var B=e,n=h;if(e>a.maxImageSize||h>a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,h));e*=A;h*=A}B>n?(n=Math.round(100*n/B),B=100):(B=Math.round(100*B/n),n=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move"; +mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=c){var H=document.createElement("img");H.setAttribute("src",w.convert(c));H.style.width=B+"px";H.style.height=n+"px";H.style.margin="10px";H.style.paddingBottom=Math.floor((100-n)/2)+"px";H.style.paddingLeft=Math.floor((100-B)/2)+"px";F.appendChild(H)}else if(null!=q){var K=a.stringToCells(a.editor.graph.decompress(q.xml));0<K.length&&(a.sidebar.createThumb(K,100,100,F,null,!0,!1),F.firstChild.style.display=mxClient.IS_QUIRKS? +"inline":"inline-block",F.firstChild.style.cursor="")}var I=document.createElement("img");I.setAttribute("src",Editor.closeImage);I.setAttribute("border","0");I.setAttribute("title",mxResources.get("delete"));I.setAttribute("align","top");I.style.paddingTop="4px";I.style.marginLeft="-22px";I.style.cursor="pointer";mxEvent.addListener(I,"dragstart",function(a){mxEvent.consume(a)});null==c&&null!=q&&(I.style.position="relative");(function(a,c,b){mxEvent.addListener(I,"click",function(g){x[c]=null;for(var p= +0;p<f.length;p++)if(null!=f[p].data&&f[p].data==c||null!=f[p].xml&&null!=b&&f[p].xml==b.xml){f.splice(p,1);break}F.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(g)});mxEvent.addListener(I,"dblclick",function(a){mxEvent.consume(a)})})(F,c,q);F.appendChild(I);F.style.marginBottom="30px";var E=document.createElement("div");E.style.position="absolute";E.style.boxSizing="border-box";E.style.bottom="-18px";E.style.left= +"10px";E.style.right="10px";E.style.backgroundColor="#ffffff";E.style.overflow="hidden";E.style.textAlign="center";var G=null;null!=c?(G={data:c,w:e,h:h,title:v},null!=k&&(G.aspect=k),x[c]=H,f.push(G)):null!=q&&(q.aspect="fixed",f.push(q),G=q);mxEvent.addListener(E,"keydown",function(a){13==a.keyCode&&null!=p&&(p(),p=null,mxEvent.consume(a))});C();F.appendChild(E);mxEvent.addListener(E,"mousedown",function(a){"true"!=E.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(c){if(mxClient.IS_IOS|| +mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,G.title||"",mxResources.get("ok"),function(a){null!=a&&(G.title=a,C())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(c)}else if("true"!=E.getAttribute("contentEditable")){null!=p&&(p(),p=null);if(null==G.title||0==G.title.length)E.innerHTML="";E.style.textOverflow="";E.style.whiteSpace="";E.style.cursor="text";E.style.color="";E.setAttribute("contentEditable", +"true");E.focus();document.execCommand("selectAll",!1,null);p=function(){E.removeAttribute("contentEditable");E.style.cursor="pointer";G.title=E.innerHTML;C()};mxEvent.consume(c)}};mxEvent.addListener(E,"click",K);mxEvent.addListener(F,"dblclick",K);u.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==c&&null!=q&&(I.style.visibility="hidden",E.style.visibility="hidden");mxClient.IS_FF&&null!=q.xml&&a.dataTransfer.setData("Text",q.xml);z=l(a);mxClient.IS_GC&&(F.style.opacity="0.9"); +window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);I.style.visibility="";E.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(a){"hidden"==I.style.visibility&&(I.style.visibility="",E.style.visibility="");z=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else y||(y=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),B=mxUtils.parseXml(c),"mxlibrary"== +B.documentElement.nodeName){n=JSON.parse(mxUtils.getTextContent(B.documentElement));if(null!=n&&0<n.length)for(var D=0;D<n.length;D++)null!=n[D].xml?m(null,null,0,0,0,0,n[D]):m(n[D].data,null,0,0,n[D].w,n[D].h,null,"fixed",n[D].title);e=!0}else if("mxfile"==B.documentElement.nodeName){for(var P=B.documentElement.getElementsByTagName("diagram"),D=0;D<P.length;D++){var n=mxUtils.getTextContent(P[D]),K=a.stringToCells(a.editor.graph.decompress(n)),R=a.editor.graph.getBoundingBoxFromGeometry(K);m(null, +null,0,0,0,0,{xml:n,w:R.width,h:R.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function n(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function c(c){c.stopPropagation();c.preventDefault();y=!1;v=l(c);if(null!=z)null!=v&&v<u.children.length?(f.splice(v>z?v-1:v,0,f.splice(z,1)[0]),u.insertBefore(u.children[z],u.children[v])):(f.push(f.splice(z,1)[0]),u.appendChild(u.children[z])); +else if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,B(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(b)||/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){m(b,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}c.stopPropagation();c.preventDefault()}var f=[];e=document.createElement("div"); +e.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";e.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",d);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==h||h.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==h||h.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF|| +5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};g.appendChild(q);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var t= +document.createElement("div");t.style.position="absolute";t.style.width="640px";t.style.top="260px";t.style.textAlign="center";t.style.fontSize="22px";t.style.color="#a0c3ff";mxUtils.write(t,mxResources.get("dragImagesHere"));e.appendChild(t);var x={},z=null,v=null,p=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=p&&(p(),p=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",d);mxEvent.addListener(u,"pointerdown",d);mxEvent.addListener(u,"touchstart", +d);var w=new mxUrlConverter,y=!1;if(null!=b)for(d=0;d<b.length;d++)g=b[d],m(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(u,"dragleave",function(a){t.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==u||c==t){a.stopPropagation();a.preventDefault();break}c=c.parentNode}});var B=function(c){return function(b,f,g,p,d,e,h,w,q){null!=q&&(/(\.vsdx)($|\?)/i.test(q.name)||/(\.vssx)($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(b){a.spinner.stop();m(b,f,g, +p,d,e,h,"fixed",mxEvent.isAltDown(c)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,q.name)?a.parseFile(q,mxUtils.bind(this,function(b){4==b.readyState&&(a.spinner.stop(),200<=b.status&&299>=b.status&&(m(b.responseText,f,g,p,d,e,h,"fixed",mxEvent.isAltDown(c)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(b,f,g,p,d,e,h,"fixed",mxEvent.isAltDown(c)?null:h.substring(0, +h.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",c);mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",c);e.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);g=mxUtils.button(mxResources.get("export"), +function(){var c=a.createLibraryDataFromImages(f),b=q.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";b.appendChild(g);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A, +"change",function(c){y=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,b,f,g,p,d,e,h,u){B(c)(a,b,f,g,p,d,e,h,u);A.value=""});u.scrollTop=u.scrollHeight}),g=mxUtils.button(mxResources.get("import"),function(){null!=p&&(p(),p=null);A.click()}),g.setAttribute("id","btnAddImage"),g.className="geBtn",b.appendChild(g));g=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=p&&(p(),p=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,c,b){y=!1;if(null!=a){if("data:image/"== +a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}m(a,null,0,0,c,b);u.scrollTop=u.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";b.appendChild(g);this.saveBtnClickHandler=function(c,b,f,g){a.saveLibrary(c,b,f,g)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=p&&(p(),p=null);this.saveBtnClickHandler(q.value,f,h,k)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";b.appendChild(g); +a.editor.cancelFirst||b.appendChild(d);e.appendChild(b);this.container=e},EditShapeDialog=function(a,d,e,b,h){b=null!=b?b:300;h=null!=h?h:120;var k,l,m=document.createElement("table"),n=document.createElement("tbody");m.style.cellPadding="4px";k=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,e);k.appendChild(l);n.appendChild(k);k=document.createElement("tr");l=document.createElement("td");var c=document.createElement("textarea"); +c.style.outline="none";c.style.resize="none";c.style.width=b-200+"px";c.style.height=h+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};l.appendChild(c);k.appendChild(l);l=document.createElement("td");e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.top="6px";e.style.width="200px";e.style.height=h+4+"px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);l.appendChild(e);var f=new Graph(e);f.setEnabled(!1); +var g=a.editor.graph.cloneCells([d])[0];f.addCells([g]);e=f.view.getState(g);var q="";null!=e.shape&&null!=e.shape.stencil&&(q=mxUtils.getPrettyXml(e.shape.stencil.desc));mxUtils.write(c,q||"");e=f.getGraphBounds();h=Math.min(160/e.width,(h-40)/e.height);f.view.scaleAndTranslate(h,20/h-e.x,20/h-e.y);k.appendChild(l);n.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align", +"right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);a.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),e.className="geBtn",l.appendChild(e));var u=function(b,f,g){var d=c.value,p=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(p.documentElement),p=p.documentElement.getElementsByTagName("parsererror");if(null!=p&&0<p.length)a.showError(mxResources.get("error"), +mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(g&&a.hideDialog(),p=!b.model.contains(f),!g||p||d!=q){d=a.editor.graph.compress(d);b.getModel().beginUpdate();try{if(p){var e=a.editor.graph.getInsertPoint();f.geometry.x=e.x;f.geometry.y=e.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[f])}catch(y){throw y;}finally{b.getModel().endUpdate()}p&&b.setSelectionCell(f)}};e=mxUtils.button(mxResources.get("preview"),function(){u(f,g,!1)});e.className="geBtn"; +l.appendChild(e);e=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,d,!0)});e.className="geBtn gePrimaryBtn";l.appendChild(e);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);n.appendChild(k);m.appendChild(n);this.container=m},CustomDialog=function(a,d,e,b,h,k,l){var m=document.createElement("div");m.appendChild(d);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";null!=l&&d.appendChild(l);l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(); +null!=b&&b()});l.className="geBtn";a.editor.cancelFirst&&d.appendChild(l);if(!a.isOffline()&&null!=k){var n=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)});n.className="geBtn";d.appendChild(n)}h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e()});d.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(l);m.appendChild(d);this.cancelBtn=l;this.okButton=h;this.container=m};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC": IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=": IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==": IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=": @@ -6600,11 +6600,11 @@ a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emp b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div"); null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(g=new mxCodec(f.ownerDocument),g.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(), null!=f){var g=new mxCodec(f.ownerDocument);g.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")|| -"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible? -"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(v){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!== +"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible? +"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(w){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!== typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var g=0;g<b.length;g++)if("mxgraph"==b[g].getAttribute("class")){f.push(b[g]);break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=this.graph.decompress(b),0<b.length&&(f=mxUtils.parseXml(b),a=f.documentElement))))}if(null!=a&& "svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&& -(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO; +(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO; var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1, messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}}; Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var g= @@ -6617,23 +6617,23 @@ StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#6 {fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&& this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c); c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return g.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b= -f.getSelectionCells();for(c=0;c<b.length;c++){for(var g=f.getModel().getStyle(b[c]),q=0;q<e.length;q++)g=mxUtils.removeStylename(g,e[q]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR, +f.getSelectionCells();for(c=0;c<b.length;c++){for(var g=f.getModel().getStyle(b[c]),p=0;p<d.length;p++)g=mxUtils.removeStylename(g,d[p]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR, null));f.getModel().setStyle(b[c],g)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor= a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");g.appendChild(c)}g.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(g),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight= -"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var d=document.createElement("div");d.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var p=document.createElement("div");p.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(a.appendChild(d),a.appendChild(p));mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(d);b(p);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& +"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);var d="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var h=document.createElement("div");h.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(a.appendChild(e),a.appendChild(h));mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(e);b(h);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& (b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,g=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this, function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px": (b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= -"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}p.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint; +"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var q=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}q.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint; this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a, c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}return f.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a, c,b){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,c,f,!1);g.highlight(a);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition","all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1; -var f=a.ownerDocument,g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");g.setAttribute("id",this.shadowId);var q=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");q.setAttribute("in","SourceAlpha");q.setAttribute("stdDeviation",this.svgShadowBlur);q.setAttribute("result","blur");g.appendChild(q);q=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset"); -q.setAttribute("in","blur");q.setAttribute("dx",this.svgShadowSize);q.setAttribute("dy",this.svgShadowSize);q.setAttribute("result","offsetBlur");g.appendChild(q);q=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");q.setAttribute("flood-color",this.svgShadowColor);q.setAttribute("flood-opacity",this.svgShadowOpacity);q.setAttribute("result","offsetColor");g.appendChild(q);q=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"): -f.createElement("feComposite");q.setAttribute("in","offsetColor");q.setAttribute("in2","offsetBlur");q.setAttribute("operator","in");q.setAttribute("result","offsetBlur");g.appendChild(q);q=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");q.setAttribute("in","SourceGraphic");q.setAttribute("in2","offsetBlur");g.appendChild(q);q=a.getElementsByTagName("defs");0==q.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"), -null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=q[0];f.appendChild(g);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", +var f=a.ownerDocument,g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");g.setAttribute("id",this.shadowId);var p=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");p.setAttribute("in","SourceAlpha");p.setAttribute("stdDeviation",this.svgShadowBlur);p.setAttribute("result","blur");g.appendChild(p);p=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset"); +p.setAttribute("in","blur");p.setAttribute("dx",this.svgShadowSize);p.setAttribute("dy",this.svgShadowSize);p.setAttribute("result","offsetBlur");g.appendChild(p);p=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");p.setAttribute("flood-color",this.svgShadowColor);p.setAttribute("flood-opacity",this.svgShadowOpacity);p.setAttribute("result","offsetColor");g.appendChild(p);p=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"): +f.createElement("feComposite");p.setAttribute("in","offsetColor");p.setAttribute("in2","offsetBlur");p.setAttribute("operator","in");p.setAttribute("result","offsetBlur");g.appendChild(p);p=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");p.setAttribute("in","SourceGraphic");p.setAttribute("in2","offsetBlur");g.appendChild(p);p=a.getElementsByTagName("defs");0==p.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"), +null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=p[0];f.appendChild(g);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", "url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"]; mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5= [STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/transmission"]= @@ -6641,298 +6641,298 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist [SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap= [SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js", STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors= -[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,g,e,d,p,h,u){if(null!=b&&null==mxMarker.markers[b]){var q=this.getPackageForType(b);null!=q&&mxStencilRegistry.getStencil(q)}return t.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){m.value=Math.max(1, -Math.min(p,Math.max(parseInt(m.value),parseInt(k.value))));k.value=Math.max(1,Math.min(p,Math.min(parseInt(m.value),parseInt(k.value))))}function f(c){function b(c,b,g){var q=c.getGraphBounds(),e=0,d=0,p=Z.get(),h=1/c.pageScale,u=B.checked;if(u)var h=parseInt(U.value),t=parseInt(R.value),h=Math.min(p.height*t/(q.height/c.view.scale),p.width*h/(q.width/c.view.scale));else h=parseInt(y.value)/(100*c.pageScale),isNaN(h)&&(f=1/c.pageScale,y.value="100 %");p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width* -f);p.height=Math.ceil(p.height*f);h*=f;!u&&c.pageVisible?(q=c.getPageLayout(),e-=q.x*p.width,d-=q.y*p.height):u=!0;if(null==b){b=PrintDialog.createPrintPreview(c,h,p,0,e,d,u);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var l=b.renderPage;b.renderPage= -function(a,c,b,f,g,q){var e=l.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}b.open(null,null,g,!0)}else{p=c.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";b.backgroundColor=p;b.autoOrigin=u;b.appendGraph(c,h,e,d,g,!0)}return b}var f=parseInt(W.value)/100;isNaN(f)&&(f=1,W.value="100 %");var f=.75*f,q=k.value,d=m.value,e=!t.checked,p=null;e&&(e=q==h&&d==h);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;t.checked|| -(u=parseInt(q)-1,e=parseInt(d)-1);for(var l=u;l<=e;l++){var v=a.pages[l],q=v==a.currentPage?g:null;if(null==q){var q=a.createTemporaryGraph(g.getStylesheet()),d=!0,u=!1,n=null,w=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(d=v.viewState.pageVisible,u=v.viewState.mathEnabled,n=v.viewState.background,w=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(u="0"!=v.mapping.diagramMap.get("mathEnabled"),n=v.mapping.diagramMap.get("background"), -w=v.mapping.diagramMap.get("backgroundImage"),w=null!=w&&0<w.length?JSON.parse(w):null);q.background=n;q.backgroundImage=null!=w?new mxImage(w.src,w.width,w.height):null;q.pageVisible=d;q.mathEnabled=u;var C=q.getGlobalVariable;q.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?l+1:C.apply(this,arguments)};document.body.appendChild(q.container);a.updatePageRoot(v);q.model.setRoot(v.root)}p=b(q,p,l!=e);q!=g&&q.container.parentNode.removeChild(q.container)}}else p=b(g);p.mathEnabled&& -(e=p.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"), -e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),c&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));p.closeDocument();!p.mathEnabled&&c&&PrintDialog.printPreview(p)}var g=a.editor.graph,e=document.createElement("div"),d=document.createElement("h3"); -d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,c||mxResources.get("print"));e.appendChild(d);var p=1,h=1,u=document.createElement("div");u.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");u.appendChild(t);d=document.createElement("span"); -mxUtils.write(d,mxResources.get("printAllPages"));u.appendChild(d);mxUtils.br(u);var l=t.cloneNode(!0);t.setAttribute("checked","checked");l.setAttribute("value","range");u.appendChild(l);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+":");u.appendChild(d);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";u.appendChild(k);d=document.createElement("span"); -mxUtils.write(d,mxResources.get("to"));u.appendChild(d);var m=k.cloneNode(!0);u.appendChild(m);mxEvent.addListener(k,"focus",function(){l.checked=!0});mxEvent.addListener(m,"focus",function(){l.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(m,"change",b);if(null!=a.pages&&(p=a.pages.length,null!=a.currentPage))for(d=0;d<a.pages.length;d++)if(a.currentPage==a.pages[d]){h=d+1;k.value=h;m.value=h;break}k.setAttribute("max",p);m.setAttribute("max",p);1<p&&e.appendChild(u);var n=document.createElement("div"); -n.style.marginBottom="10px";var w=document.createElement("input");w.style.marginRight="8px";w.setAttribute("value","adjust");w.setAttribute("type","radio");w.setAttribute("name","printZoom");n.appendChild(w);d=document.createElement("span");mxUtils.write(d,mxResources.get("adjustTo"));n.appendChild(d);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";n.appendChild(y);mxEvent.addListener(y,"focus",function(){w.checked=!0}); -e.appendChild(n);var u=u.cloneNode(!1),B=w.cloneNode(!0);B.setAttribute("value","fit");w.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";d.appendChild(B);u.appendChild(d);n=document.createElement("table");n.style.display="inline-block";var S=document.createElement("tbody"),M=document.createElement("tr"),J=M.cloneNode(!0),T=document.createElement("td"),L=T.cloneNode(!0),X=T.cloneNode(!0),N=T.cloneNode(!0), -Y=T.cloneNode(!0),V=T.cloneNode(!0);T.style.textAlign="right";N.style.textAlign="right";mxUtils.write(T,mxResources.get("fitTo"));var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","1");U.setAttribute("min","1");U.setAttribute("type","number");U.style.width="40px";L.appendChild(U);d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsAcross"));X.appendChild(d);mxUtils.write(N,mxResources.get("fitToBy"));var R=U.cloneNode(!0);Y.appendChild(R); -mxEvent.addListener(U,"focus",function(){B.checked=!0});mxEvent.addListener(R,"focus",function(){B.checked=!0});d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsDown"));V.appendChild(d);M.appendChild(T);M.appendChild(L);M.appendChild(X);J.appendChild(N);J.appendChild(Y);J.appendChild(V);S.appendChild(M);S.appendChild(J);n.appendChild(S);u.appendChild(n);e.appendChild(u);u=document.createElement("div");d=document.createElement("div");d.style.fontWeight="bold";d.style.marginBottom= -"12px";mxUtils.write(d,mxResources.get("paperSize"));u.appendChild(d);d=document.createElement("div");d.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(d,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);u.appendChild(d);d=document.createElement("span");mxUtils.write(d,mxResources.get("pageScale"));u.appendChild(d);var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";u.appendChild(W); -e.appendChild(u);d=document.createElement("div");d.style.cssText="text-align:right;margin:62px 0 0 0;";u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&d.appendChild(u);a.isOffline()||(n=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),n.className="geBtn",d.appendChild(n));PrintDialog.previewEnabled&&(n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog(); -f(!1)}),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});n.className="geBtn gePrimaryBtn";d.appendChild(n);a.editor.cancelFirst||d.appendChild(u);e.appendChild(d);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background= -this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(w.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!= +[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,g,d,e,h,u,q){if(null!=b&&null==mxMarker.markers[b]){var p=this.getPackageForType(b);null!=p&&mxStencilRegistry.getStencil(p)}return t.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){m.value=Math.max(1, +Math.min(h,Math.max(parseInt(m.value),parseInt(l.value))));l.value=Math.max(1,Math.min(h,Math.min(parseInt(m.value),parseInt(l.value))))}function f(c){function b(c,b,g){var p=c.getGraphBounds(),d=0,e=0,h=Z.get(),q=1/c.pageScale,u=z.checked;if(u)var q=parseInt(U.value),k=parseInt(R.value),q=Math.min(h.height*k/(p.height/c.view.scale),h.width*q/(p.width/c.view.scale));else q=parseInt(x.value)/(100*c.pageScale),isNaN(q)&&(f=1/c.pageScale,x.value="100 %");h=mxRectangle.fromRectangle(h);h.width=Math.ceil(h.width* +f);h.height=Math.ceil(h.height*f);q*=f;!u&&c.pageVisible?(p=c.getPageLayout(),d-=p.x*h.width,e-=p.y*h.height):u=!0;if(null==b){b=PrintDialog.createPrintPreview(c,q,h,0,d,e,u);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var t=b.writeHead;b.writeHead=function(c){t.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var l=b.renderPage;b.renderPage= +function(a,c,b,f,g,p){var d=l.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:d.className="geDisableMathJax";return d}}b.open(null,null,g,!0)}else{h=c.background;if(null==h||""==h||h==mxConstants.NONE)h="#ffffff";b.backgroundColor=h;b.autoOrigin=u;b.appendGraph(c,q,d,e,g,!0)}return b}var f=parseInt(W.value)/100;isNaN(f)&&(f=1,W.value="100 %");var f=.75*f,p=l.value,e=m.value,d=!k.checked,h=null;d&&(d=p==u&&e==u);if(!d&&null!=a.pages&&a.pages.length){var q=0,d=a.pages.length-1;k.checked|| +(q=parseInt(p)-1,d=parseInt(e)-1);for(var t=q;t<=d;t++){var w=a.pages[t],p=w==a.currentPage?g:null;if(null==p){var p=a.createTemporaryGraph(g.getStylesheet()),e=!0,q=!1,n=null,v=null;null==w.viewState&&null==w.mapping&&null==w.root&&a.updatePageRoot(w);null!=w.viewState?(e=w.viewState.pageVisible,q=w.viewState.mathEnabled,n=w.viewState.background,v=w.viewState.backgroundImage):null!=w.mapping&&null!=w.mapping.diagramMap&&(q="0"!=w.mapping.diagramMap.get("mathEnabled"),n=w.mapping.diagramMap.get("background"), +v=w.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);p.background=n;p.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height):null;p.pageVisible=e;p.mathEnabled=q;var C=p.getGlobalVariable;p.getGlobalVariable=function(a){return"page"==a?w.getName():"pagenumber"==a?t+1:C.apply(this,arguments)};document.body.appendChild(p.container);a.updatePageRoot(w);p.model.setRoot(w.root)}h=b(p,h,t!=d);p!=g&&p.container.parentNode.removeChild(p.container)}}else h=b(g);h.mathEnabled&& +(d=h.wnd.document,d.writeln('<script type="text/x-mathjax-config">'),d.writeln("MathJax.Hub.Config({"),d.writeln('messageStyle: "none",'),d.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),d.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),d.writeln("TeX: {"),d.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),d.writeln("},"),d.writeln("tex2jax: {"),d.writeln('\tignoreClass: "geDisableMathJax"'),d.writeln("},"), +d.writeln("asciimath2jax: {"),d.writeln('\tignoreClass: "geDisableMathJax"'),d.writeln("}"),d.writeln("});"),c&&(d.writeln("MathJax.Hub.Queue(function () {"),d.writeln("window.print();"),d.writeln("});")),d.writeln("\x3c/script>"),d.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));h.closeDocument();!h.mathEnabled&&c&&PrintDialog.printPreview(h)}var g=a.editor.graph,d=document.createElement("div"),e=document.createElement("h3"); +e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,c||mxResources.get("print"));d.appendChild(e);var h=1,u=1,q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");q.appendChild(k);e=document.createElement("span"); +mxUtils.write(e,mxResources.get("printAllPages"));q.appendChild(e);mxUtils.br(q);var t=k.cloneNode(!0);k.setAttribute("checked","checked");t.setAttribute("value","range");q.appendChild(t);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");q.appendChild(e);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;";l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.style.width="50px";q.appendChild(l);e=document.createElement("span"); +mxUtils.write(e,mxResources.get("to"));q.appendChild(e);var m=l.cloneNode(!0);q.appendChild(m);mxEvent.addListener(l,"focus",function(){t.checked=!0});mxEvent.addListener(m,"focus",function(){t.checked=!0});mxEvent.addListener(l,"change",b);mxEvent.addListener(m,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){u=e+1;l.value=u;m.value=u;break}l.setAttribute("max",h);m.setAttribute("max",h);1<h&&d.appendChild(q);var n=document.createElement("div"); +n.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");n.appendChild(v);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));n.appendChild(e);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";x.setAttribute("value","100 %");x.style.width="50px";n.appendChild(x);mxEvent.addListener(x,"focus",function(){v.checked=!0}); +d.appendChild(n);var q=q.cloneNode(!1),z=v.cloneNode(!0);z.setAttribute("value","fit");v.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(z);q.appendChild(e);n=document.createElement("table");n.style.display="inline-block";var S=document.createElement("tbody"),M=document.createElement("tr"),J=M.cloneNode(!0),T=document.createElement("td"),L=T.cloneNode(!0),X=T.cloneNode(!0),N=T.cloneNode(!0), +Y=T.cloneNode(!0),V=T.cloneNode(!0);T.style.textAlign="right";N.style.textAlign="right";mxUtils.write(T,mxResources.get("fitTo"));var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","1");U.setAttribute("min","1");U.setAttribute("type","number");U.style.width="40px";L.appendChild(U);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));X.appendChild(e);mxUtils.write(N,mxResources.get("fitToBy"));var R=U.cloneNode(!0);Y.appendChild(R); +mxEvent.addListener(U,"focus",function(){z.checked=!0});mxEvent.addListener(R,"focus",function(){z.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));V.appendChild(e);M.appendChild(T);M.appendChild(L);M.appendChild(X);J.appendChild(N);J.appendChild(Y);J.appendChild(V);S.appendChild(M);S.appendChild(J);n.appendChild(S);q.appendChild(n);d.appendChild(q);q=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom= +"12px";mxUtils.write(e,mxResources.get("paperSize"));q.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));q.appendChild(e);var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";q.appendChild(W); +d.appendChild(q);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&e.appendChild(q);a.isOffline()||(n=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),n.className="geBtn",e.appendChild(n));PrintDialog.previewEnabled&&(n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog(); +f(!1)}),n.className="geBtn",e.appendChild(n));n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});n.className="geBtn gePrimaryBtn";e.appendChild(n);a.editor.cancelFirst||e.appendChild(q);d.appendChild(e);this.container=d};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background= +this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(x.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!= this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})(); -(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.0.9";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.1.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; -EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported= -!(!a.getContext||!a.getContext("2d"))}catch(u){}try{var b=document.createElement("canvas"),g=new Image;g.onload=function(){try{b.getContext("2d").drawImage(g,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};g.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(u){}try{b= -document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(u){}})();EditorUi.prototype.openLink=function(a){return window.open(a)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,g){localStorage.setItem(a,b);g()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()}; -EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()|| -!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,g){g=null!=g?g:24;var c=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(g,e){var d=!1;this.active||(f.call(this,g),this.active=!0,null!=e&&(d=document.createElement("div"),d.style.position="absolute",d.style.whiteSpace="nowrap",d.style.background="#4B4243",d.style.color= -"white",d.style.fontFamily="Helvetica, Arial",d.style.fontSize="9pt",d.style.padding="6px",d.style.paddingLeft="10px",d.style.paddingRight="10px",d.style.zIndex=2E9,d.style.left=Math.max(0,a)+"px",d.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(d.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(d.style,"boxShadow","2px 2px 3px 0px #ddd"),d.innerHTML=e+"...",g.appendChild(d),c.status=d,mxClient.IS_VML&& -(null==document.documentMode||8>=document.documentMode)&&(d.style.left=Math.round(Math.max(0,a-d.offsetWidth/2))+"px",d.style.top=Math.round(Math.max(0,b+70-d.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(g,e)}));this.stop();return a}),d=!0);return d};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}}; -return c};EditorUi.parsePng=function(a,b,g){function c(a,c){var b=d;d+=c;return a.substring(b,d)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var d=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(c(a,4),"IHDR"!=c(a,4))null!=g&&g();else{c(a,17);do{g=f(a);var e=c(a,4);if(null!=b&&b(d-8,e,g))break;value=c(a,g);c(a,4);if("IEND"==e)break}while(g)}};EditorUi.prototype.isCompatibleString=function(a){try{var c= -mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var g=c.indexOf("<mxfile ");if(0<=g){var d=c.lastIndexOf("</mxfile>");d>g&&(b=c.substring(g,d+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var e= -mxUtils.parseXml(c),h=this.editor.extractGraphModel(e.documentElement,null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(w){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a, -!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var h=this.updatePageRoot(new DiagramPage(d[e]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,h,0==e?h:null,0))}}else"0"!= -urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}}; -EditorUi.prototype.createFileData=function(a,b,g,d,e,h,k,l,m,q){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var c,f=null;null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER?c="_blank":f=c=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){var u=b.zapGremlins(mxUtils.getXml(a)),p=b.compress(u);if(b.decompress(p)!=u)return u;u=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(u,p);p=a.ownerDocument.createElement("mxfile");p.appendChild(u)}q? -(p=p.cloneNode(!0),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):(p.setAttribute("userAgent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("editor","www.draw.io"),a=null!=g?g.getMode():this.mode,null!=a&&p.setAttribute("type",a));a=mxUtils.getXml(p);if(!h&&!e&&(k||null!=g&&/(\.html)$/i.test(g.getTitle())))a=this.getHtml2(mxUtils.getXml(p),b,null!=g?g.getTitle():null,c,f);else if(h||!e&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null== -g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,l,m,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var d= -0;d<this.pages.length;d++){var e=this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[d].node,f),e.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(a,b,g,d,e,h,k,l,m){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!= -h?h:!1);m=null!=m?m:this.getCurrentFile();h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var c=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(k,h,m,window.location.href,a,b,g,d,e,l);h!=this.editor.graph&& -h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=function(a,b,g,d,e,h){h=null!=h?h:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=h?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;h=Math.floor(c.x/p-b.view.translate.x);p=Math.floor(c.y/p-b.view.translate.y);c=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0", -p)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': -"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+ -"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,g,d,e){null!=e&&(e=e.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"}; -null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+ -mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length? -mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page|| -0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!= -a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,g,e,d,h){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,d));this.saveData(f,a,p,"text/xml")}else if("html"== -a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var g=this.createDownloadRequest(b,a,e,c);this.editor.graph.pageVisible=f;return g}catch(H){this.handleError(H)}}));else{var q=null,u= -mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);var l=this.editor.graph.getSvg(k,null,null,null,null,e);g&&this.editor.graph.addSvgShadow(l);this.convertImages(l,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+ -mxUtils.getXml(a))})))}else f=c+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),e)}}catch(A){this.handleError(A)}};EditorUi.prototype.createDownloadRequest=function(a,b,g,e){var c=this.editor.graph.getGraphBounds();g=this.getFileData(!0,null,null,null,g,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var d= -0;d<this.pages.length;d++)if(this.pages[d]==this.currentPage){f="&from="+d;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(g)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear(); -this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a); -a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable? -(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(), -mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){null!=window.console&&console.log("error in fileLoaded:",a,u);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!= -u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(t){}this.handleError(u,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):e()}))}else e();return b};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL: -"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,g,e,d,h,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this, -function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()), -".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling; -var c=b.lastChild,e=c.previousSibling;b.insertBefore(c,a);b.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,g){if(null!= -this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding= -"8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f);else for(var g=0;g<b.length;g++){var e=b[g],d=e.data;if(null!=d){var d=this.convertDataUri(d),q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(q+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(q+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(this.editor.graph.decompress(e.xml)),0<d.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(d, -e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var d=0;d<b.length;d++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title, -mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[d]);g=null!=g&&0<g.length?g:a.getTitle();var h=this.sidebar.addPalette(a.getHash(),g,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var k=h.parentNode.previousSibling;g=k.getAttribute("title");null!=g&&0<g.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+g); -var q=document.createElement("div");q.style.position="absolute";q.style.right="0px";q.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(q.style.backgroundColor="inherit");k.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("align","top");l.setAttribute("border","0");l.className="geButton";l.style.marginRight="1px";l.style.marginTop="-1px";q.appendChild(l);var m= -null;mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=m?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var n=this.editor.graph,A=null,E=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),h,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0); -a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=l.cloneNode(!1),A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="2px",A.style.marginTop="-2px",q.insertBefore(A,q.firstChild),k.style.paddingRight=18*q.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),k.style.paddingRight=18*q.childNodes.length+ -"px")})):null==m&&(m=l.cloneNode(!1),m.setAttribute("src",IMAGE_PATH+"/download.png"),m.setAttribute("title",mxResources.get("save")),q.insertBefore(m,q.firstChild),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==m||a.isModified()||(k.style.paddingRight=18*q.childNodes.length+"px",m.parentNode.removeChild(m),m=null)});mxEvent.consume(c)})),k.style.paddingRight=18*q.childNodes.length+"px")}),D= -mxUtils.bind(this,function(a,c,g,e){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var d=0;d<a.length;d++){var q=n.getCellGeometry(a[d]);null!=q&&q.translate(-c.x,-c.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);F(g);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}), -H=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=n.getSelectionCells(),c=n.view.getBounds(b),f=n.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=n.view.translate.x;c.y-=n.view.translate.y;D(b,c)}mxEvent.consume(a)});h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){}, -mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",h.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!1),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&& -null!=n.panningManager&&null!=n.graphHandler&&(h.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),h.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",h.style.border="3px solid transparent",h.style.cursor= -"",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";h.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})), -mxEvent.addListener(h,"drop",mxUtils.bind(this,function(a){h.style.border="3px solid transparent";h.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,g,d,q,p,l,k,u,v){if(null!=c&&"image/"==g.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,l),c)],c[0].vertex= -!0,D(c,new mxRectangle(0,0,p,l),a,mxEvent.isAltDown(a)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,m=mxUtils.bind(this,function(c,g){if(null!=c&&"text/xml"==g){var d=mxUtils.parseXml(c);if("mxlibrary"==d.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(d.documentElement));e(q,h);b=b.concat(q);F(a);this.spinner.stop();t=!0}catch(W){}else if("mxfile"==d.documentElement.nodeName)try{for(var p= -d.documentElement.getElementsByTagName("diagram"),d=0;d<p.length;d++){var q=mxUtils.getTextContent(p[d]),l=this.stringToCells(this.editor.graph.decompress(q)),k=this.editor.graph.getBoundingBoxFromGeometry(l);D(l,new mxRectangle(0,0,k.width,k.height),a)}t=!0}catch(W){null!=window.console&&console.log("error in drop handler:",W)}}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});!this.isOffline()&& -(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,k)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,g)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(h.style.border= -"3px solid transparent",h.style.cursor="");a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",IMAGE_PATH+"/edit.gif");l.setAttribute("title",mxResources.get("edit"));q.insertBefore(l,q.firstChild);mxEvent.addListener(l,"click",E);mxEvent.addListener(h,"dblclick",function(a){mxEvent.getSource(a)==h&&E(a)});g=l.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));q.insertBefore(g,q.firstChild);mxEvent.addListener(g,"click", -H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:gray;text-decoration:none;",g.className="geButton",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),q.insertBefore(g,q.firstChild))}k.appendChild(q);k.style.paddingRight=18*q.childNodes.length+"px"}};"1"==urlParams.offline|| -EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide")); -a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet","styles/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)", -Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet","styles/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme", -Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor= -"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", +EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');svrc=EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport= +!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(u){}try{var b=document.createElement("canvas"),g=new Image;g.onload=function(){try{b.getContext("2d").drawImage(g,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};g.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(u){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(u){}})();EditorUi.prototype.openLink=function(a){return window.open(a)}; +EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,g){localStorage.setItem(a,b);g()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled= +function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,g){g=null!=g?g:24;var c=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:"dark"==uiTheme? +"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(g,d){var e=!1;this.active||(f.call(this,g),this.active=!0,null!=d&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",e.style.fontSize="9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight="10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top= +Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),e.innerHTML=d+"...",g.appendChild(e),c.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this, +function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(g,d)}));this.stop();return a}),e=!0);return e};var d=c.stop;c.stop=function(){d.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,g){function c(a,c){var b=e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<< +24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(c(a,4),"IHDR"!=c(a,4))null!=g&&g();else{c(a,17);do{g=f(a);var d=c(a,4);if(null!=b&&b(e-8,d,g))break;value=c(a,g);c(a,4);if("IEND"==d)break}while(g)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(q){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml; +EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var g=c.indexOf("<mxfile ");if(0<=g){var e=c.lastIndexOf("</mxfile>");e>g&&(b=c.substring(g,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var d=mxUtils.parseXml(c),h=this.editor.extractGraphModel(d.documentElement,null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(x){}return b};EditorUi.prototype.validateFileData=function(a){if(null!= +a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,e=a.getElementsByTagName("diagram");if("0"!=urlParams.pages|| +1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=e.length-1;0<=d;d--){var h=this.updatePageRoot(new DiagramPage(e[d]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[d+1]));c.model.execute(new ChangePage(this,h,0==d?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", +[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(d=0;d<b.length;d++)c.model.execute(new ChangePage(this,b[d],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,g,e,d,h,k,l,n,p){b=null!=b?b:this.editor.graph;d=null!=d?d:!1;n=null!=n?n:!0;var c,f=null;null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER? +c="_blank":f=c=e;if(null==a)return"";var q=a;if("mxfile"!=q.nodeName.toLowerCase()){var u=b.zapGremlins(mxUtils.getXml(a)),q=b.compress(u);if(b.decompress(q)!=u)return u;u=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(u,q);q=a.ownerDocument.createElement("mxfile");q.appendChild(u)}p?(q=q.cloneNode(!0),q.removeAttribute("userAgent"),q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("type")):(q.setAttribute("userAgent",navigator.userAgent),q.setAttribute("version", +EditorUi.VERSION),q.setAttribute("editor","www.draw.io"),a=null!=g?g.getMode():this.mode,null!=a&&q.setAttribute("type",a));a=mxUtils.getXml(q);if(!h&&!d&&(k||null!=g&&/(\.html)$/i.test(g.getTitle())))a=this.getHtml2(mxUtils.getXml(q),b,null!=g?g.getTitle():null,c,f);else if(h||!d&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,l,n,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a= +null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var d=this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=d&&d.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(d.graphModel), +d.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[e].node,f),d.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};EditorUi.prototype.getFileData=function(a,b,g,e,d,h,k,l,n){d=null!=d?d:!0;k=null!=k?k:this.getXmlFileData(d,null!=h?h:!1);n=null!=n?n:this.getCurrentFile();h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet()); +var c=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(k,h,n,window.location.href,a,b,g,e,d,l);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=function(a,b,g,e,d,h){h=null!=h?h:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=h?b.getGraphBounds(): +b.getBoundingBox(b.getSelectionCells()),q=b.view.scale;h=Math.floor(c.x/q-b.view.translate.x);q=Math.floor(c.y/q-b.view.translate.y);c=b.background;null==d&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",q)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!= +d&&(d=d.replace(/&/g,"&"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==d?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=d?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==d?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=d? +'<meta http-equiv="refresh" content="0;URL=\''+d+"'\"/>\n":"")+"</head>\n<body"+(null==d&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==d?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+d+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+ +"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,g,e,d){null!=d&&(d=d.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==d?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=d?' xmlns="http://www.w3.org/1999/xhtml">': +">")+"\n<head>\n"+(null==d?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=d?'<meta http-equiv="refresh" content="0;URL=\''+d+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==d?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ +d+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode= +c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", +[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,g,d,e,h){try{d=null!=d?d:this.editor.graph.isSelectionEmpty(); +var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var q='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(f,a,q,"text/xml")}else if("html"==a)q=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,q,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this, +function(b,c){try{var f=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var g=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=f;return g}catch(G){this.handleError(G)}}));else{var p=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var u=this.editor.graph.background; +u==mxConstants.NONE&&(u=null);var l=this.editor.graph.getSvg(u,null,null,null,null,d);g&&this.editor.graph.addSvgShadow(l);this.convertImages(l,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),d)}}catch(A){this.handleError(A)}}; +EditorUi.prototype.createDownloadRequest=function(a,b,g,d){var c=this.editor.graph.getGraphBounds();g=this.getFileData(!0,null,null,null,g,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var e=0;e<this.pages.length;e++)if(this.pages[e]==this.currentPage){f="&from="+e;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+ +c+"&xml="+encodeURIComponent(g)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle(); +this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open(); +this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()): +this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){null!= +window.console&&console.log("error in fileLoaded:",a,u);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(t){}this.handleError(u,mxResources.get("errorLoadingFile"),mxUtils.bind(this, +function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)): +"")}catch(g){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,g,d,e,h,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))}; +EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a]; +if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData()); +if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,g){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()], +c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,d=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f);else for(var g=0;g<b.length;g++){var d=b[g],e=d.data;if(null!=e){var e= +this.convertDataUri(e),p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(p+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(p+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(this.editor.graph.decompress(d.xml)),0<e.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var e=0;e<b.length;e++)mxUtils.bind(this,function(a){var b= +a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b, +a.w,a.h,a.title||"",!0,!1,!0)}))})(b[e]);g=null!=g&&0<g.length?g:a.getTitle();var h=this.sidebar.addPalette(a.getHash(),g,!0,mxUtils.bind(this,function(a){d(b,a)}));this.repositionLibrary(c);var k=h.parentNode.previousSibling;g=k.getAttribute("title");null!=g&&0<g.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+g);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode|| +(p.style.backgroundColor="inherit");k.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("align","top");l.setAttribute("border","0");l.className="geButton";l.style.marginRight="1px";l.style.marginTop="-1px";p.appendChild(l);var n=null;mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)}); +null!=n?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,A=null,I=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),h,b,a,a.getMode());mxEvent.consume(c)}),E=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=l.cloneNode(!1),A.setAttribute("src",Editor.spinImage),A.setAttribute("title", +mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="2px",A.style.marginTop="-2px",p.insertBefore(A,p.firstChild),k.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),k.style.paddingRight=18*p.childNodes.length+"px")})):null==n&&(n=l.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),p.insertBefore(n,p.firstChild), +mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(c)})),k.style.paddingRight=18*p.childNodes.length+"px")}),D=mxUtils.bind(this,function(a,c,g,d){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var e=0;e<a.length;e++){var p=m.getCellGeometry(a[e]);null!=p&& +p.translate(-c.x,-c.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,d||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=d&&(a.title=d);b.push(a);E(g);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),G=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"), +mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),f=m.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=m.view.translate.x;c.y-=m.view.translate.y;D(b,c)}mxEvent.consume(a)});h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)": +h.style.border="3px dotted rgb(254, 137, 12)",h.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(h.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),h.style.cursor="default",this.sidebar.showTooltips=!0, +m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="visible",h.style.border="3px solid transparent",h.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border= +"3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";h.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"drop",mxUtils.bind(this,function(a){h.style.border="3px solid transparent";h.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0< +a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,g,e,p,q,k,l,u,t){if(null!=c&&"image/"==g.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,q,k),c)],c[0].vertex=!0,D(c,new mxRectangle(0,0,q,k),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f), +f=null);else{var w=!1,m=mxUtils.bind(this,function(c,g){if(null!=c&&"text/xml"==g){var e=mxUtils.parseXml(c);if("mxlibrary"==e.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(e.documentElement));d(p,h);b=b.concat(p);E(a);this.spinner.stop();w=!0}catch(W){}else if("mxfile"==e.documentElement.nodeName)try{for(var q=e.documentElement.getElementsByTagName("diagram"),e=0;e<q.length;e++){var p=mxUtils.getTextContent(q[e]),k=this.stringToCells(this.editor.graph.decompress(p)),l=this.editor.graph.getBoundingBoxFromGeometry(k); +D(k,new mxRectangle(0,0,l.width,l.height),a)}w=!0}catch(W){null!=window.console&&console.log("error in drop handler:",W)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=t&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l))?this.importVisio(t,function(a){m(a,"text/xml")}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,l)&&null!=t?this.parseFile(t, +mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?m(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):m(c,g)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",h.style.cursor="");a.stopPropagation();a.preventDefault()})); +l=l.cloneNode(!1);l.setAttribute("src",IMAGE_PATH+"/edit.gif");l.setAttribute("title",mxResources.get("edit"));p.insertBefore(l,p.firstChild);mxEvent.addListener(l,"click",I);mxEvent.addListener(h,"dblclick",function(a){mxEvent.getSource(a)==h&&I(a)});g=l.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));p.insertBefore(g,p.firstChild);mxEvent.addListener(g,"click",G);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"), +g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:gray;text-decoration:none;",g.className="geButton",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),p.insertBefore(g,p.firstChild))}k.appendChild(p);k.style.paddingRight=18*p.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth= +64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top= +"-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet","styles/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight= +41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet","styles/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor= +"#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display= -"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,g,e,d){a=new ImageDialog(this,a,b,g,e,d);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor= -!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,g,e,d){a=new LibraryDialog(this,a,b,g,e,d);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer"); +"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,g,d,e){a=new ImageDialog(this,a,b,g,d,e);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor= +!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,g,d,e){a=new LibraryDialog(this,a,b,g,d,e);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer"); a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,g){var c=null!=this.spinner&&null!= -this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),d=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),d=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden")); +this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok"),e=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(d=mxResources.get("cancel"),e=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden")); else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var h=window.location.hash;null!=h&&"#G"==h.substring(0,2)&&(h=h.substring(2),a+=' <a href="https://drive.google.com/open?id='+h+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a= -mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,g,d)}else null!=g&&g()};EditorUi.prototype.showError=function(a,b,g,e,d,h,l){a=new ErrorDialog(this,a,b,g,e,d,h,l);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this, -null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,g,e,d){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=g&&g()},e,d)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= +mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,d,g,e)}else null!=g&&g()};EditorUi.prototype.showError=function(a,b,g,d,e,h,k){a=new ErrorDialog(this,a,b,g,d,e,h,k);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this, +null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,g,d,e){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=g&&g()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,g){var c=a.toDataURL("image/"+g);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+g))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c}; EditorUi.prototype.saveCanvas=function(a,b,g){var c="jpeg"==g?"jpg":g,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,g);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS}; -EditorUi.prototype.doSaveLocalFile=function(a,b,g,e,d){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,g):new Blob([a],{type:g}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(a,!0):(g.document.write(a),g.document.close(),g.document.execCommand("SaveAs",!0,b),g.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height= -"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,g):new Blob([a],{type:g}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(y){}}else this.createEchoRequest(a, -b,g,e,d).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,g,e,d,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=g?"&mime="+g:"")+(null!=d?"&format="+d:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),f=c.length,e=Math.ceil(f/1024),d=Array(e),h=0;h<e;++h){for(var l=1024*h,k=Math.min(l+1024,f),q=Array(k-l),v=0;l<k;++v,++l)q[v]= -c[l].charCodeAt(0);d[h]=new Uint8Array(q)}return new Blob(d,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,g,e,d,h,l){h=null!=h?h:!1;l=null!=l?l:"vsdx"!=d&&(!mxClient.IS_IOS||!navigator.standalone);d=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null==g||"image/"!=g.substring(0,6)||"image/svg"==g.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a, -!1)),f.document.close())}else this.openInNewWindow(a,g,e);else c==App.MODE_DEVICE?this.doSaveLocalFile(a,b,g,e):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(a,b,g,e,c,f)}catch(x){this.handleError(x)}}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,l,null,null,4<d?3:4,a,g,e);this.showDialog(b.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);b.init()}; +EditorUi.prototype.doSaveLocalFile=function(a,b,g,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,g):new Blob([a],{type:g}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(a,!0):(g.document.write(a),g.document.close(),g.document.execCommand("SaveAs",!0,b),g.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height= +"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(f||this.isOffline()){c.href=URL.createObjectURL(d?this.base64ToBlob(a,g):new Blob([a],{type:g}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(z){}}else this.createEchoRequest(a, +b,g,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,g,d,e,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=g?"&mime="+g:"")+(null!=e?"&format="+e:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),f=c.length,d=Math.ceil(f/1024),e=Array(d),h=0;h<d;++h){for(var k=1024*h,l=Math.min(k+1024,f),p=Array(l-k),w=0;k<l;++w,++k)p[w]= +c[k].charCodeAt(0);e[h]=new Uint8Array(p)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,g,d,e,h,k){h=null!=h?h:!1;k=null!=k?k:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null==g||"image/"!=g.substring(0,6)||"image/svg"==g.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a, +!1)),f.document.close())}else this.openInNewWindow(a,g,d);else c==App.MODE_DEVICE?this.doSaveLocalFile(a,b,g,d):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(a,b,g,d,c,f)}catch(y){this.handleError(y)}}))}catch(w){this.handleError(w)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,k,null,null,4<e?3:4,a,g,d);this.showDialog(b.container,380,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()}; EditorUi.prototype.openInNewWindow=function(a,b,g){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(g?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(g?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a, -!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div"); +!0)};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div"); var f=b.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left= f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var g=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});g.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height= "auto";this.exportDialog.style.padding="10px";var b=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null, -this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,g,e,d){this.isLocalFileSave()?this.saveLocalFile(g,a,e,d,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(g,a,e,d,b,c)}),g, -d,e)};EditorUi.prototype.saveRequest=function(a,b,g,e,d,h,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=g("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(g){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e, -a,h,!0,c,g)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,c,g)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"), -!1,!1,l,null,null,4<c?3:4,e,h,d);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,g,e,d,h){};EditorUi.prototype.pickFolder=function(a,b,g){b(null)};EditorUi.prototype.exportSvg=function(a,b,g,e,d,h,l,k,m){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();g=null!=g?g:c;c=b?null:this.editor.graph.background; -c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,l,k,null,g);e&&this.editor.graph.addSvgShadow(f);var p=this.getBaseFilename()+".svg",u=mxUtils.bind(this,function(a){this.spinner.stop();d&&a.setAttribute("content",this.getFileData(!0,null,null,null,g,m));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b, -this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var c='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null== -this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,u,this.thumbImageCache)):u(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,g,e,d,h){h=null!=h?h:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");g&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");h&&(a.appendChild(c),mxUtils.write(a,b),d||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a, -b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var f=this.getCurrentFile(),e="";null!=f&&f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var d=document.createElement("select");d.style.width="120px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("makeCopy"));d.appendChild(f);f=document.createElement("option"); -f.setAttribute("value","custom");mxUtils.write(f,mxResources.get("custom")+"...");d.appendChild(f);a.appendChild(d);mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if("custom"==d.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:d.value="blank"},mxResources.get("url"),null,null,null,null,function(){d.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b|| -b.checked)?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===d.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return d}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=d&&d!=mxConstants.NONE?"border:1px solid black;background-color:"+d:"background-position:center center;background-repeat:no-repeat;background-image:url('"+ -Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var f=document.createElement("select");f.style.width="100px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));f.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));f.appendChild(e);e=document.createElement("option"); -e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));f.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),f.appendChild(e));a.appendChild(f);mxUtils.write(a,mxResources.get("borderColor")+":");var d="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(d||"none",function(a){d=a;c()});mxEvent.consume(a)}));c();h.style.padding= -mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return d},getTarget:function(){return f.value},focus:function(){f.focus()}}};EditorUi.prototype.createLink=function(a,b,g,e,d,h,l,k){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+ -a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=d&&0<d.length&&f.push("edit="+encodeURIComponent(d)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(g&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=l?g="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g? +this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,g,d,e){this.isLocalFileSave()?this.saveLocalFile(g,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(g,a,d,e,b,c)}),g, +e,d)};EditorUi.prototype.saveRequest=function(a,b,g,d,e,h,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=g("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(g){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d, +a,h,!0,c,g)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,c,g)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"), +!1,!1,k,null,null,4<c?3:4,d,h,e);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,g,d,e,h){};EditorUi.prototype.pickFolder=function(a,b,g){b(null)};EditorUi.prototype.exportSvg=function(a,b,g,d,e,h,k,l,m){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();g=null!=g?g:c;c=b?null:this.editor.graph.background; +c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,k,l,null,g);d&&this.editor.graph.addSvgShadow(f);var q=this.getBaseFilename()+".svg",u=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,g,m));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b, +this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var c='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null== +this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,u,this.thumbImageCache)):u(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,g,d,e,h){h=null!=h?h:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");g&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);d&&c.setAttribute("disabled","disabled");h&&(a.appendChild(c),mxUtils.write(a,b),e||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a, +b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var f=this.getCurrentFile(),d="";null!=f&&f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("makeCopy"));e.appendChild(f);f=document.createElement("option"); +f.setAttribute("value","custom");mxUtils.write(f,mxResources.get("custom")+"...");e.appendChild(f);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b|| +b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":d:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+ +Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var f=document.createElement("select");f.style.width="100px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));f.appendChild(d);d=document.createElement("option"); +d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));f.appendChild(d);b&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),f.appendChild(d));a.appendChild(f);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();h.style.padding= +mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return f.value},focus:function(){f.focus()}}};EditorUi.prototype.createLink=function(a,b,g,d,e,h,k,l){var c=this.getCurrentFile(),f=[];d&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+ +a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&f.push("edit="+encodeURIComponent(e)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(g&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?g="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),l||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g? this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+g};EditorUi.prototype.createHtml=function(a, -b,g,e,d,h,l,k,m,q,v){this.getBasenames();var c={};""!=d&&d!=mxConstants.NONE&&(c.highlight=d);"auto"!==e&&(c.target=e);m||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(c.zoom=g/100);g=[];l&&(g.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(g.push("zoom"),c.resize=!0);k&&g.push("layers");0<g.length&&(m&&g.push("lightbox"),c.toolbar=g.join(" "));null!=q&&0<q.length&&(c.edit=q);null!= -a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";v(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+ -'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,g,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var d=document.createElement("div");d.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;"; -h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","type-embedhtmldialog");f=h.cloneNode(!0);f.setAttribute("value","copy");d.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));d.appendChild(l);mxUtils.br(d);d.appendChild(h);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));d.appendChild(l);var q=this.getCurrentFile();null==g&&null!=q&&q.constructor==window.DriveFile&&(l= -document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),d.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(q.getId())})));f.setAttribute("checked","checked");null==g&&h.setAttribute("disabled","disabled");c.appendChild(d);var k=this.addLinkSection(c),p=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c, -":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value="100%";c.appendChild(m);var n=this.addCheckbox(c,mxResources.get("fit"),!0),d=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(c,mxResources.get("allPages"),d,!d),F=this.addCheckbox(c,mxResources.get("layers"),!0),D=this.addCheckbox(c,mxResources.get("lightbox"),!0),H=this.addEditButton(c,D),C=H.getEditInput(); -C.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&D.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(h.checked?g:null,p.checked,m.value,k.getTarget(),k.getColor(),n.checked,E.checked,F.checked,D.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()}; -EditorUi.prototype.showPublishLinkDialog=function(a,b,g,d,e,h){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var l=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384", -q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));q.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));k.style.marginTop="12px";k.className="geBtn";q.appendChild(k);c.appendChild(q);k=document.createElement("a"); -k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));q.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok")); -this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,m=null;if(null!=g||null!=d)a+=30,mxUtils.write(c,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",c.appendChild(p),mxUtils.write(c,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px", -m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",c.appendChild(m),mxUtils.br(c);var u=this.addLinkSection(c,h);g=null!=this.pages&&1<this.pages.length;var n=null;if(null==l||l.constructor!=window.DriveFile||b)n=this.addCheckbox(c,mxResources.get("allPages"),g,!g);var t=this.addCheckbox(c,mxResources.get("lightbox"),!0),D=this.addEditButton(c,t),H=D.getEditInput(),C=this.addCheckbox(c,mxResources.get("layers"),!0);C.style.marginLeft=H.style.marginLeft;C.style.marginBottom="16px"; -C.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(C.removeAttribute("disabled"),H.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&t.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==n?!0:n.checked,t.checked,D.getLink(),C.checked,null!=p?p.value:null,null!= -m?m.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; -c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),h=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0);null!=h&&(h.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=h?h.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,h,l,k,m){k=null!=k?k:!0;var c=document.createElement("div");c.style.whiteSpace= -"nowrap";var f=this.editor.graph,g="jpeg"==m?170:280,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(p);mxUtils.write(c,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value=this.lastExportZoom||"100%";c.appendChild(n);mxUtils.write(c,mxResources.get("borderWidth")+ -":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";c.appendChild(u);mxUtils.br(c);var t=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=m),w=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight= -"8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");l&&(c.appendChild(y),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(w,"change",function(){w.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var H=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),C=document.createElement("input");C.style.marginTop= -"16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(c.appendChild(C),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var G=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),I=null!=this.pages&&1<this.pages.length,K=this.addCheckbox(c,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=m);K.style.marginLeft="24px";K.style.marginBottom="16px";I||(K.style.visibility= -"hidden");mxEvent.addListener(G,"change",function(){G.checked&&I?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")});k&&I||K.setAttribute("disabled","disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=n.value;h(n.value,t.checked,!w.checked,H.checked,G.checked,C.checked,u.value,y.checked,!K.checked)}),null,d,e);this.showDialog(a.container,320,g,!0,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,h){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var l=this.addCheckbox(c,mxResources.get("fit"),!0),q=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e, -!e),k=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),m=this.addEditButton(c,p),n=m.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),F=this.addCheckbox(c,mxResources.get("layers"),u,!u);F.style.marginLeft=n.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(u&&F.removeAttribute("disabled"),n.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled")); -n.checked&&p.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(l.checked,q.checked,k.checked,p.checked,m.getLink(),F.checked)}),null,mxResources.get("embed"),h);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,h,l,k,m){function c(b){var c=" ",g="";e&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(h?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var q="";d&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+b+'"'+q+(""!=g?' style="'+g+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}), -null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?c("data:image/png;base64,"+p.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})}; -EditorUi.prototype.createEmbedSvg=function(a,b,d,e,h,l,k){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var p=f[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var m=" ",n="";e&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(h?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+m+"/>")}))}else n="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(h?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=n&&c.setAttribute("style",n),k(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+ -" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,e,d){d()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var f=a.getElementsByTagName("diagram");if(0< +b,g,d,e,h,k,l,m,p,w){this.getBasenames();var c={};""!=e&&e!=mxConstants.NONE&&(c.highlight=e);"auto"!==d&&(c.target=d);m||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(c.zoom=g/100);g=[];k&&(g.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(g.push("zoom"),c.resize=!0);l&&g.push("layers");0<g.length&&(m&&g.push("lightbox"),c.toolbar=g.join(" "));null!=p&&0<p.length&&(c.edit=p);null!= +a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";w(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+ +'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;"; +h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","type-embedhtmldialog");f=h.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(h);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var p=this.getCurrentFile();null==d&&null!=p&&p.constructor==window.DriveFile&&(k= +document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked","checked");null==d&&h.setAttribute("disabled","disabled");c.appendChild(g);var l=this.addLinkSection(c),q=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c, +":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value="100%";c.appendChild(m);var n=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,I=I=this.addCheckbox(c,mxResources.get("allPages"),g,!g),E=this.addCheckbox(c,mxResources.get("layers"),!0),D=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,D),C=G.getEditInput(); +C.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(h.checked?d:null,q.checked,m.value,l.getTarget(),l.getColor(),n.checked,I.checked,E.checked,D.checked,G.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()}; +EditorUi.prototype.showPublishLinkDialog=function(a,b,g,d,e,h){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var k=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384", +p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));p.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));l.style.marginTop="12px";l.className="geBtn";p.appendChild(l);c.appendChild(p);l=document.createElement("a"); +l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));p.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok")); +this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var q=null,m=null;if(null!=g||null!=d)a+=30,mxUtils.write(c,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",c.appendChild(q),mxUtils.write(c,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px", +m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",c.appendChild(m),mxUtils.br(c);var u=this.addLinkSection(c,h);g=null!=this.pages&&1<this.pages.length;var n=null;if(null==k||k.constructor!=window.DriveFile||b)n=this.addCheckbox(c,mxResources.get("allPages"),g,!g);var t=this.addCheckbox(c,mxResources.get("lightbox"),!0),D=this.addEditButton(c,t),G=D.getEditInput(),C=this.addCheckbox(c,mxResources.get("layers"),!0);C.style.marginLeft=G.style.marginLeft;C.style.marginBottom="16px"; +C.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(C.removeAttribute("disabled"),G.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"));G.checked&&t.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==n?!0:n.checked,t.checked,D.getLink(),C.checked,null!=q?q.value:null,null!= +m?m.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,g,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; +c.appendChild(f);var e=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),h=d?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0);null!=h&&(h.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){g(!e.checked,null!=h?h.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,h,k,l,m){l=null!=l?l:!0;var c=document.createElement("div");c.style.whiteSpace= +"nowrap";var f=this.editor.graph,g="jpeg"==m?170:280,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value=this.lastExportZoom||"100%";c.appendChild(n);mxUtils.write(c,mxResources.get("borderWidth")+ +":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";c.appendChild(u);mxUtils.br(c);var t=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=m),z=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight= +"8px";x.style.marginLeft="24px";x.setAttribute("disabled","disabled");x.setAttribute("type","checkbox");k&&(c.appendChild(x),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(z,"change",function(){z.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var G=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),C=document.createElement("input");C.style.marginTop= +"16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(c.appendChild(C),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var F=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=m),H=null!=this.pages&&1<this.pages.length,K=this.addCheckbox(c,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=m);K.style.marginLeft="24px";K.style.marginBottom="16px";H||(K.style.visibility= +"hidden");mxEvent.addListener(F,"change",function(){F.checked&&H?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")});l&&H||K.setAttribute("disabled","disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=n.value;h(n.value,t.checked,!z.checked,G.checked,F.checked,C.checked,u.value,x.checked,!K.checked)}),null,d,e);this.showDialog(a.container,320,g,!0,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,h){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var k=this.addCheckbox(c,mxResources.get("fit"),!0),p=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e, +!e),l=this.addCheckbox(c,d),q=this.addCheckbox(c,mxResources.get("lightbox"),!0),m=this.addEditButton(c,q),n=m.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),E=this.addCheckbox(c,mxResources.get("layers"),u,!u);E.style.marginLeft=n.style.marginLeft;E.style.marginBottom="12px";E.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(u&&E.removeAttribute("disabled"),n.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled")); +n.checked&&q.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(k.checked,p.checked,l.checked,q.checked,m.getLink(),E.checked)}),null,mxResources.get("embed"),h);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,h,k,l,m){function c(b){var c=" ",g="";e&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(h?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";d&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+b+'"'+p+(""!=g?' style="'+g+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}), +null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?c("data:image/png;base64,"+q.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})}; +EditorUi.prototype.createEmbedSvg=function(a,b,d,e,h,k,l){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var q=f[g].getAttribute("href");null!=q&&"#"==q.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var m=" ",n="";e&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(h?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+m+"/>")}))}else n="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(h?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=n&&c.setAttribute("style",n),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+ +" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var f=a.getElementsByTagName("diagram");if(0< f.length){var c=f[0],d=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=c&&(f=b.decompress(mxUtils.getTextContent(c)),null!=f&&0<f.length&&(a=mxUtils.parseXml(f).documentElement))}f=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=f}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph, f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container); -c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(q){null!=b&&b(q)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg= -function(a,b,d,e,h,l,k){k=b.background;k==mxConstants.NONE&&(k=null);b=b.getSvg(k,null,null,null,null,l);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=h)this.convertImages(b,mxUtils.bind(this,function(a){h((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ -mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,h,l,k,m,n){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,h?this.getFileData(!0,null,null,null,d,m):null,n)}catch(x){"Invalid image"==x.message?this.downloadFile(n):this.handleError(x)}}),null, -this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,l,k)}catch(v){this.spinner.stop(),this.handleError(v)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},h=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],g=1;g<c.length;g++){var h= -c[g].indexOf(")");f.push('url("');f.push(e[b(c[g].substring(0,h))]);f.push('"'+c[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<c.length)for(var l=1;l<c.length;l++){var k=c[l].indexOf(")"),m=null,q=c[l].indexOf("format(",k);0<q&&(m=b(c[l].substring(q+7,c[l].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))b= +c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(p){null!=b&&b(p)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg= +function(a,b,d,e,h,k,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,k);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=h)this.convertImages(b,mxUtils.bind(this,function(a){h((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,h,k,l,m,n){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,h?this.getFileData(!0,null,null,null,d,m):null,n)}catch(y){"Invalid image"==y.message?this.downloadFile(n):this.handleError(y)}}),null, +this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,k,l)}catch(w){this.spinner.stop(),this.handleError(w)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},h=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],g=1;g<c.length;g++){var h= +c[g].indexOf(")");f.push('url("');f.push(e[b(c[g].substring(0,h))]);f.push('"'+c[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<c.length)for(var k=1;k<c.length;k++){var l=c[k].indexOf(")"),m=null,p=c[k].indexOf("format(",l);0<p&&(m=b(c[k].substring(p+7,c[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))b= "application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;h()}),mxUtils.bind(this, -function(a){d--;h()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[l].substring(0,k)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,h,l,k,m,n,q,v,x,z,A){l=null!=l?l:!0;x=null!=x?x:this.editor.graph;z=null!=z?z:0;var c=n?null:x.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==n&&(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(c,null,null,A,null,null!=k?k:!0),mxUtils.bind(this,function(f){var d=new Image;d.onload=mxUtils.bind(this, -function(){try{var e=document.createElement("canvas"),g=parseInt(f.getAttribute("width")),q=parseInt(f.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=l?Math.min(1,Math.min(3*b/(4*q),b/g)):b/g);g=Math.ceil(m*g)+2*z;q=Math.ceil(m*q)+2*z;e.setAttribute("width",g);e.setAttribute("height",q);var k=e.getContext("2d");null!=c&&(k.beginPath(),k.rect(0,0,g,q),k.fillStyle=c,k.fill());k.scale(m,m);k.drawImage(d,z/m,z/m);a(e)}catch(P){null!=h&&h(P)}});d.onerror=function(a){null!=h&&h(a)};try{q&&this.editor.graph.addSvgShadow(f); -var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;f.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(x,f,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(f))}))});this.loadFonts(e)}catch(C){null!=h&&h(C)}}),d,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert; -a.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,a.baseUrl.length)==a.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var h=a.getElementsByTagName(d),q=0;q<h.length;q++)mxUtils.bind(this,function(d){var h= -e.convert(d.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var q=f[h];null==q?(c++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,d.setAttribute(g,e));c--;0==c&&b(a)})):d.setAttribute(g,q)}})(h[q])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,h,l){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);h=null!=h?h:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<= -a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout, -function(){h&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(B){null!=d&&d(B)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a, -b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,h){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),l= -this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var q=l.getElementsByTagName("diagram");if(1==q.length)l=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(q[0]))).documentElement;else if(1<q.length){f.model.beginUpdate();try{for(a=0;a<q.length;a++){var k=this.updatePageRoot(new DiagramPage(q[a])),p=this.pages.length;null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,k,k, -p))}}finally{f.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(c=f.importGraphModel(l,b,d,e))}}catch(z){throw h||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}return c};EditorUi.prototype.importLucidChart=function(a,b,d,e,h){var c=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,h)}catch(w){this.handleError(w)}finally{null!=h&&h()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions= -!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,h){h=JSON.parse(a);a=[];if(null!=h.state){h=JSON.parse(h.state);for(var c in h.Pages)a.push(h.Pages[c]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(h);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f= -this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,d,e,h,l,k){l=null!=l?l:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>= -a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(h||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,l,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&& -!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),g=this.importXml(f,b,d,l,!0),0<g.length)return g}catch(v){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+ -";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d), -1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,l);else{c=this.editor.graph;h=null;c.getModel().beginUpdate();try{h=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d), -1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[h])),h.value=a,c.updateCellSize(h),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(h.value)&&c.setLinkForCell(h,h.value),h.geometry.width+=c.gridSize,h.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[h]}}return[]};EditorUi.prototype.formatFileSize= -function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile= -function(a,b,d,e,h,l,k,m,n,q,v){q=null!=q?q:!0;var c=!1,f=null;"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),n=!0)),n||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),q&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,h,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ -a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,q);null!=m&&m(a)})):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(c=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=k&&".vssx"== -k.toLowerCase().substring(k.length-5)&&(k=k.substring(0,k.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,k))):b=this.importXml(a,d,e,q));null!=m&&m(b)}}),k)):/(\.vsd)($|\?)/i.test(k)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==m||m(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,h,l;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4);b+="==";break}h=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}l=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(l&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,e,h,l,k,m,n,q,v,x){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=v||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0, -6)&&a[u].size>p){g=!0;break}var t=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;h=null!=h?h:mxUtils.bind(this,function(a,b,f,d,e,g,h,q,l){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,f,d,e,g,h,q,l,c,x)});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,u=n,t=[],w=mxUtils.bind(this,function(a, -b){t[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(t);else{var c=[];g.getModel().beginUpdate();try{for(var f=0;f<t.length;f++){var d=t[f]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}l(c)}}),z=0;z<n;z++)mxUtils.bind(this,function(c){var l=a[c],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var m=a.target.result,n=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(n+1)))), -t=mxUtils.parseXml(u),u=t.getElementsByTagName("svg");if(0<u.length){var u=u[0],C=x?null:u.getAttribute("content");null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(m.substring(0,n+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var f=a[0],q=parseFloat(f.getAttribute("width")), -k=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox","0 0 "+q+" "+k);else if(isNaN(q)||isNaN(k)){var u=v.split(" ");3<u.length&&(q=parseFloat(u[2]),k=parseFloat(u[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var C=Math.min(1,Math.min(e/Math.max(1,q)),e/Math.max(1,k)),x=h(m,l.type,b+c*p,d+c*p,Math.max(1,Math.round(q*C)),Math.max(1,Math.round(k*C)),l.name);if(isNaN(q)||isNaN(k)){var I=new Image;I.onload=mxUtils.bind(this,function(){q= -Math.max(1,I.width);k=Math.max(1,I.height);x[0].geometry.width=q;x[0].geometry.height=k;f.setAttribute("viewBox","0 0 "+q+" "+k);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[x[0]])});I.src=this.createSvgDataUri(mxUtils.getXml(f))}return x}}}catch(aa){}return null})):w(c,mxUtils.bind(this,function(){return h(C,"text/xml",b+c*p,d+c*p,0,0,l.name)}))}}else{u=!1;if("image/png"==l.type){var I=x?null: -this.extractGraphModelFromPng(a.target.result);if(null!=I&&0<I.length){var z=new Image;z.src=a.target.result;w(c,mxUtils.bind(this,function(){return h(I,"text/xml",b+c*p,d+c*p,z.width,z.height,l.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result, -mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,m){w(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var n=f&&this.isResampleImage(a.target.result,v)?Math.min(1,Math.min(e/k,e/m)):1;return h(g,l.type,b+c*p,d+c*p,Math.round(k*n),Math.round(m*n),l.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else h(a.target.result, -l.type,b+c*p,d+c*p,240,160,l.name,function(a){w(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(l.name)||/(\.vssx)($|\?)/i.test(l.name)?"1"==urlParams.dev?/(\.vssx)($|\?)/i.test(l.name)?(new com.mxgraph.io.mxVssxCodec).decodeVssx(l,mxUtils.bind(this,function(a){w(c,mxUtils.bind(this,function(){var b=l.name;null!=b&&".vssx"==b.toLowerCase().substring(b.length-5)&&(b=b.substring(0,b.length-5)+".xml");this.loadLibrary(new LocalLibrary(this,a,b))}))})):(new com.mxgraph.io.mxVsdxCodec).decodeVsdx(l, -mxUtils.bind(this,function(a){w(c,mxUtils.bind(this,function(){return this.importXml(a,b+c*p,d+c*p)}))})):h(null,l.type,b+c*p,d+c*p,240,160,l.name,function(a){w(c,function(){return a})},l):"image"==l.type.substring(0,5)?m.readAsDataURL(l):m.readAsText(l)})(z)});g?this.confirmImageResize(function(a){f=a;t()},n):t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP? -mxSettings.getResizeImages():null,d=function(f,d){if(f||b)mxSettings.setResizeImages(f?d:null),mxSettings.save();c();a(d)};null==f||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){d(a,!0)},function(a){d(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage|| -mxClient.IS_CHROMEAPP?220:200,!0,!0):d(!1,f)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,h,l){h=null!=h?h:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height); -if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/h,f/h);if(1<g){var q=Math.round(c/g),k=Math.round(f/g),m=document.createElement("canvas");m.width=q;m.height=k;m.getContext("2d").drawImage(a,0,0,q,k);var p=m.toDataURL();if(p.length<b.length){var n=document.createElement("canvas");n.width=q;n.height=k;var u=n.toDataURL();p!==u&&(b=p,c=q,f=k)}}}catch(F){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var b=d,h=0;8>h;h++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[d]= -b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,h){function c(a,b){var c=l;l+=b;return a.substring(c,l)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a, -!0);var l=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);h=a.substring(0,l);do{var q=f(a);if("IDAT"==c(a,4)){h=a.substring(0,l-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);h+=g(d.length)+b+d+g(e^4294967295);h+=a.substring(l-8,a.length);break}h+=a.substring(l-8,l-4+q);c(a,q);c(a,4)}while(q);return"data:image/png;base64,"+ -(window.btoa?btoa(h):Base64.encode(h,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a= -a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(u){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)} -"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,d=this.editor.graph,e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var h=d.addClickHandler;d.addClickHandler=function(b,c,e){var f= -c;c=function(b,c){if(null==c){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(c=e.getAttribute("href"))}null==c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=f&&f(b,c)};h.call(this,b,c,e)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)}; -this.defaultFilename=mxResources.get("untitledDiagram");var l=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:l.apply(this,arguments)};var m=d.createLinkForHint;d.createLinkForHint=function(c,e){var f=d.isPageLink(c);if(f){var h=c.indexOf(",");0<h&&(h=b.getPageById(c.substring(h+1)),e=null!=h?h.getName():mxResources.get("pageNotFound"))}h=m.call(this, -c,e);f&&mxEvent.addListener(h,"click",function(b){a(c);mxEvent.consume(b)});return h};var n=d.labelLinkClicked;d.labelLinkClicked=function(b,c,e){var f=c.getAttribute("href");null==f||!d.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?n.apply(this,arguments):(d.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var B=this.actions.get("print");B.setEnabled(!mxClient.IS_IOS|| -!navigator.standalone);B.visible=B.isEnabled();if(!this.editor.chromeless||this.editor.editable){var q=function(){window.setTimeout(function(){v.innerHTML=" ";v.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle"); -this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||d.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var h=f[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,h){b.insertImage(a, -f,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(S){}}),!1);var v=document.createElement("div");v.style.position="absolute";v.style.whiteSpace="nowrap";v.style.overflow="hidden";v.style.display="block";v.contentEditable=!0;mxUtils.setOpacity(v,0);v.style.width="1px";v.style.height="1px";v.innerHTML= -" ";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==d.container||!d.isEnabled()||d.isMouseDown||d.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||x||(v.style.left=d.container.scrollLeft+10+"px",v.style.top= -d.container.scrollTop+10+"px",d.container.appendChild(v),x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){v.focus();document.execCommand("selectAll",!1,null)},0):(v.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=b&&17!=b&&91!=b||(x=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),v.parentNode.removeChild(v))}),0)}));mxEvent.addListener(v, -"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(v),q())}));mxEvent.addListener(v,"cut",mxUtils.bind(this,function(a){d.isEnabled()&&(this.copyCells(v,!0),q())}));mxEvent.addListener(v,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(v.innerHTML=" ",v.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,v);v.innerHTML=" "}),0))}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed= -function(a){return mxEvent.getSource(a)==v?!0:z.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}), -mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,h){b.insertImage(a,f,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b= -0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<= -mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="250px";B.style.width="2000px";B.style.height="30px";B.style.background= -"whiteSmoke";document.body.appendChild(B);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var E=document.createElement("div");E.style.position="absolute";E.style.top="95px";E.style.left="220px";E.style.width="30px";E.style.height="30px";E.style.background="whiteSmoke";document.body.appendChild(E);this.vRuler=new mxRuler(this.editor.graph, -A,!0);this.hRuler=new mxRuler(this.editor.graph,B,!1)}if("1"==urlParams.test){B=document.getElementById("geFooter");null!=B&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this, -function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var F=this.isSelectionAllowed; -this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:F.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var D=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),D=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null== -D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,"drop",mxUtils.bind(this,function(a){null!=D&&(D.parentNode.removeChild(D),D=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=d.view.translate,e=d.view.scale,f=b.x/e-c.x,h=b.y/e-c.y;mxEvent.isAltDown(a)&&(h=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files, -f,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,f,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var q=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=q;var l=null,c=b.getElementsByTagName("img"); -null!=c&&1==c.length?(q=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(q)||(l=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(q=b[0].getAttribute("href")));var k=!0,m=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(q,f,h,!0,l,null,k))});l&&q.length>this.resampleThreshold?this.confirmImageResize(function(a){k=a;m()},mxEvent.isControlDown(a)):m()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this, -function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,null,"",f,h,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(g,f,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"), -f,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle= -mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged", -mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor); -mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(), -mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus(); -document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent), -f=!1;try{var h=e.lastIndexOf("%3E");0<=h&&h<e.length-3&&(e=e.substring(0,h+3))}catch(B){}try{var c=b.getElementsByTagName("span"),l=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(f=!0,e=l)}catch(B){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&& -(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(B){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b), -b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(), -"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types, -"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this, -function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body; -var h=document.documentElement;d=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container? -this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c= -0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(), -200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);null!=e&&".vssx"==e.toLowerCase().substring(e.length-5)&&(e=e.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b);else this.handleError({message:mxResources.get(413==a.status? -"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml, -this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile= -function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()? -this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]), -this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])), -c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&& -(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(), -this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct(): -this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,h=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified? -null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function h(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a= -decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(K){}return a}if(f.source==(window.opener||window.parent)){var g=f.data;if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(I){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"== -g.action){this.spinner.stop();var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&l.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){k=null;k="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound", -[g.name||this.defaultFilename]),k,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}), -"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(I){l.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var k=1==g.enableRecent,m=1==g.enableSearch,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?l.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml, -name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,k?mxUtils.bind(this,function(a){this.recentReadyCallback=a;l.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;l.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){l.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(k.container, -620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("searchDocsList"==g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,g.errorMsg);else{if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"== -g.action){var n=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var p=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var t=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0); -this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(p);l.postMessage(JSON.stringify(b),"*")}),w=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var t= -this.createTemporaryGraph(t.getStylesheet()),y=t.getGlobalVariable,C=this.pages[0];t.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:y.apply(this,arguments)};document.body.appendChild(t.container);t.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){w(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){w(null)}),null,null,null,null,null,null,t)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+ -"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):w(null)}),mxUtils.bind(this,function(){w(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);n=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),n.xml=mxUtils.getXml(k),n.data=this.getFileData(null,null, -!0,null,null,null,k),n.format=g.format;else if("html"==g.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);n.xml=this.getFileData(!0);n.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1), -"xmlsvg"==g.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(k),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(n),"*")}));return}k="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0), -this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));n.data=this.createSvgDataUri(k)}l.postMessage(JSON.stringify(n),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(k=document.createElement("span"),mxUtils.write(k,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight= -"12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(k),this.embedFilenameSpan=k),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{l.postMessage(JSON.stringify({error:"unknownMessage", -data:JSON.stringify(g)}),"*");return}}}g=h(g);c=!0;try{a(g,f)}catch(I){this.handleError(I)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var G=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=G();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=G();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d, -"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged", -b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||l.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var l=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme? -"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"), -mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight= -"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}), -null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,h=null,l="auto",k="auto",m=40,q=40,n=0,x=this.editor.graph;x.getGraphBounds();for(var z=function(){x.setSelectionCells(U);x.scrollCellToVisible(x.getSelectionCell())},A=x.getFreeInsertPoint(),E=A.x,F=A.y,A=F,D=null,H="auto",C=[],G=null,I=null,K=0;K<b.length&& -"#"==b[K].charAt(0);){a=b[K];for(K++;K<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[K].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[K].substring(1)),K++;if("#"!=a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),O=mxUtils.trim(a.substring(P+1));"label"==Q?D=x.sanitizeHtml(O):"style"==Q?e=O:"identity"==Q&&0<O.length&&"-"!=O?h=O:"width"==Q?l=O:"height"==Q?k=O:"ignore"==Q?I=O.split(","):"connect"==Q?C.push(JSON.parse(O)):"link"==Q?G=O:"padding"==Q?n=parseFloat(O): -"edgespacing"==Q?m=parseFloat(O):"nodespacing"==Q?q=parseFloat(O):"layout"==Q&&(H=O)}}}var S=this.editor.csvToArray(b[K]);a=null;if(null!=h)for(var M=0;M<S.length;M++)if(h==S[M]){a=M;break}null==D&&(D="%"+S[0]+"%");if(null!=C)for(var J=0;J<C.length;J++)null==d[C[J].to]&&(d[C[J].to]={});x.model.beginUpdate();try{for(M=K+1;M<b.length;M++){var T=this.editor.csvToArray(b[M]);if(T.length==S.length){var L=null,X=null!=a?T[a]:null;null!=X&&(L=x.model.getCell(X));null==L&&(L=new mxCell(D,new mxGeometry(E, -A,0,0),e||"whiteSpace=wrap;html=1;"),L.vertex=!0,L.id=X);for(var N=0;N<T.length;N++)x.setAttributeForCell(L,S[N],T[N]);x.setAttributeForCell(L,"placeholders","1");L.style=x.replacePlaceholders(L,L.style);for(J=0;J<C.length;J++)d[C[J].to][L.getAttribute(C[J].to)]=L;null!=G&&"link"!=G&&(x.setLinkForCell(L,L.getAttribute(G)),x.setAttributeForCell(L,G,null));x.fireEvent(new mxEventObject("cellsInserted","cells",[L]));var Y=this.editor.graph.getPreferredSizeForCell(L);L.geometry.width="auto"==l?Y.width+ -n:parseFloat(l);L.geometry.height="auto"==k?Y.height+n:parseFloat(k);A+=L.geometry.height+q;c.push(x.addCell(L))}}for(var V=c.slice(),U=c.slice(),J=0;J<C.length;J++)for(var R=C[J],M=0;M<c.length;M++){var L=c[M],Z=L.getAttribute(R.from);if(null!=Z){x.setAttributeForCell(L,R.from,null);for(var W=Z.split(","),N=0;N<W.length;N++){var ba=d[R.to][W[N]];null!=ba&&(D=R.label,null!=R.fromlabel&&(D=(L.getAttribute(R.fromlabel)||"")+(D||"")),null!=R.tolabel&&(D=(D||"")+(ba.getAttribute(R.tolabel)||"")),U.push(x.insertEdge(null, -null,D||"",R.invert?ba:L,R.invert?L:ba,R.style||x.createCurrentEdgeStyle())),mxUtils.remove(R.invert?L:ba,V))}}}if(null!=I)for(M=0;M<c.length;M++)for(L=c[M],N=0;N<I.length;N++)x.setAttributeForCell(L,mxUtils.trim(I[N]),null);var ca=new mxParallelEdgeLayout(x);ca.spacing=m;var ga=function(){ca.execute(x.getDefaultParent());for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==l&&(b.width=Math.round(x.snap(b.width)));"auto"==k&&(b.height= -Math.round(x.snap(b.height)))}};if("circle"==H){var da=new mxCircleLayout(x);da.resetEdges=!1;var ha=da.isVertexIgnored;da.isVertexIgnored=function(a){return ha.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(x.getDefaultParent());ga()},!0,z);z=null}else if("horizontaltree"==H||"verticaltree"==H||"auto"==H&&U.length==2*c.length-1&&1==V.length){x.view.validate();var ea=new mxCompactTreeLayout(x,"horizontaltree"==H);ea.levelDistance=q;ea.edgeRouting=!1;ea.resetEdges= -!1;this.executeLayout(function(){ea.execute(x.getDefaultParent(),0<V.length?V[0]:null)},!0,z);z=null}else if("horizontalflow"==H||"verticalflow"==H||"auto"==H&&1==V.length){x.view.validate();var fa=new mxHierarchicalLayout(x,"horizontalflow"==H?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fa.intraCellSpacing=q;fa.disableEdgeStyle=!1;this.executeLayout(function(){fa.execute(x.getDefaultParent(),U);x.moveCells(U,E,F)},!0,z);z=null}else if("organic"==H||"auto"==H&&U.length>c.length){x.view.validate(); -var aa=new mxFastOrganicLayout(x);aa.forceConstant=3*q;aa.resetEdges=!1;var ia=aa.isVertexIgnored;aa.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(x);ca.spacing=m;this.executeLayout(function(){aa.execute(x.getDefaultParent());ga()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&& -null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&& -(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a= -this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2* -a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a, -8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat= -e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var h=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=h.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient|| -c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled(); -this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(d);this.menus.get("newLibrary").setEnabled(d);this.menus.get("extras").setEnabled(d); -a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!= -this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding= -"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b= -'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+ -IMAGE_PATH+'/clear.gif"/>'}a!=h&&(this.offlineStatus.innerHTML=b,h=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){}; -EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b); -this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b); -this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("rename").setEnabled(null!=d&&d.isRenamable());this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted()); -a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.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(a,b,d,e,h,l){var c=a.editor.graph;if("xml"== -d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,h,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),k=Math.floor(g.width*h/c.view.scale),m=Math.floor(g.height*h/c.view.scale);f.length<=MAX_REQUEST_SIZE&&k*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+ -encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+k+"&h="+m+"&border="+l+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor}, +function(a){d--;h()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[k].substring(0,l)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,h,k,l,m,n,p,w,y,B,A){k=null!=k?k:!0;y=null!=y?y:this.editor.graph;B=null!=B?B:0;var c=n?null:y.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==n&&(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(y.getSvg(c,null,null,A,null,null!=l?l:!0),mxUtils.bind(this,function(f){var d=new Image;d.onload=mxUtils.bind(this, +function(){try{var e=document.createElement("canvas"),g=parseInt(f.getAttribute("width")),p=parseInt(f.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=k?Math.min(1,Math.min(3*b/(4*p),b/g)):b/g);g=Math.ceil(m*g)+2*B;p=Math.ceil(m*p)+2*B;e.setAttribute("width",g);e.setAttribute("height",p);var l=e.getContext("2d");null!=c&&(l.beginPath(),l.rect(0,0,g,p),l.fillStyle=c,l.fill());l.scale(m,m);l.drawImage(d,B/m,B/m);a(e)}catch(P){null!=h&&h(P)}});d.onerror=function(a){null!=h&&h(a)};try{p&&this.editor.graph.addSvgShadow(f); +var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;f.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(y,f,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(f))}))});this.loadFonts(e)}catch(C){null!=h&&h(C)}}),d,w)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert, +d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:f&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url="+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments))}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var h=a.getElementsByTagName(d), +p=0;p<h.length;p++)mxUtils.bind(this,function(d){var h=e.convert(d.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var p=f[h];null==p?(c++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,d.setAttribute(g,e));c--;0==c&&b(a)})):d.setAttribute(g,p)}else null!=h&&d.setAttribute(g,h)})(h[p])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,h,k){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);h= +null!=h?h:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}k=null!=k?k:"data:image/png;base64,";f=k+this.base64Encode(f)}b(f)}}else null!= +d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){h&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=d&&d(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0, +23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,f=this;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);try{b(a.toDataURL())}catch(x){b(f.svgBrokenImage.src)}}; +c.onerror=function(){b(f.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,h){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(p[0]))).documentElement;else if(1<p.length){f.model.beginUpdate(); +try{for(a=0;a<p.length;a++){var l=this.updatePageRoot(new DiagramPage(p[a])),m=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,l,l,m))}}finally{f.model.endUpdate()}}}null!=k&&"mxGraphModel"===k.nodeName&&(c=f.importGraphModel(k,b,d,e))}}catch(B){throw h||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return c};EditorUi.prototype.importVisio=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)}); +var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)try{this.doImportVisio(a,b,d)}catch(u){d(u)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"===typeof VsdxExport|| +this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,d,e,h){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,h)}catch(x){this.handleError(x)}finally{null!=h&&h()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js", +c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,h){h=JSON.parse(a);a=[];if(null!=h.state){h=JSON.parse(h.state);for(var c in h.Pages)a.push(h.Pages[c]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(h);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(), +this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,d,e,h,k,l){k=null!=k?k:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText, +b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(h||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,k,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+ +1)),g=this.importXml(f,b,d,k,!0),0<g.length)return g}catch(w){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/ +f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells", +[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,k);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,k);else{c=this.editor.graph;h=null;c.getModel().beginUpdate();try{h=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[h])),h.value= +a,c.updateCellSize(h),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(h.value)&&c.setLinkForCell(h,h.value),h.geometry.width+=c.gridSize,h.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[h]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+ +" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,d,e,h,k,l,m,n,p,w){p=null!=p?p:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0, +10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,d,e,p);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=w?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,p),n=!0)),n||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),p&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,h,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,p);null!=m&&m(a)})):null!=n&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l))?(c=!0,this.importVisio(n,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(c=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&& +299>=a.status?g(a.responseText):null!=m&&m(null))}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,p));c||null==m||m(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,h,k;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}h=a.charCodeAt(c++);if(c==d){b+= +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h& +15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,e,h,k,l,m,n,p,w,y){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;p=null!=p?p:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=w||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>q){g=!0;break}var u=mxUtils.bind(this,function(){var g=this.editor.graph, +n=g.gridSize;h=null!=h?h:mxUtils.bind(this,function(a,b,f,d,e,g,h,p,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,f,d,e,g,h,p,k,c,y)});k=null!=k?k:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,t=q,u=[],v=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--t){this.spinner.stop();if(null!=m)m(u);else{var c=[];g.getModel().beginUpdate(); +try{for(var f=0;f<u.length;f++){var d=u[f]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}k(c)}}),x=0;x<q;x++)mxUtils.bind(this,function(c){var k=a[c],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var m=a.target.result,q=m.indexOf(","),t=decodeURIComponent(escape(atob(m.substring(q+1)))),u=mxUtils.parseXml(t),t=u.getElementsByTagName("svg");if(0<t.length){var t=t[0],C=y?null:t.getAttribute("content"); +null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?v(c,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var f=a[0],p=parseFloat(f.getAttribute("width")),l=parseFloat(f.getAttribute("height")),w=f.getAttribute("viewBox");if(null==w||0==w.length)f.setAttribute("viewBox", +"0 0 "+p+" "+l);else if(isNaN(p)||isNaN(l)){var t=w.split(" ");3<t.length&&(p=parseFloat(t[2]),l=parseFloat(t[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var C=Math.min(1,Math.min(e/Math.max(1,p)),e/Math.max(1,l)),y=h(m,k.type,b+c*n,d+c*n,Math.max(1,Math.round(p*C)),Math.max(1,Math.round(l*C)),k.name);if(isNaN(p)||isNaN(l)){var H=new Image;H.onload=mxUtils.bind(this,function(){p=Math.max(1,H.width);l=Math.max(1,H.height);y[0].geometry.width=p;y[0].geometry.height=l;f.setAttribute("viewBox","0 0 "+ +p+" "+l);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[y[0]])});H.src=this.createSvgDataUri(mxUtils.getXml(f))}return y}}}catch(aa){}return null})):v(c,mxUtils.bind(this,function(){return h(C,"text/xml",b+c*n,d+c*n,0,0,k.name)}))}}else{t=!1;if("image/png"==k.type){var H=y?null:this.extractGraphModelFromPng(a.target.result);if(null!=H&&0<H.length){var x=new Image;x.src=a.target.result;v(c,mxUtils.bind(this, +function(){return h(H,"text/xml",b+c*n,d+c*n,x.width,x.height,k.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,l,m){v(c,mxUtils.bind(this, +function(){if(null!=g&&g.length<p){var q=f&&this.isResampleImage(a.target.result,w)?Math.min(1,Math.min(e/l,e/m)):1;return h(g,k.type,b+c*n,d+c*n,Math.round(l*q),Math.round(m*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,w)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else h(a.target.result,k.type,b+c*n,d+c*n,240,160,k.name,function(a){v(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)|| +/(\.vssx)($|\?)/i.test(k.name)?h(null,k.type,b+c*n,d+c*n,240,160,k.name,function(a){v(c,function(){return a})},k):"image"==k.type.substring(0,5)?m.readAsDataURL(k):m.readAsText(k)})(x)});g?this.confirmImageResize(function(a){f=a;u()},n):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(f,d){if(f||b)mxSettings.setResizeImages(f? +d:null),mxSettings.save();c();a(d)};null==f||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){d(a,!0)},function(a){d(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):d(!1,f)};EditorUi.prototype.parseFile=function(a,b, +d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,h,k){h=null!=h?h:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var g=Math.max(c/h,f/h);if(1<g){var p=Math.round(c/ +g),l=Math.round(f/g),m=document.createElement("canvas");m.width=p;m.height=l;m.getContext("2d").drawImage(a,0,0,p,l);var n=m.toDataURL();if(n.length<b.length){var q=document.createElement("canvas");q.width=p;q.height=l;var t=q.toDataURL();n!==t&&(b=n,c=p,f=l)}}}catch(E){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var b=e,h=0;8>h;h++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[e]=b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^ +b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,h){function c(a,b){var c=k;k+=b;return a.substring(c,k)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a, +4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);h=a.substring(0,k);do{var p=f(a);if("IDAT"==c(a,4)){h=a.substring(0,k-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);h+=g(d.length)+b+d+g(e^4294967295);h+=a.substring(k-8,a.length);break}h+=a.substring(k-8,k-4+p);c(a,p);c(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(h):Base64.encode(h,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b= +null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(u){}null!= +b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,d=this.editor.graph, +e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var h=d.addClickHandler;d.addClickHandler=function(b,c,e){var f=c;c=function(b,c){if(null==c){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(c=e.getAttribute("href"))}null== +c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=f&&f(b,c)};h.call(this,b,c,e)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"== +a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:l.apply(this,arguments)};var m=d.createLinkForHint;d.createLinkForHint=function(c,e){var f=d.isPageLink(c);if(f){var h=c.indexOf(",");0<h&&(h=b.getPageById(c.substring(h+1)),e=null!=h?h.getName():mxResources.get("pageNotFound"))}h=m.call(this,c,e);f&&mxEvent.addListener(h,"click",function(b){a(c);mxEvent.consume(b)});return h};var n=d.labelLinkClicked;d.labelLinkClicked= +function(b,c,e){var f=c.getAttribute("href");null==f||!d.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?n.apply(this,arguments):(d.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||this.editor.editable){var p= +function(){window.setTimeout(function(){w.innerHTML=" ";w.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||d.container.addEventListener("paste", +mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var h=f[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,h){b.insertImage(a,f,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()}); +else{var g=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(S){}}),!1);var w=document.createElement("div");w.style.position="absolute";w.style.whiteSpace="nowrap";w.style.overflow="hidden";w.style.display="block";w.contentEditable=!0;mxUtils.setOpacity(w,0);w.style.width="1px";w.style.height="1px";w.innerHTML=" ";var y=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86, +null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==d.container||!d.isEnabled()||d.isMouseDown||d.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||y||(w.style.left=d.container.scrollLeft+10+"px",w.style.top=d.container.scrollTop+10+"px",d.container.appendChild(w),y=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){w.focus();document.execCommand("selectAll", +!1,null)},0):(w.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!y||224!=b&&17!=b&&91!=b||(y=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),w.parentNode.removeChild(w))}),0)}));mxEvent.addListener(w,"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(w),p())}));mxEvent.addListener(w,"cut",mxUtils.bind(this, +function(a){d.isEnabled()&&(this.copyCells(w,!0),p())}));mxEvent.addListener(w,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(w.innerHTML=" ",w.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,w);w.innerHTML=" "}),0))}),!0);var B=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==w?!0:B.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight|| +0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation(); +a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,h){b.insertImage(a,f,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list"); +/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types, +"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){v=document.createElement("div");v.style.position="absolute";v.style.top="95px";v.style.left="250px";v.style.width="2000px";v.style.height="30px";v.style.background="whiteSmoke";document.body.appendChild(v);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px"; +A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var I=document.createElement("div");I.style.position="absolute";I.style.top="95px";I.style.left="220px";I.style.width="30px";I.style.height="30px";I.style.background="whiteSmoke";document.body.appendChild(I);this.vRuler=new mxRuler(this.editor.graph,A,!0);this.hRuler=new mxRuler(this.editor.graph,v,!1)}if("1"==urlParams.test){v=document.getElementById("geFooter");null!=v&&(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)})),v.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, +mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var E=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:E.apply(this,arguments)}}v=document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&& +(!this.editor.chromeless||this.editor.editable)){var D=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),D=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container, +"drop",mxUtils.bind(this,function(a){null!=D&&(D.parentNode.removeChild(D),D=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=d.view.translate,e=d.view.scale,f=b.x/e-c.x,h=b.y/e-c.y;mxEvent.isAltDown(a)&&(h=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")? +a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,f,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var p=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=p;var k=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(p=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(p)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&& +(p=b[0].getAttribute("href")));var l=!0,m=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(p,f,h,!0,k,null,l))});k&&p.length>this.resampleThreshold?this.confirmImageResize(function(a){l=a;m()},mxEvent.isControlDown(a)):m()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null, +null,"",f,h,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(g,f,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()}; +EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged", +mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat= +mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave); +mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph; +if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"=== +c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var h=e.lastIndexOf("%3E");0<=h&&h<e.length-3&&(e=e.substring(0,h+3))}catch(v){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e); +this.isCompatibleString(k)&&(f=!0,e=k)}catch(v){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&& +this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&& +12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0); +else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))): +0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash= +"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var h=document.documentElement;d=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth, +e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a); +var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!= +e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(w){this.handleError(w,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a, +e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})); +else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this, +c.target.result,a.name))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(), +e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"), +null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root, +a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW]))); +for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")}; +EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()): +(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))}; +EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,h=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))): +this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function h(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(K){}return a}if(f.source== +(window.opener||window.parent)){var g=f.data;if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(H){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey): +null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){l=null;l="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft", +result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()})); +try{l.init()}catch(H){k.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var l=1==g.enableRecent,m=1==g.enableSearch,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null, +null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"== +g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,g.errorMsg);else{if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var n=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body, +n):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var q=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var t=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(q); +k.postMessage(JSON.stringify(b),"*")}),x=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var t=this.createTemporaryGraph(t.getStylesheet()),z=t.getGlobalVariable,C=this.pages[0];t.getGlobalVariable=function(a){return"page"== +a?C.getName():"pagenumber"==a?1:z.apply(this,arguments)};document.body.appendChild(t.container);t.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){x(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){x(null)}),null,null,null,null,null,null,t)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()? +u("data:image/png;base64,"+a.getText()):x(null)}),mxUtils.bind(this,function(){x(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);n=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),n.xml=mxUtils.getXml(l),n.data=this.getFileData(null,null,!0,null,null,null,l),n.format=g.format;else if("html"==g.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph), +n.xml=mxUtils.getXml(q),n.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);n.xml=this.getFileData(!0);n.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0); +this.spinner.stop();n.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(n),"*")}));return}l="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));n.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(n), +"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop= +"6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}}g=h(g);c=!0;try{a(g,f)}catch(H){this.handleError(H)}c=!1;null!=urlParams.modified&& +this.editor.setStatus("");var F=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=F();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=F();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged", +b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}})); +var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title", +mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding= +"4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b); +this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv= +function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,h=null,k="auto",l="auto",m=40,p=40,n=0,y=this.editor.graph;y.getGraphBounds();for(var B=function(){y.setSelectionCells(U);y.scrollCellToVisible(y.getSelectionCell())},A=y.getFreeInsertPoint(),I=A.x,E=A.y,A=E,D=null,G="auto",C=[],F=null,H=null,K=0;K<b.length&&"#"==b[K].charAt(0);){a=b[K];for(K++;K<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[K].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[K].substring(1)),K++;if("#"!= +a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),O=mxUtils.trim(a.substring(P+1));"label"==Q?D=y.sanitizeHtml(O):"style"==Q?e=O:"identity"==Q&&0<O.length&&"-"!=O?h=O:"width"==Q?k=O:"height"==Q?l=O:"ignore"==Q?H=O.split(","):"connect"==Q?C.push(JSON.parse(O)):"link"==Q?F=O:"padding"==Q?n=parseFloat(O):"edgespacing"==Q?m=parseFloat(O):"nodespacing"==Q?p=parseFloat(O):"layout"==Q&&(G=O)}}}var S=this.editor.csvToArray(b[K]);a=null;if(null!=h)for(var M=0;M<S.length;M++)if(h== +S[M]){a=M;break}null==D&&(D="%"+S[0]+"%");if(null!=C)for(var J=0;J<C.length;J++)null==d[C[J].to]&&(d[C[J].to]={});y.model.beginUpdate();try{for(M=K+1;M<b.length;M++){var T=this.editor.csvToArray(b[M]);if(T.length==S.length){var L=null,X=null!=a?T[a]:null;null!=X&&(L=y.model.getCell(X));null==L&&(L=new mxCell(D,new mxGeometry(I,A,0,0),e||"whiteSpace=wrap;html=1;"),L.vertex=!0,L.id=X);for(var N=0;N<T.length;N++)y.setAttributeForCell(L,S[N],T[N]);y.setAttributeForCell(L,"placeholders","1");L.style=y.replacePlaceholders(L, +L.style);for(J=0;J<C.length;J++)d[C[J].to][L.getAttribute(C[J].to)]=L;null!=F&&"link"!=F&&(y.setLinkForCell(L,L.getAttribute(F)),y.setAttributeForCell(L,F,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[L]));var Y=this.editor.graph.getPreferredSizeForCell(L);L.geometry.width="auto"==k?Y.width+n:parseFloat(k);L.geometry.height="auto"==l?Y.height+n:parseFloat(l);A+=L.geometry.height+p;c.push(y.addCell(L))}}for(var V=c.slice(),U=c.slice(),J=0;J<C.length;J++)for(var R=C[J],M=0;M<c.length;M++){var L= +c[M],Z=L.getAttribute(R.from);if(null!=Z){y.setAttributeForCell(L,R.from,null);for(var W=Z.split(","),N=0;N<W.length;N++){var ba=d[R.to][W[N]];null!=ba&&(D=R.label,null!=R.fromlabel&&(D=(L.getAttribute(R.fromlabel)||"")+(D||"")),null!=R.tolabel&&(D=(D||"")+(ba.getAttribute(R.tolabel)||"")),U.push(y.insertEdge(null,null,D||"",R.invert?ba:L,R.invert?L:ba,R.style||y.createCurrentEdgeStyle())),mxUtils.remove(R.invert?L:ba,V))}}}if(null!=H)for(M=0;M<c.length;M++)for(L=c[M],N=0;N<H.length;N++)y.setAttributeForCell(L, +mxUtils.trim(H[N]),null);var ca=new mxParallelEdgeLayout(y);ca.spacing=m;var ga=function(){ca.execute(y.getDefaultParent());for(var a=0;a<c.length;a++){var b=y.getCellGeometry(c[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==k&&(b.width=Math.round(y.snap(b.width)));"auto"==l&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==G){var da=new mxCircleLayout(y);da.resetEdges=!1;var ha=da.isVertexIgnored;da.isVertexIgnored=function(a){return ha.apply(this,arguments)||0>mxUtils.indexOf(c, +a)};this.executeLayout(function(){da.execute(y.getDefaultParent());ga()},!0,B);B=null}else if("horizontaltree"==G||"verticaltree"==G||"auto"==G&&U.length==2*c.length-1&&1==V.length){y.view.validate();var ea=new mxCompactTreeLayout(y,"horizontaltree"==G);ea.levelDistance=p;ea.edgeRouting=!1;ea.resetEdges=!1;this.executeLayout(function(){ea.execute(y.getDefaultParent(),0<V.length?V[0]:null)},!0,B);B=null}else if("horizontalflow"==G||"verticalflow"==G||"auto"==G&&1==V.length){y.view.validate();var fa= +new mxHierarchicalLayout(y,"horizontalflow"==G?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fa.intraCellSpacing=p;fa.disableEdgeStyle=!1;this.executeLayout(function(){fa.execute(y.getDefaultParent(),U);y.moveCells(U,I,E)},!0,B);B=null}else if("organic"==G||"auto"==G&&U.length>c.length){y.view.validate();var aa=new mxFastOrganicLayout(y);aa.forceConstant=3*p;aa.resetEdges=!1;var ia=aa.isVertexIgnored;aa.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,a)}; +ca=new mxParallelEdgeLayout(y);ca.spacing=m;this.executeLayout(function(){aa.execute(y.getDefaultParent());ga()},!0,B);B=null}this.hideDialog()}finally{y.model.endUpdate()}null!=B&&B()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b}; +EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container, +440,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/ +b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d= +this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ +a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,h=b.outline;h.pageScale=e.pageScale;h.pageFormat=e.pageFormat;h.background=e.background;h.pageVisible=e.pageVisible;h.background=e.background;var f=mxUtils.getCurrentStyle(e.container);h.container.style.backgroundColor=f.backgroundColor;null!=e.view.backgroundPageShape&& +null!=h.view.backgroundPageShape&&(h.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient|| +c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d); +this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(d);this.menus.get("newLibrary").setEnabled(d);this.menus.get("extras").setEnabled(d);a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b); +this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div"); +this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this, +function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b='<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b= +'<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=h&&(this.offlineStatus.innerHTML=b,h=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e, +"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates= +function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&& +!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!= +d&&!d.isRestricted());this.actions.get("tags").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("rename").setEnabled(null!=d&&d.isRenamable());this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.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(a,b,d,e,h,k){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,h,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*h/c.view.scale), +m=Math.floor(g.height*h/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+m+"&border="+k+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor}, setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries= a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins= a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle}, @@ -6942,27 +6942,27 @@ mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSet mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert, null==mxSettings.settings.currentEdgeStyle?mxSettings.settings.currentEdgeStyle=Graph.prototype.defaultEdgeStyle:10>=mxSettings.settings.version&&(mxSettings.settings.currentEdgeStyle.orthogonalLoop=1,mxSettings.settings.currentEdgeStyle.jettySize="auto"),null==mxSettings.settings.currentVertexStyle&&(mxSettings.settings.currentVertexStyle=Graph.prototype.defaultVertexStyle),null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat= mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}}; -("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,e,d){EditorUi.call(this,a,e,null!=d?d:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=": +("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,d,e){EditorUi.call(this,a,d,null!=e?e:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=": (new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,d,e){var b=null;try{b=window.open(a)}catch(m){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,d,e)).container,320,140,!0,!0):null!=d&&d()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.isOffline()||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979"); this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(b){null!=window.console&&console.log("Plugin Error:",b,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive"; App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="https://unpkg.com/dropbox@2.5.13/dist/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js"; App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js","import":"/plugins/import.js", replay:"/plugins/replay.js",anon:"/plugins/anonymize.js",tr:"/plugins/trello.js"}; -App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),d=0;d<e.length;d++){var b=mxUtils.trim(e[d]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",a))}return a}; +App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var d=document.cookie.split(";"),e=0;e<d.length;e++){var b=mxUtils.trim(d[e]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie="MODE=; expires="+d.toUTCString(),localStorage.setItem(".mode",a))}return a}; (function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&& "#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js",null,null,null,mxClient.IS_SVG):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"== window.location.hash.substring(0,2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient= null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})(); -App.main=function(a,e){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,e,h,l){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var c=new Image,f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";c.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+ -"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=h?":colno:"+encodeURIComponent(h):"")+(null!=l&&null!=l.stack?"&stack="+encodeURIComponent(l.stack):"")}}catch(w){}});if(null!=window.mxscript){if("1"==urlParams.offline){mxscript("js/shapes.min.js");var b=document.createElement("iframe");b.setAttribute("width","0");b.setAttribute("height","0");b.setAttribute("src","offline.html");document.body.appendChild(b)}if("0"!=urlParams.plugins&& -"1"!=urlParams.offline){var b=mxSettings.getPlugins(),h=urlParams.p;App.initPluginCallback();if(null!=h){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var l=h.split(";"),h=0;h<l.length;h++){var m=App.pluginRegistry[l[h]];null!=m?mxscript(k+m):null!=window.console&&console.log("Unknown plugin:",l[h])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);if(null!=b&&0<b.length&&"0"!=urlParams.plugins){k= -window.location.protocol+"//"+window.location.host;l=!0;for(h=0;h<b.length&&l;h++)"/"!=b[h].charAt(0)&&b[h].substring(0,k.length)!=k&&(l=!1);if(l||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[b.join("\n")]).replace(/\\n/g,"\n")))for(h=0;h<b.length;h++)try{mxscript(b[h])}catch(n){}}}"function"=== -typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();mxResources.loadDefaultBundle=!1;b=mxResources.getDefaultBundle(RESOURCE_BASE, -mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[b]:[b,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(b){mxResources.parse(b[0].getText());1<b.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=b[1].getDocumentElement());b=null!=e?e():new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&& -("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&& -("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")|| -10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))}, -function(){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; +App.main=function(a,d){var e=null;EditorUi.enableLogging&&(window.onerror=function(a,b,d,h,k){try{if(a!=e&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){e=a;var c=new Image,f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";c.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+ +"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=h?":colno:"+encodeURIComponent(h):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(x){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var b=document.createElement("iframe");b.setAttribute("width","0");b.setAttribute("height", +"0");b.setAttribute("src","offline.html");document.body.appendChild(b)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var b=mxSettings.getPlugins(),h=urlParams.p;App.initPluginCallback();if(null!=h){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var l=h.split(";"),h=0;h<l.length;h++){var m=App.pluginRegistry[l[h]];null!=m?mxscript(k+m):null!=window.console&&console.log("Unknown plugin:",l[h])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL, +null,null,null,mxClient.IS_SVG);if(null!=b&&0<b.length&&"0"!=urlParams.plugins){k=window.location.protocol+"//"+window.location.host;l=!0;for(h=0;h<b.length&&l;h++)"/"!=b[h].charAt(0)&&b[h].substring(0,k.length)!=k&&(l=!1);if(l||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[b.join("\n")]).replace(/\\n/g, +"\n")))for(h=0;h<b.length;h++)try{mxscript(b[h])}catch(n){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath(); +mxResources.loadDefaultBundle=!1;b=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[b]:[b,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(b){mxResources.parse(b[0].getText());1<b.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=b[1].getDocumentElement());b=null!=d?d():new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"=== +typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"=== +typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!= +urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:", +"1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg=="; App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=": IMAGE_PATH+"/chevron-up.png"; App.prototype.chevronDownImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC":IMAGE_PATH+ @@ -6972,116 +6972,116 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+ "/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.timeout=25E3;"1"!=urlParams.embed?App.prototype.menubarHeight=60:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})}; App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})); -if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){"undefined"!== -typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this); +if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}if("1"!=urlParams.embed||"1"==urlParams.tr){var d=mxUtils.bind(this,function(){"undefined"!== +typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var e=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this); "420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries(); this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null== -window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&& +window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&& (window.DrawDropboxClientCallback=b)});b()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader(); null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src", IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))}; App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname}; -App.prototype.checkLicense=function(){var a=this.drive.getUser(),e=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=e){var d=e.lastIndexOf("@"),b=e;0<=d&&(b=e.substring(d+1));mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(e)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var d= +App.prototype.checkLicense=function(){var a=this.drive.getUser(),d=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=d){var e=d.lastIndexOf("@"),b=d;0<=e&&(b=d.substring(e+1));mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(d)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var d= a.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,b)}}}catch(m){}}))}}; -App.prototype.handleLicense=function(a,e){var d=document.getElementById("geFooter"),b=null;if(null!=d&&null!=a)if(b=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=b&&"never"!=b){var h=new Date(Date.parse(b)),k=Math.round((h-Date.now())/864E5);if(90>k){var l="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(e);d.style.height="100%";d.style.margin="0px";d.style.display= -"";0>k?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+l+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[e,h.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+ -l+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[e,h.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return b};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.chromeless&&this.editor.graph.lightbox&&null==a.realtime?a.getData():this.getFileData(!0)}; +App.prototype.handleLicense=function(a,d){var e=document.getElementById("geFooter"),b=null;if(null!=e&&null!=a)if(b=a.expiry,null!=a.footer)e.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=b&&"never"!=b){var h=new Date(Date.parse(b)),k=Math.round((h-Date.now())/864E5);if(90>k){var l="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(d);e.style.height="100%";e.style.margin="0px";e.style.display= +"";0>k?(this.footerHeight=80,e.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+l+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[d,h.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,e.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+ +l+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[d,h.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return b};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.chromeless&&this.editor.graph.lightbox&&null==a.realtime?a.getData():this.getFileData(!0)}; App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null}; -App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var d=0;d<e.length;d++)e[d].id==a.id&&e.splice(d,1);null!=e&&(e.unshift(a),e=e.slice(0,5),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(e){}return null}}; -App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}}; +App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var d=this.getRecent();if(null==d)d=[];else for(var e=0;e<d.length;e++)d[e].id==a.id&&d.splice(e,1);null!=d&&(d.unshift(a),d=d.slice(0,5),localStorage.setItem(".recent",JSON.stringify(d)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(d){}return null}}; +App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(d){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}}; App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.chromeless){if(a.constructor!=DriveFile&&a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")}; -App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var a=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=e&&(a=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],e,d=0;256>d;d++){e=d;for(var b=0;8>b;b++)e=e&1?3988292384^e>>>1:e>>>1;a[d]=e}return a}; -App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var e=-1,d=0;d<a.length;d++)e=e>>>8^this.crcTable[(e^a.charCodeAt(d))&255];return(e^-1)>>>0}; -App.prototype.getThumbnail=function(a,e){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var b=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),h=b.getGlobalVariable,k=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:h.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!b.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this, -function(a){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},null,null,null,null,null,null,b),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),m=b.getGraphBounds(),n=a/m.width,n=Math.min(1,Math.min(3*a/(4*m.height),n)),c=Math.floor(m.x),f=Math.floor(m.y);l.setAttribute("width",Math.ceil(n*(m.width+4)));l.setAttribute("height",Math.ceil(n*(m.height+4)));var g=l.getContext("2d"); -g.scale(n,n);g.translate(-c,-f);var p=b.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";g.save();g.fillStyle=p;g.fillRect(c,f,Math.ceil(m.width+4),Math.ceil(m.height+4));g.restore();var u=new mxJsCanvas(l),t=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};w.drawText=function(a, -b){};w.drawState(b.getView().getState(b.model.root),t);t.finish(mxUtils.bind(this,function(){w.drawState(b.getView().getState(b.model.root),u);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(l)}));d=!0}}catch(y){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}return d}; +App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var a=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=d&&(a=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],d,e=0;256>e;e++){d=e;for(var b=0;8>b;b++)d=d&1?3988292384^d>>>1:d>>>1;a[e]=d}return a}; +App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var d=-1,e=0;e<a.length;e++)d=d>>>8^this.crcTable[(d^a.charCodeAt(e))&255];return(d^-1)>>>0}; +App.prototype.getThumbnail=function(a,d){var e=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var b=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),h=b.getGlobalVariable,k=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:h.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!b.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this, +function(a){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);d(a)}),a,this.thumbImageCache,"#ffffff",function(){d()},null,null,null,null,null,null,b),e=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),m=b.getGraphBounds(),n=a/m.width,n=Math.min(1,Math.min(3*a/(4*m.height),n)),c=Math.floor(m.x),f=Math.floor(m.y);l.setAttribute("width",Math.ceil(n*(m.width+4)));l.setAttribute("height",Math.ceil(n*(m.height+4)));var g=l.getContext("2d"); +g.scale(n,n);g.translate(-c,-f);var q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";g.save();g.fillStyle=q;g.fillRect(c,f,Math.ceil(m.width+4),Math.ceil(m.height+4));g.restore();var u=new mxJsCanvas(l),t=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var x=new mxImageExport;x.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};x.drawText=function(a, +b){};x.drawState(b.getView().getState(b.model.root),t);t.finish(mxUtils.bind(this,function(){x.drawState(b.getView().getState(b.model.root),u);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);d(l)}));e=!0}}catch(z){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}return e}; App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a}; -(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+1);document.cookie="MODE="+e+"; expires="+b.toUTCString()}null!=this.appIcon&&(b=this.getCurrentFile(),e=null!=b?b.getMode():null,e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt", -[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})(); -App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e.desc&&null!=e.desc.mimeType?this.openLink("https://drive.google.com/drive/u/0/search?q=type:"+e.desc.mimeType+"&authuser=0"):null!=e.desc&&0<e.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"): -d==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):d==App.MODE_TRELLO?this.openLink("https://trello.com/"):d==App.MODE_GITHUB&&(null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}}; +(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,e){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(e)if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+1);document.cookie="MODE="+d+"; expires="+b.toUTCString()}null!=this.appIcon&&(b=this.getCurrentFile(),d=null!=b?b.getMode():null,d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt", +[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):d==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})(); +App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var d=this.getCurrentFile(),e=null!=d?d.getMode():null;e==App.MODE_GOOGLE?null!=d.desc&&null!=d.desc.mimeType?this.openLink("https://drive.google.com/drive/u/0/search?q=type:"+d.desc.mimeType+"&authuser=0"):null!=d.desc&&0<d.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+d.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):e==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"): +e==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):e==App.MODE_TRELLO?this.openLink("https://trello.com/"):e==App.MODE_GITHUB&&(null!=d&&d.constructor==GitHubFile?this.openLink(d.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}}; App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));return a}; -App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var e=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,e){this.spinner.stop();null==b&&(b=urlParams.title,e=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport? --1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,e))}))}}catch(d){}}; -App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(e){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))}; +App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var d=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(d.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,d){this.spinner.stop();null==b&&(b=urlParams.title,d=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport? +-1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,d))}))}}catch(e){}}; +App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(d){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))}; App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(a){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash= "G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})}; -App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title", -mxResources.get("close"));a.innerHTML=mxResources.get("close");e.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(a))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}}; +App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var d=document.createElement("div");d.className="geAlert";d.style.zIndex=2E9;d.style.left="50%";d.style.top="-100%";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");d.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title", +mxResources.get("close"));a.innerHTML=mxResources.get("close");d.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=d.parentNode&&(d.parentNode.removeChild(d),mxEvent.consume(a))});document.body.appendChild(d);window.setTimeout(function(){d.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(d.style,"transition","all 2s ease");d.style.opacity="0";window.setTimeout(function(){null!=d.parentNode&&d.parentNode.removeChild(d)},2E3)},15E3)}}; App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==b||this.loadFile(b,!0)}catch(m){null!=document.body&&this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!= a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b): this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var d=urlParams.create;null!=d?a(b[decodeURIComponent(d)]):(d=urlParams.data,null!=d?a(decodeURIComponent(d)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null== this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(c){}if(d)this.spinner.spin(document.body,mxResources.get("loading"));else if(d=this.getDiagramId(),"0"!=urlParams.splash||null!=d&&0!=d.length)this.loadFile(this.getDiagramId());else{var e=this.getDraft(),n=null!=e?e.data:this.getFileData(),d=Editor.useLocalStorage;this.createFile(this.defaultFilename, -n,null,null,null,null,null,!0);Editor.useLocalStorage=d;null!=e&&(d=this.getCurrentFile(),null!=d&&d.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var e=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=e&&0<e.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create", +n,null,null,null,null,null,!0);Editor.useLocalStorage=d;null!=e&&(d=this.getCurrentFile(),null!=d&&d.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=d&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create", "title"]))}),b=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);var d=4>=a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null, -null,null,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),e=decodeURIComponent(e);if("http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8))try{null!=window.opener&&null!=window.opener[e]?b(window.opener[e]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(h){this.handleError(h, -mxResources.get("errorLoadingFile"))}else this.loadTemplate(e,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action? +null,null,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),d=decodeURIComponent(d);if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))try{null!=window.opener&&null!=window.opener[d]?b(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(h){this.handleError(h, +mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),e)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action? (this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(h){this.handleError(h)}}; -App.prototype.showSplash=function(a){var e=this.getServiceCount(!0,!0),d=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>e||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.chromeless)this.handleError({message:mxResources.get("noFileSelected")}, -mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||a){a=4==e?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();d()}),a);this.showDialog(b.container,3>a?260:300,4<=e?420:300,!0,!1);b.init()}else null==urlParams.create&&d()}; -App.prototype.addLanguageMenu=function(a,e){var d=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(e){d.style.direction="rtl";d.style.textAlign="right";d.style.right="24px";var b=document.createElement("span");b.style.display="inline-block"; -b.style.fontSize="12px";b.style.margin="5px 24px 0 0";b.style.color="gray";mxUtils.write(b,mxResources.get("language"));d.appendChild(b)}mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var e=mxUtils.getOffset(d); -b.popup(e.x,e.y+d.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(d)}return d}; +App.prototype.showSplash=function(a){var d=this.getServiceCount(!0,!0),e=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>d||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.chromeless)this.handleError({message:mxResources.get("noFileSelected")}, +mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||a){a=4==d?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();e()}),a);this.showDialog(b.container,3>a?260:300,4<=d?420:300,!0,!1);b.init()}else null==urlParams.create&&e()}; +App.prototype.addLanguageMenu=function(a,d){var e=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){e=document.createElement("div");e.setAttribute("title",mxResources.get("language"));e.className="geIcon geSprite geSprite-globe";e.style.position="absolute";e.style.cursor="pointer";e.style.bottom="20px";e.style.right="20px";if(d){e.style.direction="rtl";e.style.textAlign="right";e.style.right="24px";var b=document.createElement("span");b.style.display="inline-block"; +b.style.fontSize="12px";b.style.margin="5px 24px 0 0";b.style.color="gray";mxUtils.write(b,mxResources.get("language"));e.appendChild(b)}mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxUtils.getOffset(e); +b.popup(d.x,d.y+e.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(e)}return e}; App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=gapi.drive.realtime.custom&&(gapi.drive.realtime.custom.registerType(mxRtCell,"Cell"),mxRtCell.prototype.cellId=gapi.drive.realtime.custom.collaborativeField("cellId"),mxRtCell.prototype.type=gapi.drive.realtime.custom.collaborativeField("type"),mxRtCell.prototype.value=gapi.drive.realtime.custom.collaborativeField("value"),mxRtCell.prototype.xmlValue=gapi.drive.realtime.custom.collaborativeField("xmlValue"),mxRtCell.prototype.style= gapi.drive.realtime.custom.collaborativeField("style"),mxRtCell.prototype.geometry=gapi.drive.realtime.custom.collaborativeField("geometry"),mxRtCell.prototype.visible=gapi.drive.realtime.custom.collaborativeField("visible"),mxRtCell.prototype.collapsed=gapi.drive.realtime.custom.collaborativeField("collapsed"),mxRtCell.prototype.connectable=gapi.drive.realtime.custom.collaborativeField("connectable"),mxRtCell.prototype.parent=gapi.drive.realtime.custom.collaborativeField("parent"),mxRtCell.prototype.children= gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.source=gapi.drive.realtime.custom.collaborativeField("source"),mxRtCell.prototype.target=gapi.drive.realtime.custom.collaborativeField("target"))};mxRtCell=function(){};mxCodecRegistry.getCodec(mxCell).exclude.push("rtCell");mxCell.prototype.mxTransient.push("rtCell"); -App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(a);if(null!=e)e.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var d= -Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,d):new LocalFile(this,b,d))}));var b=this.dialog,h=b.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;h.apply(b,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k= +App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var d=this.getPeerForMode(a);if(null!=d)d.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var e= +Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,d):new LocalFile(this,b,d))}));var b=this.dialog,h=b.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;h.apply(b,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k= document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&this.openFiles(k.files)}));k.click()}}}; -App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var e=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body, -mxResources.get("loading"))&&e.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile= -new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,d):new LocalLibrary(this,b,d))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}else{var b=document.createElement("input"); +App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var d=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=d&&d.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body, +mxResources.get("loading"))&&d.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var e=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile= +new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,d):new LocalLibrary(this,b,d))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=e;window.openFile=null})}else{var b=document.createElement("input"); b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files)for(var a=0;a<b.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(b.files[a])}));b.click()}}; -App.prototype.saveLibrary=function(a,e,d,b,h,k,l){b=null!=b?b:this.mode;h=null!=h?h:!1;k=null!=k?k:!1;var m=this.createLibraryDataFromImages(e),n=mxUtils.bind(this,function(a){this.spinner.stop();null!=l&&l();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&b==App.MODE_DEVICE&&(d=new LocalLibrary(this,m,a));if(null==d)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a, -m,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),n,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),n,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,m,mxUtils.bind(this, -function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),n,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),n,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop(); -this.hideDialog(!0);this.libraryLoaded(a,e)}),n,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,m,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,e)}),n)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(h||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(m);var c=mxUtils.bind(this, -function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(d,e);null!=l&&l()}),n)});if(a!=d.getTitle()){var f=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&f!=d.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(f);c()}),n)}else c()}}; -App.prototype.saveFile=function(a){var e=this.getCurrentFile();if(null!=e){var d=mxUtils.bind(this,function(){this.removeDraft();e.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==e.getTitle()||null==this.mode){var b=null!=e.getTitle()?e.getTitle():this.defaultFilename,h=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var l=4>=a?2:6<a?4:3,b=new CreateDialog(this, -b,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a), -/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,h,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,l);this.showDialog(b.container,460,a>l?390:270,!0,!0);b.init()}else this.save(e.getTitle(),d)}}; -EditorUi.prototype.loadTemplate=function(a,e,d){var b=a;this.isCorsEnabledForUrl(b)||(b="t="+(new Date).getTime(),b=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+b);this.loadUrl(b,mxUtils.bind(this,function(b){!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&e(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&& -(b=this.extractGraphModelFromPng(b)),e(b))}),d,/(\.png)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null}; -App.prototype.createFile=function(a,e,d,b,h,k,l,m){b=m?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var n=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(a){n();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});b==App.MODE_GOOGLE&&null!=this.drive?(l=null!=this.stateArg?this.stateArg.folderId:l,this.drive.insertFile(a,e,l,mxUtils.bind(this, -function(a){n();this.fileCreated(a,d,k,h)}),c)):b==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(b,mxUtils.bind(this,function(b){this.gitHub.insertFile(a,e,mxUtils.bind(this,function(a){n();this.fileCreated(a,d,k,h)}),c,!1,b)})):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,e,mxUtils.bind(this,function(a){n();this.fileCreated(a,d,k,h)}),c,!1,l):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,e,mxUtils.bind(this,function(a){n();this.fileCreated(a,d,k,h)}),c): -b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,e,mxUtils.bind(this,function(a){n();this.fileCreated(a,d,k,h)}),c,!1,l):b==App.MODE_BROWSER?(n(),b=mxUtils.bind(this,function(){var b=new StorageFile(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,k,h)}),c)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(n(),this.fileCreated(new LocalFile(this, -e,a,null==b),d,k,h))}}; -App.prototype.fileCreated=function(a,e,d,b){var h=window.location.pathname;null!=e&&0<e.length&&(h+="?libs="+e);h=this.getUrl(h);a.getMode()!=App.MODE_DEVICE&&(h+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,l=window.location.protocol+"//"+window.location.hostname+h,m=k,n=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(n=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(n.container), -m=this.decodeNodeIntoGraph(m,n));a.setData(this.createFileData(k,n,a,l));null!=n&&n.container.parentNode.removeChild(n.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=e&&this.sidebar.showEntries(e)}), -k=mxUtils.bind(this,function(){d||null==f||!f.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==d||d?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=b&&b(),window.openWindow(h,null,k))});a.constructor==LocalFile||a.constructor==DriveFile?f():a.saveFile(a.getTitle(),!1,mxUtils.bind(this, +App.prototype.saveLibrary=function(a,d,e,b,h,k,l){b=null!=b?b:this.mode;h=null!=h?h:!1;k=null!=k?k:!1;var m=this.createLibraryDataFromImages(d),n=mxUtils.bind(this,function(a){this.spinner.stop();null!=l&&l();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==e&&b==App.MODE_DEVICE&&(e=new LocalLibrary(this,m,a));if(null==e)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a, +m,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),n,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),n,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,m,mxUtils.bind(this, +function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),n,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),n,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,m,mxUtils.bind(this,function(a){this.spinner.stop(); +this.hideDialog(!0);this.libraryLoaded(a,d)}),n,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,m,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,d)}),n)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(h||this.spinner.spin(document.body,mxResources.get("saving"))){e.setData(m);var c=mxUtils.bind(this, +function(){e.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(e,d);null!=l&&l()}),n)});if(a!=e.getTitle()){var f=e.getHash();e.rename(a,mxUtils.bind(this,function(a){e.constructor!=LocalLibrary&&f!=e.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(e.getHash()));this.removeLibrarySidebar(f);c()}),n)}else c()}}; +App.prototype.saveFile=function(a){var d=this.getCurrentFile();if(null!=d){var e=mxUtils.bind(this,function(){this.removeDraft();d.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==d.getTitle()||null==this.mode){var b=null!=d.getTitle()?d.getTitle():this.defaultFilename,h=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var l=4>=a?2:6<a?4:3,b=new CreateDialog(this, +b,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,e)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a), +/(\.html)$/i.test(a)),null,b,e,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,e))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,h,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,l);this.showDialog(b.container,460,a>l?390:270,!0,!0);b.init()}else this.save(d.getTitle(),e)}}; +EditorUi.prototype.loadTemplate=function(a,d,e){var b=a;this.isCorsEnabledForUrl(b)||(b="t="+(new Date).getTime(),b=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+b);this.loadUrl(b,mxUtils.bind(this,function(b){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){d(a)}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&& +200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&d(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),d(b))}),e,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null}; +App.prototype.createFile=function(a,d,e,b,h,k,l,m){b=m?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var n=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(a){n();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});b==App.MODE_GOOGLE&&null!=this.drive?(l=null!=this.stateArg?this.stateArg.folderId:l,this.drive.insertFile(a,d,l,mxUtils.bind(this, +function(a){n();this.fileCreated(a,e,k,h)}),c)):b==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(b,mxUtils.bind(this,function(b){this.gitHub.insertFile(a,d,mxUtils.bind(this,function(a){n();this.fileCreated(a,e,k,h)}),c,!1,b)})):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,d,mxUtils.bind(this,function(a){n();this.fileCreated(a,e,k,h)}),c,!1,l):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,d,mxUtils.bind(this,function(a){n();this.fileCreated(a,e,k,h)}),c): +b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,d,mxUtils.bind(this,function(a){n();this.fileCreated(a,e,k,h)}),c,!1,l):b==App.MODE_BROWSER?(n(),b=mxUtils.bind(this,function(){var b=new StorageFile(this,d,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,e,k,h)}),c)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(n(),this.fileCreated(new LocalFile(this, +d,a,null==b),e,k,h))}}; +App.prototype.fileCreated=function(a,d,e,b){var h=window.location.pathname;null!=d&&0<d.length&&(h+="?libs="+d);h=this.getUrl(h);a.getMode()!=App.MODE_DEVICE&&(h+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,l=window.location.protocol+"//"+window.location.hostname+h,m=k,n=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(n=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(n.container), +m=this.decodeNodeIntoGraph(m,n));a.setData(this.createFileData(k,n,a,l));null!=n&&n.container.parentNode.removeChild(n.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var f=this.getCurrentFile();null==e&&null!=f&&(e=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);e&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=d&&this.sidebar.showEntries(d)}), +l=mxUtils.bind(this,function(){e||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==e||e?l():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=b&&b(),window.openWindow(h,null,l))});a.constructor==LocalFile||a.constructor==DriveFile?f():a.saveFile(a.getTitle(),!1,mxUtils.bind(this, function(){f()}),mxUtils.bind(this,function(a){c();this.handleError(a)}))}}; -App.prototype.loadFile=function(a,e,d){this.hideDialog();var b=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"), -mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=d)this.spinner.stop(),this.fileLoaded(d);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)), -b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var h=decodeURIComponent(a.substring(1));this.loadTemplate(h,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var d=h,g=h.lastIndexOf("."),l=d.lastIndexOf("/");g>l&&0<l&&(d=d.substring(l+1,g),g=h.substring(g),this.useCanvasForExport|| -".png"!=g||(g=".xml"),".svg"===g||".xml"===g||".html"===g||".png"===g)&&(c=d+g)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=h.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+h.substring(31,h.lastIndexOf("&")),e),!0):!1}),!b()&&this.spinner.spin(document.body, +App.prototype.loadFile=function(a,d,e){this.hideDialog();var b=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"), +mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=e)this.spinner.stop(),this.fileLoaded(e);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)), +b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var h=decodeURIComponent(a.substring(1));this.loadTemplate(h,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=h,g=h.lastIndexOf("."),k=e.lastIndexOf("/");g>k&&0<k&&(e=e.substring(k+1,g),g=h.substring(g),this.useCanvasForExport|| +".png"!=g||(g=".xml"),".svg"===g||".xml"===g||".html"===g||".png"===g)&&(c=e+g)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=h.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+h.substring(31,h.lastIndexOf("&")),d),!0):!1}),!b()&&this.spinner.spin(document.body, mxResources.get("loading"))&&this.addListener("clientLoaded",b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)?b=this.oneDrive:"H"==a.charAt(0)?b=this.gitHub:"T"==a.charAt(0)&&(b=this.trello),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"), mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()): -window.location.hash=a.getHash()}))})))}),h=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=h&&h.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=h&&(window.location.hash=h.getHash())}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null==a||0==a.length?k():null!=h&&h.isModified()&&!e?window.openWindow(this.getUrl()+"#"+a,null,k):k()}; -App.prototype.getLibraryStorageHint=function(a){var e=a.getTitle();a.constructor!=LocalLibrary&&(e+="\n"+a.getHash());a.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?e+=" ("+ -mxResources.get("browser")+")":a.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e}; -App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),e=mxUtils.bind(this,function(d){if(null!=d)for(var b=0;b<d.length;b++){var e=encodeURIComponent(decodeURIComponent(d[b]));mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var d=b.substring(0, +window.location.hash=a.getHash()}))})))}),h=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=h&&h.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=h&&(window.location.hash=h.getHash())}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null==a||0==a.length?k():null!=h&&h.isModified()&&!d?window.openWindow(this.getUrl()+"#"+a,null,k):k()}; +App.prototype.getLibraryStorageHint=function(a){var d=a.getTitle();a.constructor!=LocalLibrary&&(d+="\n"+a.getHash());a.constructor==DriveLibrary?d+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?d+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?d+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?d+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?d+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?d+=" ("+ +mxResources.get("browser")+")":a.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d}; +App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),d=mxUtils.bind(this,function(d){if(null!=d)for(var b=0;b<d.length;b++){var e=encodeURIComponent(decodeURIComponent(d[b]));mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var d=b.substring(0, 1);if("L"==d){if(isLocalStorage||mxClient.IS_CHROMEAPP)try{var e=decodeURIComponent(b.substring(1));this.getLocalData(e,mxUtils.bind(this,function(c){".scratchpad"==e&&null==c&&(c=this.emptyLibraryXml);null!=c?this.loadLibrary(new StorageLibrary(this,c,e)):a(b)}))}catch(f){a(b)}}else if("U"==d){var h=decodeURIComponent(b.substring(1));this.isOffline()||(d=h,this.isCorsEnabledForUrl(d)||(d="t="+(new Date).getTime(),d=PROXY_URL+"?url="+encodeURIComponent(h)+"&"+d),mxUtils.get(d,mxUtils.bind(this,function(c){if(200<= c.getStatus()&&299>=c.getStatus())try{this.loadLibrary(new UrlLibrary(this,c.getText(),h)),delete this.pendingLibraries[b]}catch(g){a(b)}else a(b)}),function(){a(b)}))}else{var c=null;"G"==d?null!=this.drive&&null!=this.drive.user&&(c=this.drive):"H"==d?null!=this.gitHub&&null!=this.gitHub.getUser()&&(c=this.gitHub):"T"==d?null!=this.trello&&this.trello.isAuthorized()&&(c=this.trello):"D"==d?null!=this.dropbox&&null!=this.dropbox.getUser()&&(c=this.dropbox):"W"==d&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&& -(c=this.oneDrive);null!=c?c.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(c){try{this.loadLibrary(c),delete this.pendingLibraries[b]}catch(g){a(b)}}),function(c){a(b)}):delete this.pendingLibraries[b]}}})(e)}});e(mxSettings.getCustomLibraries());e((urlParams.clibs||"").split(";"))}}; +(c=this.oneDrive);null!=c?c.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(c){try{this.loadLibrary(c),delete this.pendingLibraries[b]}catch(g){a(b)}}),function(c){a(b)}):delete this.pendingLibraries[b]}}})(e)}});d(mxSettings.getCustomLibraries());d((urlParams.clibs||"").split(";"))}}; App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth= "0px",this.shareButton.style.cssFloat="right",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton), this.shareButton=null)}}; -App.prototype.save=function(a,e){var d=this.getCurrentFile(),b=mxResources.get("saving");null!=d&&d.constructor==DriveFile&&(b=mxResources.get("createRevision"));if(null!=d&&this.spinner.spin(document.body,b)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==d&&(d.isModified()?d.isAutosave()||d.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!= -e&&e()}),h=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==d.getTitle()?d.save(!0,b,h):d.saveAs(a,b,h)}}; -App.prototype.pickFolder=function(a,e,d){d=null!=d?d:!0;var b=this.spinner.pause();d&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){b();if(a.action==google.picker.Action.PICKED){var d=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(d=a.docs[0].id);e(d)}})):d&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){b();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,e(a))})):d&&a==App.MODE_GITHUB&& -null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):d&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)}; -App.prototype.exportFile=function(a,e,d,b,h,k){h==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):h==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}), -mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),d,b,!1):h==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):h==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,a,mxUtils.bind(this, -function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,k,b):h==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):h==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,a)}),null==localStorage.getItem(e)? -d():this.confirm(mxResources.get("replaceIt",[e]),d))}; -App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash= -""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var e=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),e,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}}; -App.prototype.showAuthDialog=function(a,e,d,b){var h=this.spinner.pause();this.showDialog((new AuthDialog(this,a,e,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();h()}))}catch(l){this.editor.setStatus(mxUtils.htmlEntities(l.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}; -App.prototype.convertFile=function(a,e,d,b,h,k){var l=e;/\.svg$/i.test(l)||(l=l.substring(0,e.lastIndexOf("."))+b);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if(/\.vsdx$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);m||(n.responseType="blob");n.onload=mxUtils.bind(this,function(){var a=null;m?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content, -"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(new LocalFile(this,a.responseText,l,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),e)});n.send()}else{var c=mxUtils.bind(this,function(b){try{/\.png$/i.test(e)?(temp=this.extractGraphModelFromPng(b),null!=temp?h(new LocalFile(this,temp,l,!0)):h(new LocalFile(this,b,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&& -this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(new LocalFile(this,a.responseText,l,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),e):h(new LocalFile(this,b,l,!0))}catch(g){null!=k&&k(g)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||null!=d&&"image/"==d.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!= -h){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(e)?"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));c(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,c,k,d)}}; +App.prototype.save=function(a,d){var e=this.getCurrentFile(),b=mxResources.get("saving");null!=e&&e.constructor==DriveFile&&(b=mxResources.get("createRevision"));if(null!=e&&this.spinner.spin(document.body,b)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==e&&(e.isModified()?e.isAutosave()||e.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!= +d&&d()}),h=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==e.getTitle()?e.save(!0,b,h):e.saveAs(a,b,h)}}; +App.prototype.pickFolder=function(a,d,e){e=null!=e?e:!0;var b=this.spinner.pause();e&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){b();if(a.action==google.picker.Action.PICKED){var e=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(e=a.docs[0].id);d(e)}})):e&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){b();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,d(a))})):e&&a==App.MODE_GITHUB&& +null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){b();d(a)})):e&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){b();d(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)}; +App.prototype.exportFile=function(a,d,e,b,h,k){h==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):h==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(d,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}), +mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),e,b,!1):h==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):h==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(d,a,mxUtils.bind(this, +function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,k,b):h==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):h==App.MODE_BROWSER&&(e=mxUtils.bind(this,function(){localStorage.setItem(d,a)}),null==localStorage.getItem(d)? +e():this.confirm(mxResources.get("replaceIt",[d]),e))}; +App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var d=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,d);this.fname.setAttribute("title",d+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash= +""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var d=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),d,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}}; +App.prototype.showAuthDialog=function(a,d,e,b){var h=this.spinner.pause();this.showDialog((new AuthDialog(this,a,d,mxUtils.bind(this,function(a){try{null!=e&&e(a,mxUtils.bind(this,function(){this.hideDialog();h()}))}catch(l){this.editor.setStatus(mxUtils.htmlEntities(l.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}; +App.prototype.convertFile=function(a,d,e,b,h,k){var l=d;/\.svg$/i.test(l)||(l=l.substring(0,d.lastIndexOf("."))+b);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if(/\.vsdx$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);m||(n.responseType="blob");n.onload=mxUtils.bind(this,function(){var a=null;m?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content, +"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){h(new LocalFile(this,a,l,!0))}),k)});n.send()}else{var c=mxUtils.bind(this,function(b){try{/\.png$/i.test(d)?(temp=this.extractGraphModelFromPng(b),null!=temp?h(new LocalFile(this,temp,l,!0)):h(new LocalFile(this,b,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this, +function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(new LocalFile(this,a.responseText,l,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),d):h(new LocalFile(this,b,l,!0))}catch(g){null!=k&&k(g)}});e=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||null!=e&&"image/"==e.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=h){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(d)?"data:image/png;base64,"+ +b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));c(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,c,k,e)}}; App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)": "url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX? this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a})); @@ -7089,10 +7089,10 @@ this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)": "javascript:void(0);");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(a){var b=this.getCurrentFile();null!=b&&b.isRenamable()&&this.actions.get("rename").funct();mxEvent.consume(a)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&& (this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.boxSizing="border-box",this.menubar.container.style.top="29px",this.toolbar.container.style.paddingLeft="56px");this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("href","javascript:void(0);");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+ "+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="5px";this.toggleFormatElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"26px":"10px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition= -"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var e=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+ -"')"});this.addListener("formatWidthChanged",e);e();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("href","javascript:void(0);");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="5px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";this.fullscreenElement.style.padding= -"2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);var d=this.hsplitPosition,b=!1;"dark"==uiTheme&& -(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!b);this.toggleFormatPanel(!b);this.hsplitPosition=b?d:0;this.hideFooter();b=!b;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top= +"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var d=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+ +"')"});this.addListener("formatWidthChanged",d);d();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("href","javascript:void(0);");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="5px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";this.fullscreenElement.style.padding= +"2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);var e=this.hsplitPosition,b=!1;"dark"==uiTheme&& +(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!b);this.toggleFormatPanel(!b);this.hsplitPosition=b?e:0;this.hideFooter();b=!b;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top= "8px",this.fullscreenElement.style.top="8px");"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("href","javascript:void(0);"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666", this.toggleElement.style.top="5px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat","dark"==uiTheme&&(this.toggleElement.style.filter="invert(100%)"),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this, function(a){this.toggleCompactMode();mxEvent.consume(a)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0))}}; @@ -7113,180 +7113,179 @@ null!=this.gitHub&&d(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.trello.logout()}));b||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="20px 20px 10px 10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));document.body.appendChild(this.userPanel)}mxEvent.consume(a)})), mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser()); null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;"; -var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var e=Menus.prototype.init;Menus.prototype.init=function(){e.apply(this, -arguments);var a=this.editorUi,d=a.editor.graph,k=mxUtils.bind(d,d.isEnabled),l=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),n=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname|| +var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var d=Menus.prototype.init;Menus.prototype.init=function(){d.apply(this, +arguments);var a=this.editorUi,e=a.editor.graph,k=mxUtils.bind(e,e.isEnabled),l=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),n=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname|| "drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png"); -a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,l,k){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/ -100,c,d,e,f,g,h,!l,k)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c? +a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/ +100,c,d,e,f,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c? "compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"), -!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,h,l,q,k){a.createHtml(b,c,d,e,f,g,h,l,q,k,mxUtils.bind(this,function(b,c){var d= +!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,h,k,p,l){a.createHtml(b,c,d,e,f,g,h,k,p,l,mxUtils.bind(this,function(b,c){var d= a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container, -360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport|| -mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells(); -if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"), +360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var d=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!e.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport|| +mxEvent.addListener(d,"change",function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!d.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){e.getSelectionCells(); +if(1==e.getSelectionCount()){var b=e.getSelectionCell(),c=e.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"), mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+ -"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(F){a.handleError(F)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length- +"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(E){a.handleError(E)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length- 1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+ "+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var f=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled= -!a.isMathEnabled();d.model.execute(b)});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}isLocalStorage&&(f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&& -a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var p="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" "); -a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&& -null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<p.length;f++){var g=p[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container, -320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,l,k){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!l,k)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this, -function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,l,k){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!l,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"), -null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return d.shadowVisible});var u=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){u||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){u=!1}),u=!0)},null,null,"F1"));a.actions.addAction("userManual...", +!a.isMathEnabled();e.model.execute(b)});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}isLocalStorage&&(f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&& +a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=e.getSelectionCells(),c=[],d=0;d<b.length;d++)e.getModel().isVertex(b[d])&&c.push(b[d]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var q="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" "); +a.actions.addAction("copyStyle",function(){var b=e.view.getState(e.getSelectionCell());if(e.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=e.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var d=b[c],f=d.indexOf("=");if(0<=f){var g=d.substring(0,f),d=d.substring(f+1);null==a.copiedStyle[g]&&"none"==d&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(e.isEnabled()&&!e.isSelectionEmpty()&& +null!=a.copiedStyle){e.getModel().beginUpdate();try{for(var b=e.getSelectionCells(),c=0;c<b.length;c++)for(var d=e.view.getState(b[c]),f=0;f<q.length;f++){var g=q[f],h=a.copiedStyle[g];d.style[g]!=h&&e.setCellStyles(g,h,[b[c]])}}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container, +320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this, +function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"), +null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){e.setShadowVisible(!e.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return e.shadowVisible});var u=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){u||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){u=!1}),u=!0)},null,null,"F1"));a.actions.addAction("userManual...", function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"): a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});f=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show", function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));f=a.actions.addAction("find...",mxUtils.bind(this,function(){null== this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,204,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!= -this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=mxUtils.bind(this,function(){if("undefined"!==typeof VsdxExport)try{(new VsdxExport(a)).exportCurrentDiagrams()}catch(v){}});"undefined"!==typeof VsdxExport||this.loadingVsdx||a.isOffline()?window.setTimeout(b,0):(this.loadingVsdx=!0,mxscript("js/vsdx.min.js",b))}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language", -new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c); -for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var t=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=t.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px", -c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search:",null,null,c,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px"; -mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)}, -function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support","-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES); -this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS); -this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})), -mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport", -mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var l=e.restore;e.restore=function(){g--;l.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);k.apply(this,arguments);mxLog.debug("leaving shape", -a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&& -(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&& -(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&& -this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage? -mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...", -function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,h,l,k,q){a.createHtml(b,c,d,e,f,g,h,l,k,q,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>"); -d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+ -window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&& -a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop(); -b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0); -b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,h,l){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(), -function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+l+';" src="'+a.createLink(b,c,d,e,f,g,k)+'"></iframe>');a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a, -a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)f=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}), -f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,156,!0,!1)});f=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct= -function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}), -a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b, -["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"], -c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,e){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files, -null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!= -urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=k(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");h(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var h=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(), -h=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),l=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,k=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,k,m){f=g?Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/m)):1;a.importFile(b,c,h,l,Math.round(k*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}), -g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;k()}):k()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,l,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),k=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!= -typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){g(a.drive)},e):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},e);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){g(a.dropbox)},e):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){}, -e,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},e):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},e):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);b.addSeparator(e);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+ -"...",null,function(){f(!1)},e);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},e);a.isOffline()||(b.addSeparator(e),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){h(a,c,b)},function(){a.spinner.stop(); -a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},e));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},e)})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&b.addCheckmark(d, -Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this, -function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}), -b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&k.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle(): -a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this, -function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this, -function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")})); -a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()|| -this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var w="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),y=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}), -c)},B=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.container.focus();d.setSelectionCell(a);d.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(B("Text",40,20, -"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&B("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&B("",80,80,"ellipse;whiteSpace=wrap;html=1;")}, -null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&B("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<w.length;c++)"-"==w[c]?a.addSeparator(b):y(a,b,mxResources.get(w[c])+"...",w[c])}))); -this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,d){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)}, -d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null, -function(){a.pickFile(App.MODE_ONEDRIVE)},d):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)}, -d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))}, -mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null, -function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):n&&b.addItem(mxResources.get("oneDrive")+" ("+ -mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+ -"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)}));this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)}, -d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},d):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...", -null,function(){a.pickLibrary(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b= -new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(F){a.handleError(F,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))}, -function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b, -(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b, -"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&& -this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||(d=this.addMenuItem(b,"plugins",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000056430"));b.addSeparator(c);d=this.addMenuItem(b,"tags",c);a.isOffline()||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966"); -b.addSeparator(c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b, -["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom", -b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c); -this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated; -Menus.prototype.menuCreated=function(a,e){if(480>=screen.width&&a==this.get("help")){e.style.paddingRight="0px";e.style.paddingLeft="0px";e.innerHTML="";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);e.appendChild(b)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")}; -DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,e,d){this.ui=a;this.page=e;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; -function MovePage(a,e,d){this.ui=a;this.oldIndex=e;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; -function SelectPage(a,e){this.ui=a;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e))} -SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,e=this.ui.editor,d=e.graph,b=e.graph.compress(d.zapGremlins(mxUtils.getXml(e.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=d.getViewState();a.root=d.model.root;d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.rootChanged(a.root);d.setViewState(a.viewState); -e.fireEvent(new mxEventObject("setViewState","change",this));d.gridEnabled=d.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);e.updateGraphComponents();d.view.validate();d.sizeDidChange();this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,e,d,b){SelectPage.call(this,a,d);this.relatedPage=e;this.index=b;this.previousIndex=null} +this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language= +d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var t=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=t.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")), +c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var d=b.addItem("Search:",null,null,c,null, +null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}), +window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));d.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support", +"-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER); +this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"], +c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=e.getGraphBounds(),b=e.view.translate,d=e.view.scale;e.insertVertex(c,null,"",a.x/d-b.x,a.y/d-b.y,a.width/d,a.height/d,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){e.isSelectionEmpty()||(mxLog.show(), +mxLog.debug("sb.createVertexTemplateFromData('"+e.compress(mxUtils.getXml(e.encodeCells(e.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=e.getGraphBounds(),c=e.view.scale,d=mxUtils.createXmlDocument(),f=d.createElement("output");d.appendChild(f);d=new mxXmlCanvas2D(f); +d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var g=0,h=d.save;d.save=function(){g++;h.apply(this,arguments)};var k=d.restore;d.restore=function(){g--;k.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);l.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(e.getView().getState(e.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"], +c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})), +this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this, +arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole", +function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...", +function(){a.getCurrentFile();if(e.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542", +b,function(b,c,d,e,f,g,h,k,l,p){a.createHtml(b,c,d,e,f,g,h,k,l,p,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>"); +d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src= +/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})})); +a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+ +"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b= +e.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-e.view.translate.y)/e.view.scale)+2,function(b,c,d,e,f,g,h,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+k+';" src="'+a.createLink(b,c,d,e,f,g,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink", +new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body, +mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)f=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,156,!0,!1)});f=a.actions.addAction("search", +function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){e.isEditing()&&e.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var d=a.createLoadMessage("save"); +d.xml=c;b&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b, +"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b, +["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi, +this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,d){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var d=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b, +c){e.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=d;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=k(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&& +(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");h(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var h=mxUtils.bind(this,function(b,c,d){var f=e.view,g=e.getGraphBounds(),h=e.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*e.gridSize)),k=e.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*e.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g= +!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,c,h,k,Math.round(l*f),Math.round(m*f),d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0, +d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),k=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){g(a.drive)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)", +null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){g(a.dropbox)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},d):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){}, +d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b= +new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){h(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()}, +d)})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage); +d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!= +a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok")); +return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&k.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d= +App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this, +function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this, +function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a= +this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var x="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "), +z=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},v=function(a,b,c,d){var f=e.isMouseInsertPoint()?e.getInsertPoint():e.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),d);a.vertex=!0;e.getModel().beginUpdate();try{a=e.addCell(a),e.fireEvent(new mxEventObject("cellsInserted", +"cells",[a]))}finally{e.getModel().endUpdate()}e.container.focus();e.setSelectionCell(a);e.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&e.startEditingAtCell(v("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&& +v("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&v("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&v("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a, +"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<x.length;c++)"-"==x[c]?a.addSeparator(b):z(a,b,mxResources.get(x[c])+"...",x[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]); +b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,d){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+ +"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},d):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+ +" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&& +(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null, +null,null,null,App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null, +function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){}, +d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)}));this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...", +null,function(){a.pickLibrary(App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},d):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive? +b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},d):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+ +"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<= +c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(E){a.handleError(E,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))}))); +this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c); +mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d, +"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||(d=this.addMenuItem(b,"plugins",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000056430"));b.addSeparator(c);d=this.addMenuItem(b, +"tags",c);a.isOffline()||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966");b.addSeparator(c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&& +(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b, +["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b, +["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c); +mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var e=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,d){if(480>=screen.width&&a==this.get("help")){d.style.paddingRight="0px";d.style.paddingLeft="0px";d.innerHTML="";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);d.appendChild(b)}e.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")}; +DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,d,e){this.ui=a;this.page=d;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; +function MovePage(a,d,e){this.ui=a;this.oldIndex=d;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; +function SelectPage(a,d){this.ui=a;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d))} +SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,d=this.ui.editor,e=d.graph,b=d.graph.compress(e.zapGremlins(mxUtils.getXml(d.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState); +d.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);d.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,d,e,b){SelectPage.call(this,a,e);this.relatedPage=d;this.index=b;this.previousIndex=null} mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)}; -EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var e=0;e<this.pages.length;e++)if(this.pages[e].getId()==a)return this.pages[e];return null}; -EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,e=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height= -null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(a.view,arguments)});var d=!1,b=null,h=mxUtils.bind(this,function(){this.updateTabContainer();var e=this.currentPage;null!=e&&e!=b&&(null==e.viewState||null==e.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft= -a.view.translate.x*a.view.scale+e.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+e.viewState.scrollTop),b=e);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=!0}))):"undefined"===typeof Editor.MathJaxClear|| -this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){h();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}; -Graph.prototype.createViewState=function(a){var e=a.getAttribute("page"),d=a.getAttribute("pageScale"),b=a.getAttribute("pageWidth"),h=a.getAttribute("pageHeight"),k=a.getAttribute("background"),l=a.getAttribute("backgroundImage"),l=null!=l&&0<l.length?JSON.parse(l):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"== -a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=l?new mxImage(l.src,l.width,l.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=b&&null!=h?new mxRectangle(0,0,parseFloat(b),parseFloat(h)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"), +EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var d=0;d<this.pages.length;d++)if(this.pages[d].getId()==a)return this.pages[d];return null}; +EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,d=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height= +null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(a.view,arguments)});var e=!1,b=null,h=mxUtils.bind(this,function(){this.updateTabContainer();var d=this.currentPage;null!=d&&d!=b&&(null==d.viewState||null==d.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft= +a.view.translate.x*a.view.scale+d.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+d.viewState.scrollTop),b=d);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===typeof Editor.MathJaxClear|| +this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){h();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}; +Graph.prototype.createViewState=function(a){var d=a.getAttribute("page"),e=a.getAttribute("pageScale"),b=a.getAttribute("pageWidth"),h=a.getAttribute("pageHeight"),k=a.getAttribute("background"),l=a.getAttribute("backgroundImage"),l=null!=l&&0<l.length?JSON.parse(l):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"== +a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=l?new mxImage(l.src,l.width,l.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=b&&null!=h?new mxRectangle(0,0,parseFloat(b),parseFloat(h)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"), selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}}; Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(), arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}}; Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteXml,this.pasteCounter=a.pasteCounter||0,this.mathEnabled=a.mathEnabled,this.gridEnabled=a.gridEnabled,this.gridSize=a.gridSize,this.graphHandler.guidesEnabled=a.guidesEnabled,this.foldingEnabled=a.foldingEnabled,this.setShadowVisible(a.shadowVisible,!1),this.scrollbars=a.scrollbars,this.pageVisible=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat= a.pageFormat,this.view.scale=a.scale,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultParent,this.connectionArrowsEnabled=a.arrows,this.setTooltips(a.tooltips),this.setConnectable(a.connect),this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=a.translate&&(this.view.translate=a.translate)):(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize= mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.background=this.defaultGraphBackground,this.backgroundImage=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize= -this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var e=this.editor.extractGraphModel(a.node);if(null!=e){a.graphModelNode=e;a.viewState=this.editor.graph.createViewState(e);var d=new mxCodec(e.ownerDocument);a.root=d.decode(e).root}else a.root=this.editor.graph.model.createRoot()}return a}; -EditorUi.prototype.selectPage=function(a,e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();d.add(b);d.notify();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}; -EditorUi.prototype.selectNextPage=function(a){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),a?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,e){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();e=null!=e?e:this.pages.length;var d=new ChangePage(this,a,a,e);this.editor.graph.model.execute(d)}return a}; -EditorUi.prototype.createPage=function(a){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},e=0;e<this.pages.length;e++){var d=this.pages[e].getName();null!=d&&0<d.length&&(a[d]=d)}e=this.pages.length;do d=mxResources.get("pageWithNumber",[++e]);while(null!=a[d]);return d}; -EditorUi.prototype.removePage=function(a){var e=this.editor.graph;if(e.isEnabled()){e.model.beginUpdate();try{var d=this.currentPage;if(d==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;d=this.pages[b]}else d=this.insertPage(),e.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1])));e.model.execute(new ChangePage(this,a,d))}finally{e.model.endUpdate()}}return a}; -EditorUi.prototype.duplicatePage=function(a,e){var d=this.editor.graph,b=null;d.isEnabled()&&(d.isEditing()&&d.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=d.cloneCells([d.model.root])[0],b.viewState=d.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollRight=null,b.setName(e),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b}; -EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return a};EditorUi.prototype.movePage=function(a,e){this.editor.graph.model.execute(new MovePage(this,a,e))}; +this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var d=this.editor.extractGraphModel(a.node);if(null!=d){a.graphModelNode=d;a.viewState=this.editor.graph.createViewState(d);var e=new mxCodec(d.ownerDocument);a.root=e.decode(d).root}else a.root=this.editor.graph.model.createRoot()}return a}; +EditorUi.prototype.selectPage=function(a,d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();e.add(b);e.notify();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))}; +EditorUi.prototype.selectNextPage=function(a){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),a?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,d){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();d=null!=d?d:this.pages.length;var e=new ChangePage(this,a,a,d);this.editor.graph.model.execute(e)}return a}; +EditorUi.prototype.createPage=function(a){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));d.setName(null!=a?a:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var a={},d=0;d<this.pages.length;d++){var e=this.pages[d].getName();null!=e&&0<e.length&&(a[e]=e)}d=this.pages.length;do e=mxResources.get("pageWithNumber",[++d]);while(null!=a[e]);return e}; +EditorUi.prototype.removePage=function(a){var d=this.editor.graph;if(d.isEnabled()){d.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;e=this.pages[b]}else e=this.insertPage(),d.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));d.model.execute(new ChangePage(this,a,e))}finally{d.model.endUpdate()}}return a}; +EditorUi.prototype.duplicatePage=function(a,d){var e=this.editor.graph,b=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=e.cloneCells([e.model.root])[0],b.viewState=e.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollRight=null,b.setName(d),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b}; +EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return a};EditorUi.prototype.movePage=function(a,d){this.editor.graph.model.execute(new MovePage(this,a,d))}; EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a}; -EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="12px";e.style.marginLeft="30px";for(var d=this.editor.chromeless?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- -d)/this.pages.length)+1),h=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),h=b):mxEvent.consume(c)}));mxEvent.addListener(d, -"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=h&&b!=h&&this.movePage(h,b);a.stopPropagation();a.preventDefault()}));e.appendChild(d)})(k,this.createTabForPage(this.pages[k],b,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e); -b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=b&&(b.style.position="absolute",b.style.right="0px",e.style.marginRight="30px");var l=this.createControlTab(4," ❮ ");l.style.position="absolute";l.style.right=this.editor.chromeless?"29px":"55px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=this.createControlTab(4, -" ❯");m.style.position="absolute";m.style.right=this.editor.chromeless?"0px":"29px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var n=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=n+"px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){e.scrollLeft-=Math.max(20,n-20);mxUtils.setOpacity(l,0<e.scrollLeft?100:50);mxUtils.setOpacity(m,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(l, -0<e.scrollLeft?100:50);mxUtils.setOpacity(m,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){e.scrollLeft+=Math.max(20,n-20);mxUtils.setOpacity(l,0<e.scrollLeft?100:50);mxUtils.setOpacity(m,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; -EditorUi.prototype.createTab=function(a){var e=document.createElement("div");e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="8px 4px 8px 4px";e.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";e.style.borderBottomStyle="solid";e.style.backgroundColor=this.tabContainer.style.backgroundColor; -e.style.cursor="default";e.style.color="gray";a&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(e.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return e}; -EditorUi.prototype.createControlTab=function(a,e){var d=this.createTab(!0);d.style.paddingTop=a+"px";d.style.cursor="pointer";d.style.width="30px";d.style.lineHeight="30px";d.innerHTML=e;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d}; +EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="12px";d.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- +e)/this.pages.length)+1),h=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,e){this.pages[b]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",e.style.fontWeight="bold",e.style.borderTopStyle="none"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),h=b):mxEvent.consume(c)}));mxEvent.addListener(e, +"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=h&&b!=h&&this.movePage(h,b);a.stopPropagation();a.preventDefault()}));d.appendChild(e)})(k,this.createTabForPage(this.pages[k],b,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(d); +b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(d.clientWidth>this.tabContainer.clientWidth-e){null!=b&&(b.style.position="absolute",b.style.right="0px",d.style.marginRight="30px");var l=this.createControlTab(4," ❮ ");l.style.position="absolute";l.style.right=this.editor.chromeless?"29px":"55px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=this.createControlTab(4, +" ❯");m.style.position="absolute";m.style.right=this.editor.chromeless?"0px":"29px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var n=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=n+"px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){d.scrollLeft-=Math.max(20,n-20);mxUtils.setOpacity(l,0<d.scrollLeft?100:50);mxUtils.setOpacity(m,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(l, +0<d.scrollLeft?100:50);mxUtils.setOpacity(m,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){d.scrollLeft+=Math.max(20,n-20);mxUtils.setOpacity(l,0<d.scrollLeft?100:50);mxUtils.setOpacity(m,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; +EditorUi.prototype.createTab=function(a){var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="8px 4px 8px 4px";d.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";d.style.borderBottomStyle="solid";d.style.backgroundColor=this.tabContainer.style.backgroundColor; +d.style.cursor="default";d.style.color="gray";a&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(d.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return d}; +EditorUi.prototype.createControlTab=function(a,d){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=d;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e}; EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this, function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"), -null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),e=mxEvent.getClientY(a);d.popup(b,e,null,a);this.setCurrentMenu(d); +null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),h=mxEvent.getClientY(a);d.popup(b,h,null,a);this.setCurrentMenu(d); mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a}; -EditorUi.prototype.createTabForPage=function(a,e,d){d=this.createTab(d);var b=a.getName();d.setAttribute("title",b);mxUtils.write(d,b);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(a,d);42<e&&(d.style.textOverflow="ellipsis");return d}; -EditorUi.prototype.addTabListeners=function(a,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,h=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){b=null!=this.currentMenu;h=a==this.currentPage;d.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(k)&&h||mxEvent.isPopupTrigger(k))){d.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!b){var l=new mxPopupMenu(this.createPageMenu(a));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);this.resetCurrentMenu();l.destroy()});var m=mxEvent.getClientX(k),n=mxEvent.getClientY(k);l.popup(m,n,null,k);this.setCurrentMenu(l,e)}mxEvent.consume(k)}}))}; -EditorUi.prototype.createPageMenu=function(a,e){return mxUtils.bind(this,function(d,b){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,e)}),b);d.addSeparator(b);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a, -mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};mxCodecRegistry.register(a)})(); -(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,d,b){b.setAttribute("page",d.page.getId());return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.page=a.ui.getPageById(d.getAttribute("page"));b.previous=b.name;return b};mxCodecRegistry.register(a)})(); -(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,d,b){b.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(b.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,b));return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;b.relatedPage=b.ui.getPageById(d.getAttribute("relatedPage"));if(null==b.relatedPage){var e=document.createElement("diagram");e.setAttribute("id",d.getAttribute("relatedPage")); -e.setAttribute("name",d.getAttribute("name"));b.relatedPage=new DiagramPage(e);d=d.cloneNode(!0);e=d.firstChild;if(null!=e)for(b.relatedPage.root=a.decodeCell(e,!1),b=e.nextSibling,e.parentNode.removeChild(e),e=b;null!=e;){b=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==a.lookup(k)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=b}}return d};a.afterDecode=function(a,d,b){b.index=b.previousIndex;return b};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",e=Graph.prototype.foldCells; -Graph.prototype.foldCells=function(a,b,d,m,n){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=d.slice(),f=[],g=0;g<d.length;g++){var h=this.view.getState(d[g]),l=null!=h?h.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(d[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[g]&&f.push(a);return a==d[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[g], -a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=c;d=e.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=t.view.getState(a),t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType); -return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function m(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())< +EditorUi.prototype.createTabForPage=function(a,d,e){e=this.createTab(e);var b=a.getName();e.setAttribute("title",b);mxUtils.write(e,b);e.style.maxWidth=d+"px";e.style.width=d+"px";this.addTabListeners(a,e);42<d&&(e.style.textOverflow="ellipsis");return e}; +EditorUi.prototype.addTabListeners=function(a,d){mxEvent.disableContextMenu(d);var e=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,h=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(d){b=null!=this.currentMenu;h=a==this.currentPage;e.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(k)&&h||mxEvent.isPopupTrigger(k))){e.popupMenuHandler.hideMenu(); +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!b){var l=new mxPopupMenu(this.createPageMenu(a));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);this.resetCurrentMenu();l.destroy()});var m=mxEvent.getClientX(k),n=mxEvent.getClientY(k);l.popup(m,n,null,k);this.setCurrentMenu(l,d)}mxEvent.consume(k)}}))}; +EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(e,b){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),b);e.addSeparator(b);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a, +mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};mxCodecRegistry.register(a)})(); +(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,b){b.setAttribute("page",e.page.getId());return b};a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){b.page=a.ui.getPageById(e.getAttribute("page"));b.previous=b.name;return b};mxCodecRegistry.register(a)})(); +(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,b){b.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(b.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,b));return b};a.beforeDecode=function(a,e,b){b.ui=a.ui;b.relatedPage=b.ui.getPageById(e.getAttribute("relatedPage"));if(null==b.relatedPage){var d=document.createElement("diagram");d.setAttribute("id",e.getAttribute("relatedPage")); +d.setAttribute("name",e.getAttribute("name"));b.relatedPage=new DiagramPage(d);e=e.cloneNode(!0);d=e.firstChild;if(null!=d)for(b.relatedPage.root=a.decodeCell(d,!1),b=d.nextSibling,d.parentNode.removeChild(d),d=b;null!=d;){b=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var k=d.getAttribute("id");null==a.lookup(k)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=b}}return e};a.afterDecode=function(a,e,b){b.index=b.previousIndex;return b};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",d=Graph.prototype.foldCells; +Graph.prototype.foldCells=function(a,b,e,m,n){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var h=this.view.getState(e[g]),k=null!=h?h.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(k,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[g], +a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=d.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType); +return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function m(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())< a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function n(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],t.model.getTerminal(d[0],!0),!0);var f=m(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+ -10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=t.view.getState(a),l=t.view.scale;if(null!=h){var k=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?k.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:k.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var n=t.getOutgoingEdges(t.model.getTerminal(d[0], -!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<n.length;q++){var u=t.model.getTerminal(n[q],!1);if(f==m(u)){var C=t.view.getState(u);u!=a&&null!=C&&(p&&b!=C.getCenterX()<h.getCenterX()||!p&&b!=C.getCenterY()<h.getCenterY())&&mxUtils.intersects(k,C)&&(d=10+Math.max(d,(Math.min(k.x+k.width,C.x+C.width)-Math.max(k.x,C.x))/l),g=10+Math.max(g,(Math.min(k.y+k.height,C.y+C.height)-Math.max(k.y,C.y))/l))}}p?g=0:d=0;for(q=0;q<n.length;q++)if(u=t.model.getTerminal(n[q], +10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=t.view.getState(a),k=t.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=t.getOutgoingEdges(t.model.getTerminal(d[0], +!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<n.length;q++){var u=t.model.getTerminal(n[q],!1);if(f==m(u)){var C=t.view.getState(u);u!=a&&null!=C&&(p&&b!=C.getCenterX()<h.getCenterX()||!p&&b!=C.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,C)&&(d=10+Math.max(d,(Math.min(l.x+l.width,C.x+C.width)-Math.max(l.x,C.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,C.y+C.height)-Math.max(l.y,C.y))/k))}}p?g=0:d=0;for(q=0;q<n.length;q++)if(u=t.model.getTerminal(n[q], !1),f==m(u)&&(C=t.view.getState(u),u!=a&&null!=C&&(p&&b!=C.getCenterX()<h.getCenterX()||!p&&b!=C.getCenterY()<h.getCenterY()))){var v=[];t.traverse(C.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});t.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function c(a){t.model.beginUpdate();try{var b=m(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1); -var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,l=-40):b==mxConstants.DIRECTION_WEST?(h=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);t.moveCells(g,h,l);return t.addCells(d,e)}finally{t.model.endUpdate()}}function f(a){t.model.beginUpdate();try{var b= -t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=t.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var l=t.view.getBounds(f),k=m(a),n=t.view.translate,p=t.view.scale;k==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height- -e.y+40):k==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=k==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/p-n.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function g(a, -b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function p(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| -c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():c==b?(d=t.getOutgoingEdges(a),null!=d&&0<d.length&&t.setSelectionCell(t.model.getTerminal(d[0],!1))):(c=t.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(t.model.getTerminal(c[0],!0),d,a),c=t.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&t.setSelectionCell(d[c].cell)))))}var u=this,t=u.editor.graph,w=t.getModel();mxResources.parse("selectChildren=Select Children"); -mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=u.menus.createPopupMenu;u.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(t.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(t.getSelectionCell())&& +var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);t.moveCells(g,h,k);return t.addCells(d,e)}finally{t.model.endUpdate()}}function f(a){t.model.beginUpdate();try{var b= +t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=t.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=t.view.getBounds(f),l=m(a),n=t.view.translate,p=t.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height- +e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-n.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function g(a, +b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| +c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():c==b?(d=t.getOutgoingEdges(a),null!=d&&0<d.length&&t.setSelectionCell(t.model.getTerminal(d[0],!1))):(c=t.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(t.model.getTerminal(c[0],!0),d,a),c=t.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&t.setSelectionCell(d[c].cell)))))}var u=this,t=u.editor.graph,x=t.getModel();mxResources.parse("selectChildren=Select Children"); +mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var z=u.menus.createPopupMenu;u.menus.createPopupMenu=function(a,c,d){z.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(t.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(t.getSelectionCell())&& (a.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};u.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(), a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants", -function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+T");var B=t.removeCells;t.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&d(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(t.traverse(g,!0, -function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=t.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return B.apply(this,arguments)};u.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var q=t.duplicateCells;t.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f], -a)}this.model.beginUpdate();try{var h=q.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=t.getIncomingEdges(h[e]),g=t.getIncomingEdges(a[e]);if(0==l.length&&0<g.length){var k=this.cloneCells([g[0]])[0];this.addEdge(k,t.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var v=t.moveCells;t.moveCells=function(a,c,d,e,f,g,h){var l=null;this.model.beginUpdate();try{var k=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f); -if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||t.model.isEdge(a[p])&&null==t.model.getTerminal(a[p],!0)){f=t.model.getParent(a[p]);break}if(null!=k&&f!=k&&null!=this.view.getState(a[0])){var q=t.getIncomingEdges(a[0]);if(0<q.length){var u=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=u){var w=t.view.getState(k);null!=w&&(c=(w.getCenterX()-u.getCenterX())/t.view.scale,d=(w.getCenterY()-u.getCenterY())/t.view.scale)}}}}l=v.apply(this,arguments); -if(null!=l&&null!=a&&l.length==a.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))b(k)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],k,!0);else if(b(a[p])&&(q=t.getIncomingEdges(a[p]),0<q.length))if(!e)b(k)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],k,!0);else if(0==t.getIncomingEdges(l[p]).length){m=k;if(null==m||m==t.model.getParent(a[p]))m=t.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e, -t.getDefaultParent(),m,l[p])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var x=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var l=t.getCellGeometry(g[h]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:u.actions.get("selectChildren"), +function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=t.removeCells;t.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];x.isEdge(g)&&d(g)&&(e.push(g),g=x.getTerminal(g,!1));b(g)?(t.traverse(g,!0, +function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=t.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};u.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var p=t.duplicateCells;t.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f], +a)}this.model.beginUpdate();try{var h=p.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=t.getIncomingEdges(h[e]),g=t.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,t.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var w=t.moveCells;t.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f); +if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||t.model.isEdge(a[p])&&null==t.model.getTerminal(a[p],!0)){f=t.model.getParent(a[p]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var q=t.getIncomingEdges(a[0]);if(0<q.length){var u=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=u){var v=t.view.getState(l);null!=v&&(c=(v.getCenterX()-u.getCenterX())/t.view.scale,d=(v.getCenterY()-u.getCenterY())/t.view.scale)}}}}k=w.apply(this,arguments); +if(null!=k&&null!=a&&k.length==a.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(b(a[p])&&(q=t.getIncomingEdges(a[p]),0<q.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],l,!0);else if(0==t.getIncomingEdges(k[p]).length){m=l;if(null==m||m==t.model.getParent(a[p]))m=t.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e, +t.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};if(null!=u.sidebar){var y=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=y.apply(this,arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=t.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var B={88:u.actions.get("selectChildren"), 84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},A=u.onKeyDown;u.onKeyDown=function(a){try{if(t.isEnabled()&&!t.isEditing()&&b(t.getSelectionCell())&&1==t.getSelectionCount()){var d=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(t.getSelectionCell()):f(t.getSelectionCell()):13==a.which&&(d=n(t.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&t.model.isEdge(d[0])?t.setSelectionCell(t.model.getTerminal(d[0], -!1)):t.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(t.getSelectionCell(), -mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(K){console.log("error",K)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var E=t.connectVertex;t.connectVertex=function(a,d,e,g,h,l){var k=t.getIncomingEdges(a);return b(a)&&0<k.length?(e=m(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?c(a):n(a,d!=mxConstants.DIRECTION_NORTH&& -d!=mxConstants.DIRECTION_WEST)):E.call(this,a,d,e,g,h,l)};t.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&t.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"), +!1)):t.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=B[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(t.getSelectionCell(), +mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(K){console.log("error",K)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var I=t.connectVertex;t.connectVertex=function(a,d,e,g,h,k){var l=t.getIncomingEdges(a);return b(a)&&0<l.length?(e=m(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):g==h?c(a):n(a,d!=mxConstants.DIRECTION_NORTH&& +d!=mxConstants.DIRECTION_WEST)):I.call(this,a,d,e,g,h,k)};t.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&t.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"), this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells); this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var D=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){D.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top= -this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this,arguments),d=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container", +this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this,arguments),d=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container", function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;"); b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;"); e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var h=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");h.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);h.insertEdge(k,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");t.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);t.insertEdge(w,!1);a.insert(c);a.insert(g);a.insert(k);a.insert(w);a.insert(b);a.insert(d);a.insert(e);a.insert(h);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], +k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);h.insertEdge(k,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");t.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +x.geometry.relative=!0;x.edge=!0;b.insertEdge(x,!0);t.insertEdge(x,!1);a.insert(c);a.insert(g);a.insert(k);a.insert(x);a.insert(b);a.insert(d);a.insert(e);a.insert(h);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0, 0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Organization", @@ -7297,226 +7296,227 @@ a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyl a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0, 0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],220,60,"Sub Sections")})])}}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement; -(function(){function k(n){var g=null!=n.Text?n.Text:null!=n.Value?n.Value:n.Lane_0;null==g&&null!=n.State?null!=n.State.t&&(g=n.State):null==g&&null!=n.Note?null!=n.Note.t&&(g=n.Note):null==g&&null!=n.Title?null!=n.Title.t&&(g=n.Title):null!=n.t&&(g=n);null==g&&null!=n.TextAreas&&null!=n.TextAreas.Text&&null!=n.TextAreas.Text.Value&&null!=n.TextAreas.Text.Value.t&&(g=n.TextAreas.Text.Value);if(null!=g){if(null!=g.t)return g.t=g.t.replace(/</g,"<"),g.t=g.t.replace(/>/g,">"),g.t;if(null!=g.Value&& -null!=g.Value.t)return g.Value.t=g.Value.t.replace(/</g,"<"),g.Value.t=g.Value.t.replace(/>/g,">"),g.Value.t}return""}function cb(n){return null!=n.Action?n.Action:n}function za(n){if(null!=n.Text){if(null!=n.Text.m)return n.Text.m}else if(null!=n.TextAreas){if(null!=n.TextAreas.Text&&null!=n.TextAreas.Text.Value&&null!=n.TextAreas.Text.Value.m)return n.TextAreas.Text.Value.m}else if(null!=n.m)return n.m;return null}function m(n){return N(n)+I(n)+M(n)+ha(n)+ta(n)+ua(n)+Va(n)+va(n)+wa(n)+Za(n)} -function N(n){n=za(n);if(null!=n)for(var g=0;g<n.length;){var k=n[g];if("s"==k.n&&null!=k.v)return"fontSize="+Math.round(.6*k.v)+";";g++}return"fontSize=10;"}function I(n){n=za(n);if(null!=n)for(var g=0;g<n.length;){var k=n[g];if("c"==k.n&&null!=k.v)return n=k.v,"#"!=n.charAt(0)&&(n="#"+n),n=n.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+n+";";g++}return""}function M(n){n=za(n);if(null!=n){var g=0,k=!1;if(null!=n)for(var c=0;!k&&c<n.length;){var a=n[c];"b"==a.n&&null!=a.v&&a.v&&(k=!0,g+=1);c++}k= -!1;if(null!=n)for(c=0;!k&&c<n.length;)a=n[c],"i"==a.n&&null!=a.v&&a.v&&(k=!0,g+=2),c++;k=!1;if(null!=n)for(c=0;!k&&c<n.length;)a=n[c],"u"==a.n&&null!=a.v&&a.v&&(k=!0,g+=4),c++;if(0<g)return"fontStyle="+g+";"}return""}function ha(n){n=za(n);if(null!=n)for(var g=0;g<n.length;){var k=n[g];if("a"==k.n&&null!=k.v)return"align="+k.v+";";g++}return""}function ta(n){var g=za(n);if(null!=g)for(var k=0;k<g.length;){var c=g[k];if("il"==c.n){if(null!=c.v)return"spacingLeft="+.6*c.v+";"}else if("s"==c.n&&"align=center;"!= -ha(n)&&null!=c.v)return"spacingLeft="+.6*c.v+";";k++}return""}function ua(n){n=za(n);if(null!=n)for(var g=0;g<n.length;){var k=n[g];if("ir"==k.n&&null!=k.v)return"spacingRight="+k.v+";";g++}return""}function Va(g){g=za(g);if(null!=g)for(var n=0;n<g.length;){var k=g[n];if("mt"==k.n&&null!=k.v)return"spacingTop="+k.v+";";n++}return""}function va(g){g=za(g);if(null!=g)for(var n=0;n<g.length;){var k=g[n];if("mb"==k.n&&null!=k.v)return"spacingBottom="+k.v+";";n++}return""}function wa(g){return"number"=== -typeof g.InsetMargin?"spacing="+parseInt(g.InsetMargin)+";":""}function Za(g){return null!=g.Text_VAlign&&"string"===typeof g.Text_VAlign?"verticalAlign="+g.Text_VAlign+";":xa(mxConstants.STYLE_VERTICAL_ALIGN,g.TextVAlign,"middle")}function g(g,k){return cc.includes(k.Class)?"Venn"==k.Class.substring(0,4)?xa(mxConstants.STYLE_STROKECOLOR,g.FillColor.substring(0,7),"#FFFFFF"):"":0==g.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":xa(mxConstants.STYLE_STROKECOLOR,g.LineColor.substring(0,7),"#000000")} -function p(g,k){var n="";gb.includes(k.Class)||(n+=xa(mxConstants.STYLE_OPACITY,g.Opacity,"100"));if("string"===typeof g.LineColor&&!gb.includes(k.Class)&&7<g.LineColor.length)var c="0x"+g.LineColor.substring(g.LineColor.length-2,g.LineColor.length),n=n+("strokeOpacity="+Math.round(parseInt(c)/2.55)+";");"string"===typeof g.FillColor&&!gb.includes(k.Class)&&7<g.FillColor.length&&(c="0x"+g.FillColor.substring(g.FillColor.length-2,g.FillColor.length),n+="fillOpacity="+Math.round(parseInt(c)/2.55)+";"); -return n}function dc(g,k){if(null!=g.Rounding&&!ec.includes(k.Class)){if(0<g.Rounding)return"rounded=1;absoluteArcSize=1;arcSize="+.6*g.Rounding+";"}else if(null==g.Rounding&&fc.includes(k.Class))return"rounded=1;absoluteArcSize=1;arcSize=8;";return""}function V(g,k,l){return null!=g.Rotation&&(g=mxUtils.toDegree(parseFloat(g.Rotation)),"AdvancedSwimLaneBlockRotated"==k.Class?(g+=90,l.geometry.rotate90()):uc.includes(k.Class)?(g-=90,l.geometry.rotate90(),l.geometry.rotate90(),l.geometry.rotate90()): -vc.includes(k.Class)&&(g+=180,l.geometry.rotate90(),l.geometry.rotate90()),0!=g)?"rotation="+g+";":""}function r(g){return null!=g.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function q(g,k){if(null!=g.FillColor&&!wc.includes(k.Class))if("object"===typeof g.FillColor){if(null!=g.FillColor.cs&&1<g.FillColor.cs.length)return xa(mxConstants.STYLE_FILLCOLOR,g.FillColor.cs[0].c.substring(0,7))+xa(mxConstants.STYLE_GRADIENTCOLOR,g.FillColor.cs[1].c.substring(0,7))}else return"string"===typeof g.FillColor? -xa(mxConstants.STYLE_FILLCOLOR,g.FillColor.substring(0,7),"#FFFFFF"):xa(mxConstants.STYLE_FILLCOLOR,"none");return""}function t(g){return"dashed"==g.StrokeStyle?"dashed=1;":"dotted"==g.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==g.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==g.StrokeStyle?"dashed=1;dashPattern=1 1;":""}function l(g){return xa(mxConstants.STYLE_STROKEWIDTH,.6*parseFloat(g.LineWidth),"1")}function gc(n,m){var z=cb(m);if(null!=z){var c=hb[z.Class]+";";null!=c&&(n.style+= -c);c=null!=z.Properties?z.Properties:z;if(null!=c){n.value=k(c);var a=n.style,D=N(c)+I(c)+M(c)+ha(c,n)+ta(c)+ua(c)+Va(c)+va(c)+wa(c)+Za(c)+g(c,z)+p(c,z)+dc(c,z)+V(c,z,n)+(c.FlipX?"flipH=1;":"")+(c.FlipY?"flipV=1;":"")+r(c)+q(c,z)+t(c)+l(c);z="ImageSearchBlock2"==z.Class?"image="+c.URL+";":"";n.style=a+(D+z);if(n.edge){n.style+="rounded=1;arcSize=6;";if("diagonal"!=c.Shape)if(null!=c.ElbowPoints)for(n.geometry.points=[],z=0;z<c.ElbowPoints.length;z++)n.geometry.points.push(new mxPoint(Math.round(.6* -c.ElbowPoints[z].x+0),Math.round(.6*c.ElbowPoints[z].y+0)));else"elbow"==c.Shape?n.style=null!=c.Endpoint1.Block&&null!=c.Endpoint1.Block?n.style+"edgeStyle=orthogonalEdgeStyle;":n.style+"edgeStyle=elbowEdgeStyle;":null!=c.Endpoint1.Block&&null!=c.Endpoint1.Block&&(n.style+="edgeStyle=orthogonalEdgeStyle;","curve"==c.Shape&&(n.style+="curved=1;"));null!=c.Endpoint1.Style&&(n.style+="startArrow="+wb[c.Endpoint1.Style]+";");null!=c.Endpoint2.Style&&(n.style+="endArrow="+wb[c.Endpoint2.Style].replace(/startSize/g, -"endSize")+";");xb(n,c.Endpoint1,!0);xb(n,c.Endpoint2,!1)}}}}function yb(g){var k=cb(g).Properties.BoundingBox;null!=g.Class&&"AWS"===g.Class.substring(0,3)&&(k.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*k.x+0),Math.round(.6*k.y+0),Math.round(.6*k.w),Math.round(.6*k.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;gc(v,g);return v}function db(g,l,m){m=2*(parseFloat(g.Location)-.5);g=new mxCell(k(g),new mxGeometry(m,0,0,0),"text;html=1;resizable=0;labelBackgroundColor=#ffffff;");g.geometry.relative= -!0;g.vertex=!0;l.insert(g);return l}function xa(g,k,l,c){null!=k&&null!=c&&(k=c(k));return null!=k&&k!=l?g+"="+k+";":""}function xb(g,k,l){null!=k&&null!=k.LinkX&&null!=k.LinkY&&(g.style+=(l?"exitX":"entryX")+"="+k.LinkX+";"+(l?"exitY":"entryY")+"="+k.LinkY+";"+(l?"exitPerimeter":"entryPerimeter")+"=0;")}function Ta(g,k,l,c,a,m,f,d){g=new mxCell("",new mxGeometry(g,k,0,0),"strokeColor=none;fillColor=none;");g.vertex=!0;f.insert(g);m=[g];l=sb.cloneCell(l);d.insertEdge(l,!1);g.insertEdge(l,!0);m.push(l); -c.push(a.addCell(l,null,null,null,null))}function W(g,k,l,c,a,m,f,d,p){g=new mxCell("",new mxGeometry(g,k,0,0),"strokeColor=none;fillColor=none;");g.vertex=!0;p.insert(g);l=new mxCell("",new mxGeometry(l,c,0,0),"strokeColor=none;fillColor=none;");l.vertex=!0;p.insert(l);d=[l];a=sb.cloneCell(a);g.insertEdge(a,!0);l.insertEdge(a,!1);d.push(a);m.push(f.addCell(a,null,null,null,null))}function xc(n,D,z){var c=cb(n),a=c.Properties,ma=a.BoundingBox,f=Math.round(.6*ma.w),d=Math.round(.6*ma.h),Aa=Math.round(.6* -ma.x+0),Ba=Math.round(.6*ma.y+0);v=new mxCell("",new mxGeometry(Aa,Ba,f,d),"html=1;whiteSpace=wrap;");v.vertex=!0;switch(n.Class){case "BraceNoteBlock":case "UI2BraceNoteBlock":var pc=!1;null!=a.BraceDirection&&"Right"==a.BraceDirection&&(pc=!0);var ib=null,na=null;pc?(ib=new mxCell("",new mxGeometry(f-.125*d,0,.125*d,d),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(0,0,f-.125*d,d),"strokeColor=none;fillColor=none;")):(ib=new mxCell("",new mxGeometry(0,0,.125*d,d),"shape=curlyBracket;rounded=1;flipH=1;"), -na=new mxCell("",new mxGeometry(.125*d,0,f-.125*d,d),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=V(a,c,v);ib.vertex=!0;v.insert(ib);ib.style+=g(a,c)+p(a,c)+r(a)+t(a)+l(a);na.vertex=!0;na.value=k(a);v.insert(na);na.style+=N(a)+I(a)+M(a)+ha(a,na)+ta(a)+ua(a)+Va(a)+va(a)+wa(a)+Za(a);break;case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":var xa=0;null!=a.Lanes&&(xa=a.Lanes.length);v.style="strokeColor=none;fillColor=none;";for(var za=0,$a=[], -b=0;b<xa;b++){var qc=parseFloat(a.Lanes[b].p);$a.push(new mxCell("",new mxGeometry(f*za,0,f*qc,d),"shape=swimlane;startSize=25;"));$a[b].vertex=!0;v.insert($a[b]);$a[b].value=k(a["Lane_"+b]);$a[b].style+=N(a["Lane_"+b])+I(a["Lane_"+b])+M(a["Lane_"+b])+ha(a["Lane_"+b],$a[b])+ta(a["Lane_"+b])+ua(a["Lane_"+b])+Va(a["Lane_"+b])+va(a["Lane_"+b])+wa(a["Lane_"+b])+Za(a["Lane_"+b])+g(a,c)+p(a,c)+dc(a,c)+V(a,c,$a[b])+(a.FlipX?"flipH=1;":"")+(a.FlipY?"flipV=1;":"")+r(a)+q(a,c)+t(a)+l(a);za+=qc}break;case "AndroidDevice":if(null!= -a.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;";var ab=null,zb=null,Ab=null;if("Tablet"==a.AndroidDeviceName||"Mini Tablet"==a.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",ab=new mxCell("",new mxGeometry(.112*f,.077*d,.77*f,.85*d),""),a.KeyboardShown&&(zb=new mxCell("",new mxGeometry(.112*f,.727*d,.77*f,.2*d),"shape=mxgraph.android.keyboard;")),a.FullScreen||(Ab=new mxCell("",new mxGeometry(.112*f,.077*d,.77*f,.03*d),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+ -.015*d+";"));else if("Large Phone"==a.AndroidDeviceName||"Phone"==a.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",ab=new mxCell("",new mxGeometry(.04*f,.092*d,.92*f,.816*d),""),a.KeyboardShown&&(zb=new mxCell("",new mxGeometry(.04*f,.708*d,.92*f,.2*d),"shape=mxgraph.android.keyboard;")),a.FullScreen||(Ab=new mxCell("",new mxGeometry(.04*f,.092*d,.92*f,.03*d),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*d+";"));ab.vertex=!0;v.insert(ab); -"Dark"==a.Scheme?ab.style+="fillColor=#111111;":"Light"==a.Scheme&&(ab.style+="fillColor=#ffffff;");null!=zb&&(zb.vertex=!0,v.insert(zb));null!=Ab&&(Ab.vertex=!0,v.insert(Ab))}break;case "AndroidAlertDialog":var Ca=new mxCell("",new mxGeometry(0,0,f,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ca.vertex=!0;v.insert(Ca);var T=new mxCell("",new mxGeometry(0,25,f,10),"shape=line;strokeColor=#33B5E5;");T.vertex=!0;v.insert(T);var Bb=new mxCell("",new mxGeometry(0,30,f,d-30),"strokeColor=none;fillColor=none;verticalAlign=top;"); -Bb.vertex=!0;v.insert(Bb);var Y=new mxCell("",new mxGeometry(0,d-25,.5*f,25),"fillColor=none;");Y.vertex=!0;v.insert(Y);var Z=new mxCell("",new mxGeometry(.5*f,d-25,.5*f,25),"fillColor=none;");Z.vertex=!0;v.insert(Z);Ca.value=k(a.DialogTitle);Ca.style+=m(a.DialogTitle);Bb.value=k(a.DialogText);Bb.style+=m(a.DialogText);Y.value=k(a.Button_0);Y.style+=m(a.Button_0);Z.value=k(a.Button_1);Z.style+=m(a.Button_1);"Dark"==a.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",Y.style+="strokeColor=#353535;", -Z.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",Y.style+="strokeColor=#E2E2E2;",Z.style+="strokeColor=#E2E2E2;");break;case "AndroidDateDialog":case "AndroidTimeDialog":Ca=new mxCell("",new mxGeometry(0,0,f,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ca.vertex=!0;v.insert(Ca);Ca.value=k(a.DialogTitle);Ca.style+=m(a.DialogTitle);T=new mxCell("",new mxGeometry(0,25,f,10),"shape=line;strokeColor=#33B5E5;");T.vertex=!0;v.insert(T);Y=new mxCell("",new mxGeometry(0, -d-25,.5*f,25),"fillColor=none;");Y.vertex=!0;v.insert(Y);Y.value=k(a.Button_0);Y.style+=m(a.Button_0);Z=new mxCell("",new mxGeometry(.5*f,d-25,.5*f,25),"fillColor=none;");Z.vertex=!0;v.insert(Z);Z.value=k(a.Button_1);Z.style+=m(a.Button_1);var jb=new mxCell("",new mxGeometry(.5*f-4,41,8,4),"shape=triangle;direction=north;");jb.vertex=!0;v.insert(jb);var kb=new mxCell("",new mxGeometry(.25*f-4,41,8,4),"shape=triangle;direction=north;");kb.vertex=!0;v.insert(kb);var lb=new mxCell("",new mxGeometry(.75* -f-4,41,8,4),"shape=triangle;direction=north;");lb.vertex=!0;v.insert(lb);var Cb=new mxCell("",new mxGeometry(.375*f,50,.2*f,15),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.value=k(a.Label_1);Cb.style+=m(a.Label_1);var Db=new mxCell("",new mxGeometry(.125*f,50,.2*f,15),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.value=k(a.Label_0);Db.style+=m(a.Label_0);var mb=null;"AndroidDateDialog"==n.Class&&(mb=new mxCell("",new mxGeometry(.625*f,50,.2*f,15),"strokeColor=none;fillColor=none;"), -mb.vertex=!0,v.insert(mb),mb.value=k(a.Label_2),mb.style+=m(a.Label_2));var Da=new mxCell("",new mxGeometry(.43*f,60,.14*f,10),"shape=line;strokeColor=#33B5E5;");Da.vertex=!0;v.insert(Da);var Ea=new mxCell("",new mxGeometry(.18*f,60,.14*f,10),"shape=line;strokeColor=#33B5E5;");Ea.vertex=!0;v.insert(Ea);var db=new mxCell("",new mxGeometry(.68*f,60,.14*f,10),"shape=line;strokeColor=#33B5E5;");db.vertex=!0;v.insert(db);var Eb=new mxCell("",new mxGeometry(.375*f,65,.2*f,15),"strokeColor=none;fillColor=none;"); -Eb.vertex=!0;v.insert(Eb);Eb.value=k(a.Label_4);Eb.style+=m(a.Label_4);var nb=null;"AndroidTimeDialog"==n.Class&&(nb=new mxCell("",new mxGeometry(.3*f,65,.1*f,15),"strokeColor=none;fillColor=none;"),nb.vertex=!0,v.insert(nb),nb.value=k(a.Label_Colon),nb.style+=m(a.Label_Colon));var Fb=new mxCell("",new mxGeometry(.125*f,65,.2*f,15),"strokeColor=none;fillColor=none;");Fb.vertex=!0;v.insert(Fb);Fb.value=k(a.Label_3);Fb.style+=m(a.Label_3);var Gb=new mxCell("",new mxGeometry(.625*f,65,.2*f,15),"strokeColor=none;fillColor=none;"); -Gb.vertex=!0;v.insert(Gb);Gb.value=k(a.Label_5);Gb.style+=m(a.Label_5);var gb=new mxCell("",new mxGeometry(.43*f,75,.14*f,10),"shape=line;strokeColor=#33B5E5;");gb.vertex=!0;v.insert(gb);var hb=new mxCell("",new mxGeometry(.18*f,75,.14*f,10),"shape=line;strokeColor=#33B5E5;");hb.vertex=!0;v.insert(hb);var wb=new mxCell("",new mxGeometry(.68*f,75,.14*f,10),"shape=line;strokeColor=#33B5E5;");wb.vertex=!0;v.insert(wb);var Hb=new mxCell("",new mxGeometry(.375*f,80,.2*f,15),"strokeColor=none;fillColor=none;"); -Hb.vertex=!0;v.insert(Hb);Hb.value=k(a.Label_7);Hb.style+=m(a.Label_7);var Ib=new mxCell("",new mxGeometry(.125*f,80,.2*f,15),"strokeColor=none;fillColor=none;");Ib.vertex=!0;v.insert(Ib);Ib.value=k(a.Label_6);Ib.style+=m(a.Label_6);var Jb=new mxCell("",new mxGeometry(.625*f,80,.2*f,15),"strokeColor=none;fillColor=none;");Jb.vertex=!0;v.insert(Jb);Jb.value=k(a.Label_8);Jb.style+=m(a.Label_8);var ob=new mxCell("",new mxGeometry(.5*f-4,99,8,4),"shape=triangle;direction=south;");ob.vertex=!0;v.insert(ob); -var pb=new mxCell("",new mxGeometry(.25*f-4,99,8,4),"shape=triangle;direction=south;");pb.vertex=!0;v.insert(pb);var qb=new mxCell("",new mxGeometry(.75*f-4,99,8,4),"shape=triangle;direction=south;");qb.vertex=!0;v.insert(qb);"Dark"==a.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",Y.style+="strokeColor=#353535;",Z.style+="strokeColor=#353535;",jb.style+="strokeColor=none;fillColor=#7E7E7E;",kb.style+="strokeColor=none;fillColor=#7E7E7E;",lb.style+="strokeColor=none;fillColor=#7E7E7E;", -ob.style+="strokeColor=none;fillColor=#7E7E7E;",pb.style+="strokeColor=none;fillColor=#7E7E7E;",qb.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",Y.style+="strokeColor=#E2E2E2;",Z.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=none;fillColor=#939393;",kb.style+="strokeColor=none;fillColor=#939393;",lb.style+="strokeColor=none;fillColor=#939393;",ob.style+="strokeColor=none;fillColor=#939393;",pb.style+="strokeColor=none;fillColor=#939393;", -qb.style+="strokeColor=none;fillColor=#939393;");break;case "AndroidListItems":var fa=d,Wa=0;if(a.ShowHeader){var Wa=8,Kb=new mxCell("",new mxGeometry(0,0,f,Wa),"strokeColor=none;fillColor=none;");Kb.vertex=!0;v.insert(Kb);Kb.value=k(a.Header);Kb.style+=m(a.Header);var fa=fa-Wa,xb=new mxCell("",new mxGeometry(0,Wa-2,f,4),"shape=line;strokeColor=#999999;");xb.vertex=!0;v.insert(xb)}var Fa=parseInt(a.Items);0<Fa&&(fa/=Fa);for(var x=[],T=[],b=0;b<Fa;b++)x[b]=new mxCell("",new mxGeometry(0,Wa+b*fa,f, -fa),"strokeColor=none;fillColor=none;"),x[b].vertex=!0,v.insert(x[b]),x[b].value=k(a["Item_"+b]),x[b].style+=m(a["Item_"+b]),0<b&&(T[b]=new mxCell("",new mxGeometry(0,Wa+b*fa-2,f,4),"shape=line;"),T[b].vertex=!0,v.insert(T[b]),T[b].style="Dark"==a.Scheme?T[b].style+"strokeColor=#ffffff;":T[b].style+"strokeColor=#D9D9D9;");v.style="Dark"==a.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";break;case "AndroidTabs":var Ga=parseInt(a.Tabs),oa=f;0<Ga&& -(oa/=Ga);for(var P=[],T=[],b=0;b<Ga;b++)P[b]=new mxCell("",new mxGeometry(b*oa,0,oa,d),"strokeColor=none;fillColor=none;"),P[b].vertex=!0,v.insert(P[b]),P[b].value=k(a["Tab_"+b]),P[b].style+=m(a["Tab_"+b]),0<b&&(T[b]=new mxCell("",new mxGeometry(b*oa-2,.2*d,4,.6*d),"shape=line;direction=north;"),T[b].vertex=!0,v.insert(T[b]),T[b].style="Dark"==a.Scheme?T[b].style+"strokeColor=#484848;":T[b].style+"strokeColor=#CCCCCC;");var yb=new mxCell("",new mxGeometry(a.Selected*oa+2,d-3,oa-4,3),"strokeColor=none;fillColor=#33B5E5;"); -yb.vertex=!0;v.insert(yb);v.style="Dark"==a.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Aa),Math.round(Ba+.25*d),Math.round(f),Math.round(.5*d)),"html=1;whiteSpace=wrap;");v.vertex=!0;var Lb=new mxCell("",new mxGeometry(0,0,f*a.BarPosition,Math.round(.5*d)),"strokeColor=none;fillColor=#33B5E5;");Lb.vertex=!0;v.insert(Lb);v.style="Dark"==a.Scheme?v.style+"strokeColor=none;fillColor=#474747;": -v.style+"strokeColor=none;fillColor=#BBBBBB;";break;case "AndroidImageBlock":v.style="Dark"==a.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";break;case "AndroidTextBlock":v.style="Dark"==a.Scheme?a.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":a.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;": -v.style+"fillColor=#ffffff;strokeColor=none;";v.value=k(a.Label);v.style+=m(a.Label);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(a.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(a.HighlightShow){var Xa=null,Xa=a.HighlightTop?new mxCell("",new mxGeometry(0,0,f,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,d- -2,f,2),"strokeColor=none;");Xa.vertex=!0;v.insert(Xa);switch(a.HighlightColor){case "Blue":Xa.style+="fillColor=#33B5E5;";break;case "Dark Gray":Xa.style+="fillColor=#B0B0B0;";break;case "White":Xa.style+="fillColor=#ffffff;"}}if(a.VlignShow){var rb=new mxCell("",new mxGeometry(20,5,2,d-10),"shape=line;direction=north;");rb.vertex=!0;v.insert(rb);switch(a.VlignColor){case "Blue":rb.style+="strokeColor=#244C5A;";break;case "White":rb.style+="strokeColor=#ffffff;"}}break;case "AndroidButton":v.value= -k(a.Label);v.style+=m(a.Label)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==a.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";break;case "AndroidTextBox":v.value=k(a.Label);v.style+=m(a.Label);var Mb=new mxCell("",new mxGeometry(2,d-6,f-4,4),"shape=partialRectangle;top=0;fillColor=none;");Mb.vertex=!0;v.insert(Mb);v.style="Dark"==a.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;"; -Mb.style=a.TextFocused?Mb.style+"strokeColor=#33B5E5;":Mb.style+"strokeColor=#A9A9A9;";break;case "AndroidRadioButton":var eb=null;a.Checked&&(eb=new mxCell("",new mxGeometry(.15*f,.15*d,.7*f,.7*d),"shape=ellipse;fillColor=#33B5E5;strokeWidth=0.6;"),eb.vertex=!0,v.insert(eb));"Dark"==a.Scheme?(v.style+="shape=ellipse;strokeWidth=0.6;strokeColor=#272727;",a.Checked?(eb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=0.6;fillColor=#ffffff;strokeColor=#5C5C5C;", -a.Checked&&(eb.style+="strokeColor=#999999;"));break;case "AndroidCheckBox":var hc=null;a.Checked&&(hc=new mxCell("",new mxGeometry(.25*f,.05*-d,f,.8*d),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),hc.vertex=!0,v.insert(hc));v.style="Dark"==a.Scheme?v.style+"strokeWidth=0.6;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=0.6;strokeColor=#5C5C5C;fillColor=#ffffff;";break;case "AndroidToggle":v.style="Dark"==a.Scheme?a.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;": -v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":a.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+a.BarPosition+";fillColor=#33b5e5;";break;case "iOSSegmentedControl":Ga=parseInt(a.Tabs);oa=f;v.style+="strokeColor=none;fillColor=none;";0<Ga&&(oa/=Ga);P=[];T=[];for(b=0;b<Ga;b++)P[b]=new mxCell("",new mxGeometry(b*oa, -0,oa,d),"strokeColor="+a.FillColor+";"),P[b].vertex=!0,v.insert(P[b]),P[b].value=k(a["Tab_"+b]),P[b].style+=m(a["Tab_"+b]),P[b].style=a.Selected==b?P[b].style+q(a,c):P[b].style+"fillColor=none;";break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+a.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*a.BarPosition+";";break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Aa),Math.round(Ba+.25*d),Math.round(f),Math.round(.5*d)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;"); -v.vertex=!0;Lb=new mxCell("",new mxGeometry(0,0,f*a.BarPosition,Math.round(.5*d)),"strokeColor=none;"+q(a,c));Lb.vertex=!0;v.insert(Lb);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;"+q(a,c)+"strokeColor=#D6D6D6;";break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;"+q(a,c)+"strokeColor=#000000;";var F=new mxCell(k(a.Text),new mxGeometry(.35*f,0,.3*f,d),"strokeColor=none;fillColor=none;");F.vertex=!0;v.insert(F);F.style+=m(a.Text);var ia=new mxCell(k(a.Carrier), -new mxGeometry(.09*f,0,.2*f,d),"strokeColor=none;fillColor=none;");ia.vertex=!0;v.insert(ia);ia.style+=m(a.Carrier);break;case "iOSSearchBar":v.style+="strokeColor=none;"+q(a,c)+p(a,c)+dc(a,c)+m(a.Search);v.value=k(a.Search);var J=new mxCell("",new mxGeometry(.3*f,.3*d,.4*d,.4*d),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");J.vertex=!0;v.insert(J);break;case "iOSNavBar":v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+q(a,c)+p(a,c)+m(a.Title); -v.value=k(a.Title);F=new mxCell(k(a.LeftText),new mxGeometry(.03*f,0,.3*f,d),"strokeColor=none;fillColor=none;");F.vertex=!0;v.insert(F);F.style+=m(a.LeftText);ia=new mxCell(k(a.RightText),new mxGeometry(.65*f,0,.3*f,d),"strokeColor=none;fillColor=none;");ia.vertex=!0;v.insert(ia);ia.style+=m(a.RightText);J=new mxCell("",new mxGeometry(.02*f,.2*d,.3*d,.5*d),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");J.vertex=!0;v.insert(J);break;case "iOSTabs":Ga=parseInt(a.Tabs);oa=f;v.style+= -"shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;"+q(a,c)+p(a,c);0<Ga&&(oa/=Ga);P=[];T=[];for(b=0;b<Ga;b++)P[b]=new mxCell("",new mxGeometry(b*oa,0,oa,d),"strokeColor=none;"),P[b].vertex=!0,v.insert(P[b]),P[b].value=k(a["Tab_"+b]),P[b].style+=N(a["Tab_"+b]),P[b].style+=I(a["Tab_"+b])+M(a["Tab_"+b])+ha(a["Tab_"+b])+ta(a["Tab_"+b])+ua(a["Tab_"+b])+Va(a["Tab_"+b])+va(a["Tab_"+b])+wa(a["Tab_"+b]),P[b].style+="verticalAlign=bottom;",P[b].style=a.Selected==b?P[b].style+"fillColor=#BBBBBB;": -P[b].style+"fillColor=none;";break;case "iOSDatePicker":var Ha=new mxCell("",new mxGeometry(0,0,.5*f,.2*d),"strokeColor=none;fillColor=none;");Ha.vertex=!0;v.insert(Ha);Ha.value=k(a.Option11);Ha.style+=m(a.Option11);var Ia=new mxCell("",new mxGeometry(.5*f,0,.15*f,.2*d),"strokeColor=none;fillColor=none;");Ia.vertex=!0;v.insert(Ia);Ia.value=k(a.Option21);Ia.style+=m(a.Option21);var Ja=new mxCell("",new mxGeometry(.65*f,0,.15*f,.2*d),"strokeColor=none;fillColor=none;");Ja.vertex=!0;v.insert(Ja);Ja.value= -k(a.Option31);Ja.style+=m(a.Option31);var Ka=new mxCell("",new mxGeometry(0,.2*d,.5*f,.2*d),"strokeColor=none;fillColor=none;");Ka.vertex=!0;v.insert(Ka);Ka.value=k(a.Option12);Ka.style+=m(a.Option12);var La=new mxCell("",new mxGeometry(.5*f,.2*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");La.vertex=!0;v.insert(La);La.value=k(a.Option22);La.style+=m(a.Option22);var Ma=new mxCell("",new mxGeometry(.65*f,.2*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Ma.vertex=!0;v.insert(Ma);Ma.value=k(a.Option32); -Ma.style+=m(a.Option32);var aa=new mxCell("",new mxGeometry(0,.4*d,.5*f,.2*d),"strokeColor=none;fillColor=none;");aa.vertex=!0;v.insert(aa);aa.value=k(a.Option13);aa.style+=m(a.Option13);var ba=new mxCell("",new mxGeometry(.5*f,.4*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");ba.vertex=!0;v.insert(ba);ba.value=k(a.Option23);ba.style+=m(a.Option23);var Na=new mxCell("",new mxGeometry(.65*f,.4*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Na.vertex=!0;v.insert(Na);Na.value=k(a.Option33);Na.style+= -m(a.Option33);var ca=new mxCell("",new mxGeometry(.8*f,.4*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");ca.vertex=!0;v.insert(ca);ca.value=k(a.Option43);ca.style+=m(a.Option43);var da=new mxCell("",new mxGeometry(0,.6*d,.5*f,.2*d),"strokeColor=none;fillColor=none;");da.vertex=!0;v.insert(da);da.value=k(a.Option14);da.style+=m(a.Option14);var Oa=new mxCell("",new mxGeometry(.5*f,.6*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Oa.vertex=!0;v.insert(Oa);Oa.value=k(a.Option24);Oa.style+=m(a.Option24); -var Pa=new mxCell("",new mxGeometry(.65*f,.6*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Pa.vertex=!0;v.insert(Pa);Pa.value=k(a.Option34);Pa.style+=m(a.Option34);var Qa=new mxCell("",new mxGeometry(.8*f,.6*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Qa.vertex=!0;v.insert(Qa);Qa.value=k(a.Option44);Qa.style+=m(a.Option44);var ea=new mxCell("",new mxGeometry(0,.8*d,.5*f,.2*d),"strokeColor=none;fillColor=none;");ea.vertex=!0;v.insert(ea);ea.value=k(a.Option15);ea.style+=m(a.Option15);var Ra= -new mxCell("",new mxGeometry(.5*f,.8*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=k(a.Option25);Ra.style+=m(a.Option25);var Sa=new mxCell("",new mxGeometry(.65*f,.8*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=k(a.Option35);Sa.style+=m(a.Option35);Da=new mxCell("",new mxGeometry(0,.4*d-2,f,4),"shape=line;strokeColor=#888888;");Da.vertex=!0;v.insert(Da);Ea=new mxCell("",new mxGeometry(0,.6*d-2,f,4),"shape=line;strokeColor=#888888;"); -Ea.vertex=!0;v.insert(Ea);v.style+=q(a,c)+p(a,c)+"strokeColor=none;";break;case "iOSTimePicker":Ha=new mxCell("",new mxGeometry(0,0,.25*f,.2*d),"strokeColor=none;fillColor=none;");Ha.vertex=!0;v.insert(Ha);Ha.value=k(a.Option11);Ha.style+=m(a.Option11);Ia=new mxCell("",new mxGeometry(.25*f,0,.3*f,.2*d),"strokeColor=none;fillColor=none;");Ia.vertex=!0;v.insert(Ia);Ia.value=k(a.Option21);Ia.style+=m(a.Option21);Ka=new mxCell("",new mxGeometry(0,.2*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");Ka.vertex= -!0;v.insert(Ka);Ka.value=k(a.Option12);Ka.style+=m(a.Option12);La=new mxCell("",new mxGeometry(.25*f,.2*d,.3*f,.2*d),"strokeColor=none;fillColor=none;");La.vertex=!0;v.insert(La);La.value=k(a.Option22);La.style+=m(a.Option22);aa=new mxCell("",new mxGeometry(0,.4*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");aa.vertex=!0;v.insert(aa);aa.value=k(a.Option13);aa.style+=m(a.Option13);ba=new mxCell("",new mxGeometry(.25*f,.4*d,.3*f,.2*d),"strokeColor=none;fillColor=none;");ba.vertex=!0;v.insert(ba); -ba.value=k(a.Option23);ba.style+=m(a.Option23);ca=new mxCell("",new mxGeometry(.7*f,.4*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");ca.vertex=!0;v.insert(ca);ca.value=k(a.Option33);ca.style+=m(a.Option33);da=new mxCell("",new mxGeometry(0,.6*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");da.vertex=!0;v.insert(da);da.value=k(a.Option14);da.style+=m(a.Option14);Oa=new mxCell("",new mxGeometry(.25*f,.6*d,.3*f,.2*d),"strokeColor=none;fillColor=none;");Oa.vertex=!0;v.insert(Oa);Oa.value=k(a.Option24); -Oa.style+=m(a.Option24);Qa=new mxCell("",new mxGeometry(.7*f,.6*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Qa.vertex=!0;v.insert(Qa);Qa.value=k(a.Option34);Qa.style+=m(a.Option34);ea=new mxCell("",new mxGeometry(0,.8*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");ea.vertex=!0;v.insert(ea);ea.value=k(a.Option15);ea.style+=m(a.Option15);Ra=new mxCell("",new mxGeometry(.25*f,.8*d,.3*f,.2*d),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=k(a.Option25);Ra.style+=m(a.Option25); -Da=new mxCell("",new mxGeometry(0,.4*d-2,f,4),"shape=line;strokeColor=#888888;");Da.vertex=!0;v.insert(Da);Ea=new mxCell("",new mxGeometry(0,.6*d-2,f,4),"shape=line;strokeColor=#888888;");Ea.vertex=!0;v.insert(Ea);v.style+=q(a,c)+p(a,c)+"strokeColor=none;";break;case "iOSCountdownPicker":Ja=new mxCell("",new mxGeometry(.45*f,0,.2*f,.2*d),"strokeColor=none;fillColor=none;");Ja.vertex=!0;v.insert(Ja);Ja.value=k(a.Option31);Ja.style+=m(a.Option31);Ma=new mxCell("",new mxGeometry(.45*f,.2*d,.2*f,.2*d), -"strokeColor=none;fillColor=none;");Ma.vertex=!0;v.insert(Ma);Ma.value=k(a.Option32);Ma.style+=m(a.Option32);aa=new mxCell("",new mxGeometry(0,.4*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");aa.vertex=!0;v.insert(aa);aa.value=k(a.Option13);aa.style+=m(a.Option13);ba=new mxCell("",new mxGeometry(.2*f,.4*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");ba.vertex=!0;v.insert(ba);ba.value=k(a.Option23);ba.style+=m(a.Option23);Na=new mxCell("",new mxGeometry(.45*f,.4*d,.2*f,.2*d),"strokeColor=none;fillColor=none;"); -Na.vertex=!0;v.insert(Na);Na.value=k(a.Option33);Na.style+=m(a.Option33);ca=new mxCell("",new mxGeometry(.6*f,.4*d,.2*f,.2*d),"strokeColor=none;fillColor=none;");ca.vertex=!0;v.insert(ca);ca.value=k(a.Option43);ca.style+=m(a.Option43);da=new mxCell("",new mxGeometry(0,.6*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");da.vertex=!0;v.insert(da);da.value=k(a.Option14);da.style+=m(a.Option14);Pa=new mxCell("",new mxGeometry(.45*f,.6*d,.2*f,.2*d),"strokeColor=none;fillColor=none;");Pa.vertex=!0;v.insert(Pa); -Pa.value=k(a.Option34);Pa.style+=m(a.Option34);ea=new mxCell("",new mxGeometry(0,.8*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");ea.vertex=!0;v.insert(ea);ea.value=k(a.Option15);ea.style+=m(a.Option15);Sa=new mxCell("",new mxGeometry(.45*f,.8*d,.2*f,.2*d),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=k(a.Option35);Sa.style+=m(a.Option35);Da=new mxCell("",new mxGeometry(0,.4*d-2,f,4),"shape=line;strokeColor=#888888;");Da.vertex=!0;v.insert(Da);Ea=new mxCell("",new mxGeometry(0, -.6*d-2,f,4),"shape=line;strokeColor=#888888;");Ea.vertex=!0;v.insert(Ea);v.style+=q(a,c)+p(a,c)+"strokeColor=none;";break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*a.SeparatorInset+";";v.style+=N(a.text)+I(a.text)+M(a.text)+Za(a.text);v.value=k(a.text);switch(a.AccessoryIndicatorType){case "Disclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;"); -J.vertex=!0;v.insert(J);break;case "DetailDisclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);var S=new mxCell("",new mxGeometry(.79*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "DetailIndicator":S=new mxCell("",new mxGeometry(.87*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex= -!0;v.insert(S);break;case "CheckMark":J=new mxCell("",new mxGeometry(.89*f,.37*d,.4*d,.26*d),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),J.vertex=!0,v.insert(J)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.6*a.SeparatorInset+";";v.style+=N(a.subtext)+I(a.subtext)+M(a.subtext);v.value=k(a.subtext);var U=new mxCell("",new mxGeometry(0,.4*d,f,.6*d), -"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*a.SeparatorInset+";");U.vertex=!0;v.insert(U);U.style+=N(a.text)+I(a.text)+M(a.text);U.value=k(a.text);switch(a.AccessoryIndicatorType){case "Disclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);break;case "DetailDisclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;"); -J.vertex=!0;v.insert(J);S=new mxCell("",new mxGeometry(.79*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "DetailIndicator":S=new mxCell("",new mxGeometry(.87*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "CheckMark":J=new mxCell("",new mxGeometry(.89*f,.37*d,.4*d,.26*d),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),J.vertex= -!0,v.insert(J)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*a.SeparatorInset+";";v.style+=N(a.subtext)+I(a.subtext)+M(a.subtext);v.value=k(a.subtext);U=null;switch(a.AccessoryIndicatorType){case "Disclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);U=new mxCell("",new mxGeometry(.55* -f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);S=new mxCell("",new mxGeometry(.79*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);U=new mxCell("",new mxGeometry(.45*f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":S= -new mxCell("",new mxGeometry(.87*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);U=new mxCell("",new mxGeometry(.52*f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":J=new mxCell("",new mxGeometry(.89*f,.37*d,.4*d,.26*d),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");J.vertex=!0;v.insert(J);U=new mxCell("",new mxGeometry(.55*f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;"); -break;default:U=new mxCell("",new mxGeometry(.65*f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;")}U.vertex=!0;v.insert(U);U.style+=N(a.text)+I(a.text)+M(a.text);U.value=k(a.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";var ya=new mxCell("",new mxGeometry(0,0,.25*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");ya.vertex=!0;v.insert(ya);ya.style+= -N(a.subtext)+I(a.subtext)+M(a.subtext);ya.value=k(a.subtext);U=new mxCell("",new mxGeometry(.25*f,0,.5*f,d),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");U.vertex=!0;v.insert(U);U.style+=N(a.text)+I(a.text)+M(a.text);U.value=k(a.text);switch(a.AccessoryIndicatorType){case "Disclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);break;case "DetailDisclosure":J=new mxCell("", -new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);S=new mxCell("",new mxGeometry(.79*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "DetailIndicator":S=new mxCell("",new mxGeometry(.87*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "CheckMark":J=new mxCell("",new mxGeometry(.89* -f,.37*d,.4*d,.26*d),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),J.vertex=!0,v.insert(J)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";F=new mxCell("",new mxGeometry(0,0,f,.4*d),"fillColor=none;strokeColor=none;spacing=10;align=left;");F.vertex=!0;v.insert(F);F.style+=N(a.text)+I(a.text)+M(a.text);F.value=k(a.text);ia=new mxCell("",new mxGeometry(0,.6*d,f,.4*d),"fillColor=none;strokeColor=none;spacing=10;align=left;"); -ia.vertex=!0;v.insert(ia);ia.style+=N(a["bottom-text"])+I(a["bottom-text"])+M(a["bottom-text"]);ia.value=k(a["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.style+=N(a.text)+I(a.text)+M(a.text);v.value=k(a.text);break;case "SMPage":if(a.Group){v.style+="strokeColor=none;fillColor=none;";var e=new mxCell("",new mxGeometry(0,0,.9*f,.9*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a); -var h=new mxCell("",new mxGeometry(.1*f,.1*d,.9*f,.9*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a);h.value=k(a.Text);a.Future&&(e.style+="dashed=1;",h.style+="dashed=1;")}else a.Future&&(v.style+="dashed=1;"),v.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a),v.value=k(a.Text);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":v.style+= -g(a,c)+q(a,c)+p(a,c)+r(a)+l(a);e=null;switch(n.Class){case "SMHome":e=new mxCell("",new mxGeometry(.5*f-.4*d,.1*d,.8*d,.8*d),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":e=new mxCell("",new mxGeometry(.5*f-.4*d,.19*d,.8*d,.62*d),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":e=new mxCell("",new mxGeometry(.5*f-.4*d,.1*d,.8*d,.8*d),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMSettings":e=new mxCell("",new mxGeometry(.5*f-.35*d,.15*d,.7*d,.7*d),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":e=new mxCell("",new mxGeometry(.5*f-.35*d,.2*d,.7*d,.6*d),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":e=new mxCell("",new mxGeometry(.5*f-.3*d,.25*d,.6*d,.5*d),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMVideo":e=new mxCell("",new mxGeometry(.5*f-.4*d,.2*d,.8*d,.6*d),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":e=new mxCell("",new mxGeometry(.5*f-.3*d,.2*d,.6*d,.6*d),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":e=new mxCell("",new mxGeometry(.5*f-.4*d,.15*d,.8*d,.7*d),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMChart":var w=q(a,c),w=""==w?"#ffffff;":w.replace("fillColor=",""),e=new mxCell("",new mxGeometry(.5*f-.35*d,.15*d,.7*d,.7*d),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+w);break;case "SMCloud":e=new mxCell("",new mxGeometry(.5*f-.4*d,.27*d,.8*d,.46*d),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":e=new mxCell("",new mxGeometry(.5*f-.25*d,.15*d,.5*d,.7*d),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMForm":e=new mxCell("",new mxGeometry(.5*f-.4*d,.15*d,.8*d,.7*d),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":e=new mxCell("",new mxGeometry(.5*f-.4*d,.2*d,.8*d,.6*d),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":e=new mxCell("",new mxGeometry(.5*f-.4*d,.2*d,.8*d,.6*d),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}e.vertex= -!0;v.insert(e);e.style+=m(a);e.value=k(a.Text);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";e=new mxCell("",new mxGeometry(.1*f,0,.9*f,.9*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a);h=new mxCell("",new mxGeometry(0,.1*d,.9*f,.9*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Text);h.value=k(a.Text);break;case "UMLConstraintBlock":var Wb=new mxCell("",new mxGeometry(0,0,.25*d,d),"shape=curlyBracket;rounded=1;"); -Wb.vertex=!0;v.insert(Wb);var Xb=new mxCell("",new mxGeometry(f-.25*d,0,.25*d,d),"shape=curlyBracket;rounded=1;flipH=1;");Xb.vertex=!0;v.insert(Xb);na=new mxCell("",new mxGeometry(.25*d,0,f-.5*d,d),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=k(a);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=V(a,c,v);Wb.style+=g(a,c)+p(a,c)+r(a)+t(a)+l(a);Xb.style+=g(a,c)+p(a,c)+r(a)+t(a)+l(a);na.style+=N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+Va(a)+va(a)+wa(a)+Za(a);break;case "UMLTextBlock":v.style+= -"strokeColor=none;"+p(a,c)+r(a)+t(a)+l(a)+m(a.Text);v.value=k(a.Text);break;case "BPMNActivity":switch(a.bpmnActivityType){case 1:v.style+=q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+l(a)+m(a.Text);v.value=k(a.Text);break;case 2:v.style+="shape=ext;double=1;"+q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+l(a)+m(a.Text);v.value=k(a.Text);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+q(a,c)+g(a,c)+p(a,c)+r(a)+l(a)+m(a.Text);v.value=k(a.Text);break;case 4:v.style+="shape=ext;strokeWidth=2;"+q(a,c)+g(a,c)+p(a,c)+r(a)+ -t(a)+m(a.Text),v.value=k(a.Text)}if(0!=a.bpmnTaskType){switch(a.bpmnTaskType){case 1:e=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");e.geometry.offset=new mxPoint(4,7);break;case 2:e=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");e.geometry.offset=new mxPoint(4,7);break;case 3:e=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");e.geometry.offset=new mxPoint(4,5);break;case 4:e=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;"); -e.geometry.offset=new mxPoint(4,7);break;case 5:e=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");e.geometry.offset=new mxPoint(4,7);break;case 6:e=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");e.geometry.offset=new mxPoint(4,5);break;case 7:e=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),e.geometry.offset=new mxPoint(4,5)}if(1==a.bpmnTaskType){var Nb=q(a,c),w=g(a,c),w=w.replace("strokeColor","fillColor"), -Nb=Nb.replace("fillColor","strokeColor");""==w&&(w="fillColor=#000000;");""==Nb&&(Nb="strokeColor=#ffffff;");e.style+=Nb+w+"part=1;"}else e.style+=q(a,c)+g(a,c)+"part=1;";e.geometry.relative=!0;e.vertex=!0;v.insert(e)}var Ob=0;0!=a.bpmnActivityMarker1&&Ob++;0!=a.bpmnActivityMarker2&&Ob++;var ja=0;1==Ob?ja=-7.5:2==Ob&&(ja=-19);if(0!=a.bpmnActivityMarker1){switch(a.bpmnActivityMarker1){case 1:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+= -q(a,c)+g(a,c);break;case 2:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 3:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 4:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 5:e=new mxCell("", -new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");e.geometry.offset=new mxPoint(ja,-17);w=g(a,c);w=w.replace("strokeColor","fillColor");""==w&&(w="fillColor=#000000;");e.style+=w;break;case 6:e=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),e.geometry.offset=new mxPoint(ja,-18),e.style+=q(a,c)+g(a,c)}e.geometry.relative=!0;e.vertex=!0;v.insert(e)}2==Ob&&(ja=5);if(0!=a.bpmnActivityMarker2){switch(a.bpmnActivityMarker2){case 1:e= -new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 2:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 3:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 4:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;"); -e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 5:e=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");e.geometry.offset=new mxPoint(ja,-17);w=g(a,c);w=w.replace("strokeColor","fillColor");""==w&&(w="fillColor=#000000;");e.style+=w;break;case 6:e=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),e.geometry.offset=new mxPoint(ja,-18),e.style+=q(a,c)+g(a,c)}e.geometry.relative=!0;e.vertex=!0; -v.insert(e)}break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;"+q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+Va(a)+va(a)+wa(a);v.value=k(a.Text);if(1==a.bpmnDashed)switch(a.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(a.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break; -case 2:v.style+="outline=end;"}switch(a.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;"; -break;case 12:v.style+="symbol=terminate;"}break;case "BPMNConversation":v.style+="shape=hexagon;"+q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);v.style=0==a.bpmnConversationType?v.style+l(a):v.style+"strokeWidth=2;";a.bpmnIsSubConversation&&(e=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),e.geometry.offset=new mxPoint(-6,-17),e.style+=q(a,c)+g(a,c),e.geometry.relative=!0,e.vertex=!0,v.insert(e));break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;"+ -q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+m(a);switch(a.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}break; -case "BPMNData":v.style+="shape=note;size=14;"+q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+m(a);switch(a.bpmnDataType){case 1:e=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");e.geometry.offset=new mxPoint(-6,-15);e.style+=q(a,c)+g(a,c);e.geometry.relative=!0;e.vertex=!0;v.insert(e);break;case 2:e=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");e.geometry.offset=new mxPoint(3,3);e.style+=q(a,c)+g(a,c);e.geometry.relative=!0;e.vertex=!0; -v.insert(e);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";F=new mxCell("",new mxGeometry(0,0,f,20),"strokeColor=none;fillColor=none;");F.geometry.offset=new mxPoint(0,14);F.geometry.relative=!0;F.vertex=!0;v.insert(F);F.value=k(a.Text);F.style+=m(a);break;case 3:e=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),e.geometry.offset=new mxPoint(3,3),e.style+=g(a,c),e.geometry.relative=!0,e.vertex=!0,v.insert(e),w=g(a,c),w=w.replace("strokeColor", -"fillColor"),""==w&&(w="fillColor=#000000;"),e.style+=w,F=new mxCell("",new mxGeometry(0,0,f,20),"strokeColor=none;fillColor=none;"),F.geometry.offset=new mxPoint(0,14),F.geometry.relative=!0,F.vertex=!0,v.insert(F),F.value=k(a.Text),F.style+=m(a)}break;case "BPMNBlackPool":v.style+=q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,f,d),"fillColor=#000000;strokeColor=none;opacity=30;");e.vertex=!0;v.insert(e);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;"; -e=new mxCell("",new mxGeometry(0,0,.95*f,.95*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a);h=new mxCell("",new mxGeometry(.05*f,.05*d,.95*f,.95*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Text);h.value=k(a.Text);break;case "GSDFDDataStoreBlock":v.style+="shape=partialRectangle;right=0;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Text);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,.2*f,d),"part=1;");e.vertex=!0;v.insert(e);e.style+= -g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Number);e.value=k(a.Number);break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==n.Class?v.value=k(a.Text):"VSMProductionControlBlock"==n.Class&&(v.value=k(a.Resources));v.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+va(a)+wa(a)+Za(a);"VSMDedicatedProcessBlock"==n.Class&&(e=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"), -e.geometry.relative=!0,e.geometry.offset=new mxPoint(4,-13),e.vertex=!0,v.insert(e),e.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a));F=new mxCell("",new mxGeometry(0,0,f,15),"strokeColor=none;fillColor=none;part=1;");F.vertex=!0;v.insert(F);F.value=k(a.Title);F.style+=m(a.Title);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=k(a.Text);v.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+va(a)+ -Va(a)+wa(a);F=new mxCell("",new mxGeometry(.1*f,.3*d,.8*f,.6*d),"part=1;");F.vertex=!0;v.insert(F);F.value=k(a.Resource);F.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Resource);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+va(a)+wa(a);v.value=k(a.Text);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";var fa= -d,Fa=parseInt(a.Cells),A=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+"part=1;";0<Fa&&(fa/=Fa);x=[];T=[];for(b=1;b<=Fa;b++)x[b]=new mxCell("",new mxGeometry(0,(b-1)*fa,f,fa),A),x[b].vertex=!0,v.insert(x[b]),x[b].value=k(a["cell_"+b]),x[b].style+=m(a["cell_"+b]);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+Va(a)+va(a)+wa(a);v.value=k(a.Text);break;case "VSMSupermarketBlock":v.style+= -"strokeColor=none;"+q(a,c);fa=d;Fa=parseInt(a.Cells);A=g(a,c)+p(a,c)+l(a)+"part=1;fillColor=none;";0<Fa&&(fa/=Fa);x=[];ya=[];for(b=1;b<=Fa;b++)x[b]=new mxCell("",new mxGeometry(.5*f,(b-1)*fa,.5*f,fa),"shape=partialRectangle;left=0;"+A),x[b].vertex=!0,v.insert(x[b]),ya[b]=new mxCell("",new mxGeometry(0,(b-1)*fa,f,fa),"strokeColor=none;fillColor=none;part=1;"),ya[b].vertex=!0,v.insert(ya[b]),ya[b].value=k(a["cell_"+b]),ya[b].style+=m(a["cell_"+b]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18"; -v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.17*f,.2*d,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+p(a,c)+l(a);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";A="shape=card;size=18;flipH=1;part=1;"+g(a,c)+q(a,c)+p(a,c)+l(a);e=new mxCell("", -new mxGeometry(.1*f,0,.9*f,.8*d),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;");e.vertex=!0;v.insert(e);e.style+=A;h=new mxCell("",new mxGeometry(.05*f,.1*d,.9*f,.8*d),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;");h.vertex=!0;v.insert(h);h.style+=A;var u=new mxCell("",new mxGeometry(0,.2*d,.9*f,.8*d),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;");u.vertex=!0;v.insert(u);u.style+=A+ -m(a);u.value=k(a.Text);break;case "AWSRoundedRectangleContainerBlock2":v.style+="strokeColor=none;fillColor=none;";a.Spotfleet?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"), -h.geometry.relative=!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.Beanstalk?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"), -h.geometry.relative=!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.EC2?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),h.geometry.relative= -!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.Subnet?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),h.geometry.relative= -!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.VPC?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),h.geometry.relative= -!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.AWS?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),h.geometry.relative=!0,h.geometry.offset= -new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.Corporate?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),h.geometry.relative=!0,h.geometry.offset= -new mxPoint(30,0),h.vertex=!0,v.insert(h)):(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"+g(a,c)+m(a.Title)+t(a)+l(a),v.value=k(a.Title));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+m(a.Title)+q(a,c)+p(a,c)+r(a);v.value=k(a.Title);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+ -m(a.Title)+q(a,c)+p(a,c)+r(a);v.value=k(a.Title);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+m(a.Title)+q(a,c)+p(a,c)+r(a);v.value=k(a.Title);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";var K=new mxCell("",new mxGeometry(.25*f,.25*d,.5*f,.5*d),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");K.vertex=!0;v.insert(K);var O=[K];K.style+=q(a, -c);var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");G.geometry.relative=!0;G.edge=!0;Ta(.5*f,0,G,D,z,O,v,K);Ta(.855*f,.145*d,G,D,z,O,v,K);Ta(f,.5*d,G,D,z,O,v,K);Ta(.855*f,.855*d,G,D,z,O,v,K);Ta(.5*f,d,G,D,z,O,v,K);Ta(.145*f,.855*d,G,D,z,O,v,K);Ta(0,.5*d,G,D,z,O,v,K);Ta(.145*f,.145*d,G,D,z,O,v,K);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";K=new mxCell("",new mxGeometry(0,.5*d-10,f,20), -"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");K.vertex=!0;v.insert(K);O=[K];G=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");G.geometry.relative=!0;G.edge=!0;for(var O=[K],Pb=f/a.NumTopNodes,b=0;b<a.NumTopNodes;b++)Ta(.5*Pb+b*Pb,0,G,D,z,O,v,K);Pb=f/a.NumBottomNodes;for(b=0;b<a.NumBottomNodes;b++)Ta(.5* -Pb+b*Pb,d,G,D,z,O,v,K);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a);v.value=k(a.Title);a.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);"EIMessageChannelBlock"== -n.Class?(e=new mxCell("",new mxGeometry(.5,.5,.9*f,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),e.geometry.offset=new mxPoint(.45*-f,0)):"EIDatatypeChannelBlock"==n.Class?(e=new mxCell("",new mxGeometry(.5,.5,.9*f,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),e.geometry.offset=new mxPoint(.45*-f,0)):"EIInvalidMessageChannelBlock"==n.Class?(e=new mxCell("",new mxGeometry(.5,.5,.9*f,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),e.geometry.offset= -new mxPoint(.45*-f,0)):"EIDeadLetterChannelBlock"==n.Class?(e=new mxCell("",new mxGeometry(.5,.5,.9*f,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),e.geometry.offset=new mxPoint(.45*-f,0)):"EIGuaranteedDeliveryBlock"==n.Class&&(e=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),e.geometry.offset=new mxPoint(-10,-7));e.geometry.relative=!0;e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a);G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); -G.geometry.relative=!0;G.edge=!0;W(.15*f,.25*d,.85*f,.25*d,G,D,z,O,v,K);break;case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,.07*d,.21*f,.86*d),"fillColor=#FFFF33;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a)+t(a);h=new mxCell("",new mxGeometry(.26*f,.09*d,.2*f,.82*d),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");h.vertex=!0;v.insert(h); -h.style+=g(a,c)+p(a,c)+l(a)+t(a);u=new mxCell("",new mxGeometry(1,.5,.35*f,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");u.geometry.relative=!0;u.geometry.offset=new mxPoint(.4*-f,-10);u.vertex=!0;v.insert(u);u.style+=g(a,c)+p(a,c)+l(a)+t(a);C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");C.geometry.relative=!0;C.edge=!0;e.insertEdge(C,!0);h.insertEdge(C, -!1);C.style+=g(a,c);D.push(z.addCell(C,null,null,null,null));B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");B.geometry.relative=!0;B.edge=!0;h.insertEdge(B,!0);u.insertEdge(B,!1);D.push(z.addCell(B,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+= -"strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);for(var Qb=a.Messages,ic=(d-17)/Qb,h=[],G=[],b=0;b<Qb;b++){var Rb=ic*(b+1)-3;h[b]=new mxCell("",new mxGeometry(f-20,Rb,20,20),"part=1;");h[b].vertex=!0;v.insert(h[b]);h[b].style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a);switch(n.Class){case "EIMessageBlock":h[b].value=k(a["message_"+ -(b+1)]);h.style+=m(a["message_"+(b+1)]);break;case "EICommandMessageBlock":h[b].value="C";h[b].style+="fontStyle=1;fontSize=10;";break;case "EIDocumentMessageBlock":h[b].value="D";h[b].style+="fontStyle=1;fontSize=10;";break;case "EIEventMessageBlock":h[b].value="E",h[b].style+="fontStyle=1;fontSize=10;"}G[b]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");G[b].geometry.relative=!0;G[b].edge=!0;e.insertEdge(G[b],!1); -h[b].insertEdge(G[b],!0);G[b].style+=g(a,c)+l(a);var bb=[];bb.push(new mxPoint(Aa+8.5,Ba+Rb+10));G[b].geometry.points=bb;D.push(z.addCell(G[b],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.45*f,.25*d,.3*f,.5*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a);G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); -G.geometry.relative=!0;G.edge=!0;W(0,.5*d,.4*f,.5*d,G,D,z,O,v,K);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");C.geometry.relative=!0;C.edge=!0;W(.05*f,.5*d,.85*f,.5*d,C,D,z,O,v,K);var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); -B.geometry.relative=!0;B.edge=!0;W(.05*f,.5*d,.85*f,.15*d,B,D,z,O,v,K);var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");L.geometry.relative=!0;L.edge=!0;W(.05*f,.5*d,.85*f,.85*d,L,D,z,O,v,K);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); -C.geometry.relative=!0;C.edge=!0;C.style+=g(a,c);W(.05*f,.5*d,.95*f,.5*d,C,D,z,O,v,K);B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");B.geometry.relative=!0;B.edge=!0;B.style+=g(a,c);W(.3*f,.1*d,.3*f,.5*d,B,D,z,O,v,K);L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); -L.geometry.relative=!0;L.edge=!0;L.style+=g(a,c);W(.7*f,.1*d,.7*f,.5*d,L,D,z,O,v,K);var X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");X.geometry.relative=!0;X.edge=!0;X.style+=g(a,c);W(.5*f,.5*d,.5*f,.9*d,X,D,z,O,v,K);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text); -e=new mxCell("",new mxGeometry(.2*f,.21*d,.16*f,.24*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a);C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");C.geometry.relative=!0;C.edge=!0;W(.45*f,.33*d,.8*f,.33*d,C,D,z,O,v,K);h=new mxCell("",new mxGeometry(.64*f,.55*d,.16*f,.24*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+p(a,c)+l(a);B=new mxCell("",new mxGeometry(0,0,0,0), -"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");B.geometry.relative=!0;B.edge=!0;W(.55*f,.67*d,.2*f,.67*d,B,D,z,O,v,K);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.1*f,.15*d,.8*f,.7*d),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a);break; -case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.04*f,.06*d,.18*f,.28*d),"shape=ellipse;fillColor=#808080;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);h=new mxCell("",new mxGeometry(.2*f,.56*d,.2*f,.32*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+p(a,c)+l(a)+t(a);h.value="A";h.style+="fontStyle=1;fontSize=10;";C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;"); -C.geometry.relative=!0;C.edge=!0;e.insertEdge(C,!1);h.insertEdge(C,!0);C.style+=g(a,c)+l(a);bb=[];bb.push(new mxPoint(Aa+.13*f,Ba+.72*d));C.geometry.points=bb;D.push(z.addCell(C,null,null,null,null));u=new mxCell("",new mxGeometry(.6*f,.06*d,.18*f,.28*d),"shape=ellipse;fillColor=#808080;part=1;");u.vertex=!0;v.insert(u);u.style+=g(a,c)+l(a);E=new mxCell("",new mxGeometry(.76*f,.56*d,.2*f,.32*d),"part=1;");E.vertex=!0;v.insert(E);E.style+=g(a,c)+p(a,c)+l(a)+t(a);E.value="B";E.style+="fontStyle=1;fontSize=10;"; -B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");B.geometry.relative=!0;B.edge=!0;u.insertEdge(B,!1);E.insertEdge(B,!0);B.style+=g(a,c)+l(a);var Vb=[];Vb.push(new mxPoint(Aa+.69*f,Ba+.72*d));B.geometry.points=Vb;D.push(z.addCell(B,null,null,null,null));L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");L.geometry.relative=!0;L.edge=!0;e.insertEdge(L, -!1);u.insertEdge(L,!0);L.style+=g(a,c)+l(a);D.push(z.addCell(L,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("1",new mxGeometry(.2*f,.4*d,.1*f,.19*d),"fontStyle=1;fontSize=10;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);h=new mxCell("2",new mxGeometry(.45*f,.4*d,.1*f,.19*d),"fontStyle=1;fontSize=10;part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+ -l(a);u=new mxCell("3",new mxGeometry(.7*f,.4*d,.1*f,.19*d),"fontStyle=1;fontSize=10;part=1;");u.vertex=!0;v.insert(u);u.style+=g(a,c)+l(a);C=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");e.insertEdge(C,!1);h.insertEdge(C,!0);C.geometry.points=[new mxPoint(Aa+.375*f,Ba+.15*d)];C.geometry.relative=!0;C.edge=!0;C.style+=g(a,c)+l(a);D.push(z.addCell(C,null,null,null,null));B=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;"); -h.insertEdge(B,!1);u.insertEdge(B,!0);B.geometry.points=[new mxPoint(Aa+.675*f,Ba+.15*d)];B.geometry.relative=!0;B.edge=!0;B.style+=g(a,c)+l(a);D.push(z.addCell(B,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.3*f,.2*d,.4*f,.6*d),"shape=mxgraph.ios7.icons.clock;flipH=1;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);break;case "EIMessageBrokerBlock":v.style+= -"strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+N(a)+I(a)+M(a)+ha(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.38*f,.42*d,.24*f,.16*d),"part=1;fillColor=#aefe7d;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);h=new mxCell("",new mxGeometry(.38*f,0,.24*f,.16*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=q(a,c)+g(a,c)+l(a);u=new mxCell("",new mxGeometry(.76*f,.23*d,.24*f,.16*d),"part=1;");u.vertex=!0;v.insert(u);u.style=h.style;var E=new mxCell("",new mxGeometry(.76* -f,.61*d,.24*f,.16*d),"part=1;");E.vertex=!0;v.insert(E);E.style=h.style;var Yb=new mxCell("",new mxGeometry(.38*f,.84*d,.24*f,.16*d),"part=1;");Yb.vertex=!0;v.insert(Yb);Yb.style=h.style;var Zb=new mxCell("",new mxGeometry(0,.61*d,.24*f,.16*d),"part=1;");Zb.vertex=!0;v.insert(Zb);Zb.style=h.style;var $b=new mxCell("",new mxGeometry(0,.23*d,.24*f,.16*d),"part=1;");$b.vertex=!0;v.insert($b);$b.style=h.style;C=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(C,!1);h.insertEdge(C, -!0);C.edge=!0;C.style+=g(a,c)+l(a);D.push(z.addCell(C,null,null,null,null));B=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(B,!1);u.insertEdge(B,!0);B.edge=!0;B.style+=g(a,c)+l(a);D.push(z.addCell(B,null,null,null,null));L=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(L,!1);E.insertEdge(L,!0);L.edge=!0;L.style+=g(a,c)+l(a);D.push(z.addCell(L,null,null,null,null));X=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(X, -!1);Yb.insertEdge(X,!0);X.edge=!0;X.style+=g(a,c)+l(a);D.push(z.addCell(X,null,null,null,null));var tb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(tb,!1);Zb.insertEdge(tb,!0);tb.edge=!0;tb.style+=g(a,c)+l(a);D.push(z.addCell(tb,null,null,null,null));var ub=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(ub,!1);$b.insertEdge(ub,!0);ub.edge=!0;ub.style+=g(a,c)+l(a);D.push(z.addCell(ub,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+= -"verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");C.geometry.relative=!0;C.edge=!0;W(.05*f,.5*d,.6*f,.25*d,C,D,z,O,v,K);B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");B.geometry.relative=!0;B.edge=!0;W(.05*f,.5*d,.6*f,.75*d,B,D,z,O,v,K);e=new mxCell("",new mxGeometry(.7* -f,.1*d,.15*f,.32*d),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.25*f,.25*d,.5*f,.5*d),"shape=mxgraph.eip.control_bus;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+ -m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);u=new mxCell("",new mxGeometry(f-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");u.vertex=!0;v.insert(u);u.style+=g(a,c)+l(a);L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");L.geometry.relative=!0;L.edge=!0;e.insertEdge(L,!1);u.insertEdge(L, -!0);L.style+=g(a,c)+l(a);L.geometry.points=[new mxPoint(Aa+8.5,Ba+40)];D.push(z.addCell(L,null,null,null,null));E=new mxCell("",new mxGeometry(f-45,d-20,20,20),"part=1;");E.vertex=!0;v.insert(E);E.value=k(a.message_0);E.style+=m(a.message_0);E.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a);X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");X.geometry.relative=!0;X.edge=!0;e.insertEdge(X,!1);E.insertEdge(X,!0);X.style+=g(a, -c)+l(a);X.geometry.points=[new mxPoint(Aa+8.5,Ba+d-10)];D.push(z.addCell(X,null,null,null,null));Qb=a.HistoryMessages;ic=(d-75)/Qb;h=[];G=[];for(b=0;b<Qb;b++)Rb=ic*(b+1)+30,h[b]=new mxCell("",new mxGeometry(f-20,Rb,20,20),"part=1;"),h[b].vertex=!0,h[b].value=k(a["message_"+(b+1)]),h.style+=m(a["message_"+(b+1)]),v.insert(h[b]),h[b].style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a),G[b]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"), -G[b].geometry.relative=!0,G[b].edge=!0,u.insertEdge(G[b],!1),h[b].insertEdge(G[b],!0),G[b].style+=g(a,c)+l(a),bb=[],bb.push(new mxPoint(Aa+f-30,Ba+Rb+10)),G[b].geometry.points=bb,D.push(z.addCell(G[b],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;"+g(a,c)+p(a,c)+r(a)+l(a)+V(a,c,v);t(a);0>a.DoorAngle&&(v.style+="flipV=1;");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;"+g(a,c)+p(a,c)+r(a)+l(a)+V(a,c,v)+t(a);0<a.DoorAngle&&(v.style+="flipV=1;"); -break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;"+V(a,c,v);e=new mxCell("",new mxGeometry(0,0,f,.25*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a);for(var h=[],rc=.02*f,jc=(f-2*rc)/a.LightCount,sc=.8*jc,b=0;b<a.LightCount;b++)h[b]=new mxCell("",new mxGeometry(rc+jc*b+(jc-sc)/2,.25*d,sc,.75*d),"part=1;shape=ellipse;"),h[b].vertex=!0,v.insert(h[b]),h[b].style+=g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;"+ -V(a,c,v);for(var e=[],tc=f/a.SinkCount,b=0;b<a.SinkCount;b++)e[b]=new mxCell("",new mxGeometry(tc*b,0,tc,d),"part=1;shape=mxgraph.floorplan.sink_2;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var ka=.1*f/a.StallCount,e=new mxCell("",new mxGeometry(0,0,ka,d),"fillColor=#000000;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);for(var sa=(f-ka)/a.StallCount,kc=[],Sb=[],Tb=[],Ub=[],w=g(a, -c),w=""==w?"#000000;":w.replace("stokreColor=",""),cc="part=1;fillColor="+w+g(a,c)+l(a),lc=q(a,c)+g(a,c)+l(a),b=0;b<a.StallCount;b++)kc[b]=new mxCell("",new mxGeometry((b+1)*sa,0,ka,d),cc),kc[b].vertex=!0,v.insert(kc[b]),Tb[b]=new mxCell("",new mxGeometry(ka+b*sa+.05*(sa-ka),d-.92*(sa-ka),.9*(sa-ka),.92*(sa-ka)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Tb[b].vertex=!0,v.insert(Tb[b]),Tb[b].style+=lc,Sb[b]=new mxCell("",new mxGeometry(ka+b*sa+.2*(sa-ka),0,.6*(sa-ka),.8*(sa-ka)),"shape=mxgraph.floorplan.toilet;part=1;"), -Sb[b].vertex=!0,v.insert(Sb[b]),Sb[b].style+=lc,Ub[b]=new mxCell("",new mxGeometry(ka+b*sa,.42*d,.15*(sa-ka),.12*(sa-ka)),"part=1;"),Ub[b].vertex=!0,v.insert(Ub[b]),Ub[b].style+=lc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ac="edgeStyle=none;endArrow=none;part=1;"+g(a,c)+l(a)+p(a,c)+r(a)+t(a),w=g(a,c),w=""==w?"#000000;":w.replace("stokreColor=",""),mc="shape=triangle;part=1;fillColor="+w+g(a,c)+l(a)+p(a,c)+r(a)+t(a),C=new mxCell("",new mxGeometry(0,0,0,0),ac);C.geometry.relative= -!0;C.edge=!0;W(0,.5*d,.65*f,.5*d,C,D,z,O,v,K);for(var y=d/a.numLines,B=[],fb=[],b=0;b<a.numLines;b++)B[b]=new mxCell("",new mxGeometry(0,0,0,0),ac),B[b].geometry.relative=!0,B[b].edge=!0,W(.65*f,.5*d,.96*f,(b+.5)*y,B[b],D,z,O,v,K),fb[b]=new mxCell("",new mxGeometry(.95*f,(b+.2)*y,.05*f,.6*y),mc),fb[b].vertex=!0,v.insert(fb[b]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";ac="edgeStyle=none;endArrow=none;part=1;"+g(a,c)+l(a)+p(a,c)+r(a)+t(a);w=g(a,c);w=""==w?"#000000;":w.replace("stokreColor=", -"");mc="shape=triangle;part=1;fillColor="+w+g(a,c)+l(a)+p(a,c)+r(a)+t(a);y=d/a.numLines;B=[];fb=[];for(b=0;b<a.numLines;b++)B[b]=new mxCell("",new mxGeometry(0,0,0,0),ac),B[b].geometry.relative=!0,B[b].edge=!0,W(0,(b+.5)*y,.96*f,(b+.5)*y,B[b],D,z,O,v,K),fb[b]=new mxCell("",new mxGeometry(.95*f,(b+.2)*y,.05*f,.6*y),mc),fb[b].vertex=!0,v.insert(fb[b]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);switch(a.vesselType){case 1:v.style+= -"shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;size=0.10;direction=south;"}break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);1==a.peakedRoof&&0==a.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==a.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ -g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);v.style=0==a.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;"+V(a,c,v)+m(a);v.value=k(a.Text);A=g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a);e=new mxCell("",new mxGeometry(0,.2*d,f,.6*d),"part=1;shape=trapezoid;direction=south;");e.vertex=!0;v.insert(e);e.style+=A;A+="endSize=4;endArrow=block;endFill=1;";0== -a.compressorType?(C=new mxCell("",new mxGeometry(0,0,0,0),""),C.geometry.relative=!0,C.edge=!0,C.style+=A,W(0,0,0,.2*d,C,D,z,O,v,K),B=new mxCell("",new mxGeometry(0,0,0,0),""),B.geometry.relative=!0,B.edge=!0,B.style+=A,W(f,.67*d,f,d,B,D,z,O,v,K)):(e.style+="flipH=1;",C=new mxCell("",new mxGeometry(0,0,0,0),""),C.geometry.relative=!0,C.edge=!0,C.style+=A,W(0,0,0,.33*d,C,D,z,O,v,K),B=new mxCell("",new mxGeometry(0,0,0,0),""),B.geometry.relative=!0,B.edge=!0,B.style+=A,W(f,.8*d,f,d,B,D,z,O,v,K));1== -a.centerLineType&&(L=new mxCell("",new mxGeometry(0,0,0,0),""),L.geometry.relative=!0,L.edge=!0,L.style+=A,W(.2*f,.5*d,.8*f,.5*d,L,D,z,O,v,K));break;case "PEMotorDrivenTurbineBlock":A=g(a,c)+q(a,c)+l(a)+p(a,c)+t(a);v.style+="shape=ellipse;"+r(a)+V(a,c,v)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.2*f,.2*d,.6*f,.6*d),"part=1;shape=trapezoid;direction=south;");e.vertex=!0;v.insert(e);e.style+=A;break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":A= -p(a,c);v.style+=A+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);switch(n.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+= -"shape=mxgraph.pid2inst.progLogCont;"}"PEIndicator2Block"==n.Class||"PESharedIndicator2Block"==n.Class?(e=new mxCell("",new mxGeometry(0,0,f,.5*f),"part=1;strokeColor=none;fillColor=none;"),e.vertex=!0,v.insert(e),e.style+=A+m(a.TopText),e.value=k(a.TopText),h=new mxCell("",new mxGeometry(0,.5*f,f,.5*f),"part=1;strokeColor=none;fillColor=none;")):(e=new mxCell("",new mxGeometry(0,0,f,.5*d),"part=1;strokeColor=none;fillColor=none;"),e.vertex=!0,v.insert(e),e.style+=A+m(a.TopText),e.value=k(a.TopText), -h=new mxCell("",new mxGeometry(0,.5*d,f,.5*d),"part=1;strokeColor=none;fillColor=none;"));h.vertex=!0;v.insert(h);h.style+=A;m(a.BotText);h.value=k(a.BotText);switch(a.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var nc=!1;"PEPoweredValveBlock"== -n.Class?1!=a.poweredHandOperated&&(nc=!0):1!=a.handOperated&&(nc=!0);if(nc){var a=cb(n).Properties,ma=a.BoundingBox,ec=ma.h;ma.h="PEAngleValveBlock"==n.Class||"PEAngleGlobeValveBlock"==n.Class?.7*ma.h:.6*ma.h;v=new mxCell("",new mxGeometry(Math.round(.6*ma.x+0),Math.round(.6*(ma.y+ec-ma.h)+0),Math.round(.6*ma.w),Math.round(.6*ma.h)),"");v.vertex=!0;gc(v,n)}if("PEPoweredValveBlock"==n.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;"+p(a,c)+g(a,c)+q(a, -c)+l(a)+t(a)+r(a)+V(a,c,v),1==a.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",e=new mxCell("",new mxGeometry(.325*f,0,.35*f,.35*d),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),e.vertex=!0,v.insert(e),e.style+=A+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+"fontSize=6;"+I(a.PoweredText)+M(a.PoweredText)+ha(a.PoweredText)+ta(a.PoweredText)+ua(a.PoweredText)+va(a.PoweredText)+wa(a.PoweredText)+Za(a.PoweredText),e.value=k(a.PoweredText)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;"+ -p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v)+N(a)+I(a)+M(a)+ha(a);v.value=k(a.Text);switch(n.Class){case "PEGateValveBlock":v.style+="valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==a.handOperated&&(v.style+="actuator=man;")}break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;"+p(a,c)+g(a,c)+ -q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);1==a.vScroll&&(u=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,110),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;");1==a.hScroll&&(E=1==a.vScroll?new mxCell("",new mxGeometry(0, -1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(0,-20),E.vertex=!0,v.insert(E));break;case "UI2WindowBlock":v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v)+N(a.Title)+I(a.Title)+M(a.Title);v.value= -k(a.Title);1==a.vScroll&&(u=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,30),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;");1==a.hScroll&&(E=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"): -new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(0,-20),E.vertex=!0,v.insert(E));break;case "UI2DialogBlock":v.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v)+m(a.Text);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,f,30),"part=1;resizeHeight=0;");e.vertex=!0;v.insert(e);e.style+=A+m(a.Title);e.value=k(a.Title);h=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;"); -h.geometry.relative=!0;h.geometry.offset=new mxPoint(-25,-10);h.vertex=!0;e.insert(h);1==a.vScroll&&(u=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,30),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;"); -1==a.hScroll&&(E=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(0,-20),E.vertex=!0,v.insert(E));break;case "UI2AccordionBlock":v.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);e=[];y=25;for(b=0;b<=a.Panels-1;b++)e[b]=b<a.Selected-1?new mxCell("", -new mxGeometry(0,b*y,f,y),"part=1;fillColor=#000000;fillOpacity=25;"):b==a.Selected-1?new mxCell("",new mxGeometry(0,b*y,f,y),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,d-(a.Panels-a.Selected)*y+(b-a.Selected)*y,f,y),"part=1;fillColor=#000000;fillOpacity=25;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=m(a["Panel_"+(b+1)]),e[b].value=k(a["Panel_"+(b+1)]),e[b].style.includes(";align=")||(e[b].style+="align=left;spacingLeft=5;");var R=g(a,c),R=R.replace("strokeColor","fillColor2");""== -R&&(R="fillColor2=#000000;");1==a.vScroll&&(h=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-a.Selected*y-20-(a.Panels-a.Selected)*y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-a.Selected*y-(a.Panels-a.Selected)*y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),h.geometry.relative=!0,h.geometry.offset=new mxPoint(-20,a.Selected*y),h.vertex=!0,v.insert(h),v.style+= -"spacingRight=20;",h.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));1==a.hScroll&&(u=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(0,-20-(a.Panels-a.Selected)*y),u.vertex=!0,v.insert(u),u.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));E=1==a.vScroll?new mxCell("", -new mxGeometry(0,a.Selected*y,f-20,d-a.Selected*y-20-(a.Panels-a.Selected)*y),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,a.Selected*y,f-20,d-a.Selected*y-(a.Panels-a.Selected)*y),"part=1;fillColor=none;strokeColor=none;");E.vertex=!0;v.insert(E);E.style+=m(a.Content_1);E.style.includes(";align=")||(E.style+="align=left;spacingLeft=5;");E.value=k(a.Content_1);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var e=[],h=[],y=25,pa=3,H=(f+ -pa)/(a.Tabs+1),qa=new mxCell("",new mxGeometry(0,y,f,d-y),"part=1;");qa.vertex=!0;v.insert(qa);qa.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);for(b=0;b<=a.Tabs-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(10+b*H,0,H-pa,y),""),h[b].vertex=!0,v.insert(h[b]),h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Tab_"+(b+1)])):(e[b]=new mxCell("",new mxGeometry(10+b*H,0,H-pa,y),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a),h[b]=new mxCell("",new mxGeometry(0, -0,H-pa,y),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Tab_"+(b+1)])),h[b].value=k(a["Tab_"+(b+1)]),h[b].style.includes(";align=")||(h[b].style+="align=left;spacingLeft=2;");R=g(a,c);R=R.replace("strokeColor","fillColor2");""==R&&(R="fillColor2=#000000;");1==a.vScroll&&(h=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-20-y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1, -0,20,d-y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),h.geometry.relative=!0,h.geometry.offset=new mxPoint(-20,y),h.vertex=!0,v.insert(h),v.style+="spacingRight=20;",h.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));1==a.hScroll&&(u=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), -u.geometry.relative=!0,u.geometry.offset=new mxPoint(0,-20),u.vertex=!0,v.insert(u),u.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";e=[];h=[];y=25;pa=3;H=(f+pa)/a.Tabs;qa=new mxCell("",new mxGeometry(0,y,f,d-y),"part=1;");qa.vertex=!0;v.insert(qa);qa.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);for(b=0;b<=a.Tabs-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(b*H,0,H-pa,y),""),h[b].vertex=!0,v.insert(h[b]), -h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Tab_"+(b+1)])):(e[b]=new mxCell("",new mxGeometry(b*H,0,H-pa,y),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a),h[b]=new mxCell("",new mxGeometry(0,0,H-pa,y),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Tab_"+(b+1)])),h[b].value=k(a["Tab_"+(b+1)]),h[b].style.includes(";align=")||(h[b].style+="align=left;spacingLeft=2;");R=g(a,c);R=R.replace("strokeColor", -"fillColor2");""==R&&(R="fillColor2=#000000;");1==a.vScroll&&(h=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-20-y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),h.geometry.relative=!0,h.geometry.offset=new mxPoint(-20,y),h.vertex=!0,v.insert(h),v.style+="spacingRight=20;",h.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)); -1==a.hScroll&&(u=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(0,-20),u.vertex=!0,v.insert(u),u.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";e=[];h=[];pa=3;y=25+pa;H=80;Wa= -10;qa=new mxCell("",new mxGeometry(H,0,f-H,d),"part=1;");qa.vertex=!0;v.insert(qa);qa.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);for(b=0;b<=a.Tabs-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(0,Wa+b*y,H,y-pa),""),h[b].vertex=!0,v.insert(h[b]),h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Tab_"+(b+1)])):(e[b]=new mxCell("",new mxGeometry(0,Wa+b*y,H,y-pa),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a),h[b]=new mxCell("",new mxGeometry(0, -0,H,y-pa),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Tab_"+(b+1)])),h[b].value=k(a["Tab_"+(b+1)]),h[b].style.includes(";align=")||(h[b].style+="align=left;spacingLeft=2;");R=g(a,c);R=R.replace("strokeColor","fillColor2");""==R&&(R="fillColor2=#000000;");1==a.vScroll&&(h=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1, -0,20,d),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),h.geometry.relative=!0,h.geometry.offset=new mxPoint(-20,0),h.vertex=!0,v.insert(h),v.style+="spacingRight=20;",h.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));1==a.hScroll&&(u=1==a.vScroll?new mxCell("",new mxGeometry(H,1,f-20-H,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(H,1,f-H,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), -u.geometry.relative=!0,u.geometry.offset=new mxPoint(0,-20),u.vertex=!0,v.insert(u),u.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";y=d/a.Options;e=[];h=[];for(b=0;b<a.Options;b++)e[b]=new mxCell("",new mxGeometry(0,b*y+.5*y-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Option_"+ -(b+1)]),null!=a.Selected[b+1]&&1==a.Selected[b+1]&&(w=g(a,c),w=w.replace("strokeColor","fillColor"),""==w&&(w="fillColor=#000000;"),h[b]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=w+p(a,c)+g(a,c)+l(a)+t(a)),e[b].value=k(a["Option_"+(b+1)]);break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";H=f/a.Options;e=[];h=[];for(b=0;b<a.Options;b++)e[b]=new mxCell("",new mxGeometry(b*H,.5* -d-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Option_"+(b+1)]),null!=a.Selected[b+1]&&1==a.Selected[b+1]&&(w=g(a,c),w=w.replace("strokeColor","fillColor"),""==w&&(w="fillColor=#000000;"),h[b]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=w+p(a,c)+g(a,c)+l(a)+t(a)), -e[b].value=k(a["Option_"+(b+1)]);break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";y=d/a.Options;e=[];h=[];for(b=0;b<a.Options;b++)e[b]=new mxCell("",new mxGeometry(0,b*y+.5*y-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Option_"+(b+1)]),null!=a.Selected&&a.Selected==b+1&&(w=g(a,c),w=w.replace("strokeColor","fillColor"), -""==w&&(w="fillColor=#000000;"),h[b]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=w+p(a,c)+g(a,c)+l(a)+t(a)),e[b].value=k(a["Option_"+(b+1)]);break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";H=f/a.Options;e=[];h=[];for(b=0;b<a.Options;b++)e[b]=new mxCell("",new mxGeometry(b*H,.5*d-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), -e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Option_"+(b+1)]),null!=a.Selected&&a.Selected==b+1&&(w=g(a,c),w=w.replace("strokeColor","fillColor"),""==w&&(w="fillColor=#000000;"),h[b]=new mxCell("",new mxGeometry(2,2,6,6),"shape=ellipse;part=1;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=w+p(a,c)+g(a,c)+l(a)+t(a)),e[b].value=k(a["Option_"+(b+1)]);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;"+ -p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a);"UI2VSliderBlock"==n.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*a.ScrollVal+";";break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";e=new mxCell("",new mxGeometry(0,0,.6*f,d),"part=1;");e.vertex=!0;v.insert(e);e.style+=p(a,c)+g(a,c)+l(a)+t(a)+r(a)+m(a.Date);e.value=k(a.Date);w=g(a,c);w=w.replace("strokeColor","fillColor");""==w&&(w="fillColor=#000000;");h=new mxCell("",new mxGeometry(.75*f,0,.25*f,d),"part=1;shape=mxgraph.gmdl.calendar;"); -h.vertex=!0;v.insert(h);h.style+=w+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a);break;case "UI2SearchBlock":v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+p(a,c)+g(a,c)+l(a)+t(a)+r(a)+N(a.Search)+I(a.Search)+M(a.Search);v.value=k(a.Search);break;case "UI2NumericStepperBlock":w=g(a,c);w=w.replace("strokeColor","fillColor");""==w&&(w="fillColor=#000000;");v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+ -w+p(a,c)+g(a,c)+l(a)+t(a)+r(a)+N(a.Number)+I(a.Number)+M(a.Number);v.value=k(a.Number);break;case "UI2ButtonBarBlock":v.style+=p(a,c)+g(a,c)+l(a)+t(a)+r(a);e=[];h=[];H=f/a.Buttons;for(b=0;b<=a.Buttons-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(b*H,0,H,d),""),h[b].vertex=!0,v.insert(h[b]),h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Button_"+(b+1)])):(e[b]=new mxCell("",new mxGeometry(b*H,0,H,d),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a), -h[b]=new mxCell("",new mxGeometry(0,0,H,d),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Button_"+(b+1)])),h[b].value=k(a["Button_"+(b+1)]);break;case "UI2VerticalButtonBarBlock":v.style+=p(a,c)+g(a,c)+l(a)+t(a)+r(a);e=[];h=[];y=d/a.Buttons;for(b=0;b<=a.Buttons-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(0,b*y,f,y),""),h[b].vertex=!0,v.insert(h[b]),h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Button_"+(b+1)])):(e[b]=new mxCell("", -new mxGeometry(0,b*y,f,y),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a),h[b]=new mxCell("",new mxGeometry(0,0,f,y),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Button_"+(b+1)])),h[b].value=k(a["Button_"+(b+1)]);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;"+p(a,c)+g(a,c)+l(a)+t(a)+r(a);e=[];h=[];H=f/a.Links;for(b=0;b<a.Links;b++)0!=b?(h[b]=new mxCell("",new mxGeometry(b*H,0,H,d), -"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),h[b].style+=p(a,c)+r(a)+g(a,c)+l(a)+t(a)):h[b]=new mxCell("",new mxGeometry(b*H,0,H,d),"fillColor=none;strokeColor=none;"),h[b].vertex=!0,v.insert(h[b]),h[b].style+=m(a["Link_"+(b+1)]),h[b].value=k(a["Link_"+(b+1)]);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;"+p(a,c)+g(a,c)+l(a)+t(a)+r(a);e=[];h=[];H=f/a.Links;for(b=0;b<a.Links;b++)e[b]=new mxCell("",new mxGeometry(b*H,0,H,d),"fillColor=none;strokeColor=none;"), -e[b].vertex=!0,v.insert(e[b]),e[b].style+=m(a["Link_"+(b+1)]),e[b].value=k(a["Link_"+(b+1)]);for(b=1;b<a.Links;b++)h[b]=new mxCell("",new mxGeometry(b/a.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),h[b].geometry.relative=!0,h[b].geometry.offset=new mxPoint(-3,-5),h[b].vertex=!0,v.insert(h[b]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;"+p(a,c)+q(a,c)+r(a);e=[];H=f/(a.Buttons+1);for(b=0;b<=a.Buttons-1;b++)e[b]=b!=a.Selected-1?new mxCell("",new mxGeometry(0,0,H,d),"strokeColor=none;fillColor=none;resizeHeight=1;"): -new mxCell("",new mxGeometry(0,0,H,d),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),e[b].geometry.relative=!0,e[b].geometry.offset=new mxPoint(b*H,0),e[b].vertex=!0,v.insert(e[b]),e[b].style+=m(a["MenuItem_"+(b+1)]),e[b].value=k(a["MenuItem_"+(b+1)]);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+m(a.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+m(a.Text_prev); -v.value=k(a.Text_prev)+" ";for(b=0;b<a.Links;b++)v.value+=k(a["Link_"+(b+1)])+" ";v.value+=k(a.Text_next);break;case "UI2ContextMenuBlock":v.style+=p(a,c)+q(a,c)+g(a,c)+l(a)+t(a)+r(a);for(var x=[],Ua=[],vb=[],y=d/a.Lines,A=null,b=0;b<a.Lines;b++)null!=a["Item_"+(b+1)]&&(null==A&&(A=""+N(a["Item_"+(b+1)])+I(a["Item_"+(b+1)])+M(a["Item_"+(b+1)])),x[b]=new mxCell("",new mxGeometry(0,b*d/a.Lines,f,y),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),x[b].vertex=!0,v.insert(x[b]),x[b].style+= -A,x[b].value=k(a["Item_"+(b+1)])),null!=a.Icons[b+1]&&null!=x[b]&&("dot"==a.Icons[b+1]?(Ua[b]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),Ua[b].geometry.offset=new mxPoint(6,-4)):"check"==a.Icons[b+1]&&(Ua[b]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),Ua[b].geometry.offset=new mxPoint(6.5,-4)),null!=Ua[b]&&(Ua[b].geometry.relative=!0,Ua[b].vertex=!0,x[b].insert(Ua[b]),w=g(a,c),w=w.replace("strokeColor","fillColor"), -""==w&&(w="fillColor=#000000;"),Ua[b].style+=w)),null!=a["Shortcut_"+(b+1)]&&(null==A&&(A=""+N(a["Shortcut_"+(b+1)])+I(a["Shortcut_"+(b+1)])+M(a["Shortcut_"+(b+1)])),vb[b]=new mxCell("",new mxGeometry(.6*f,b*d/a.Lines,.4*f,y),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),vb[b].vertex=!0,v.insert(vb[b]),vb[b].style+=A,vb[b].value=k(a["Shortcut_"+(b+1)])),null!=a.Dividers[b+1]&&(x[b]=new mxCell("",new mxGeometry(.05*f,b*d/a.Lines,.9*f,y),"shape=line;strokeWidth=0.25;"),x[b].vertex= -!0,v.insert(x[b]),x[b].style+=g(a,c));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*a.ScrollVal+";";break;case "UI2TooltipSquareBlock":v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+a.RoundCorners+";"+p(a,c)+q(a,c)+g(a,c)+l(a)+t(a)+r(a)+m(a.Tip);v.value=k(a.Tip);break;case "UI2CalloutBlock":v.style+="shape=ellipse;"+p(a,c)+q(a,c)+g(a,c)+l(a)+t(a)+r(a)+m(a.Txt);v.value=k(a.Txt); -break;case "UI2AlertBlock":v.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v)+m(a.Txt);v.value=k(a.Txt);e=new mxCell("",new mxGeometry(0,0,f,30),"part=1;resizeHeight=0;");e.vertex=!0;v.insert(e);e.style+=A+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+m(a.Title);e.value=k(a.Title);h=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");h.geometry.relative=!0;h.geometry.offset=new mxPoint(-25,-10);h.vertex=!0;e.insert(h);for(var fc=45*a.Buttons+ -(10*a.Buttons-1),u=[],b=0;b<a.Buttons;b++)u[b]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),u[b].geometry.relative=!0,u[b].geometry.offset=new mxPoint(.5*-fc+55*b,-40),u[b].vertex=!0,v.insert(u[b]),u[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+m(a["Button_"+(b+1)]),u[b].value=k(a["Button_"+(b+1)]);break;case "UMLClassBlock":if(0==a.Simple){var A=q(a,c),la=.6*a.TitleHeight,A=A.replace("fillColor","swimlaneFillColor");""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ -A+"startSize="+la+";"+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+m(a.Title);v.value=k(a.Title);for(var x=[],oc=[],ga=la/d,b=0;b<=a.Attributes;b++)0<b&&(oc[b]=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),oc[b].vertex=!0,v.insert(oc[b])),y=0,b<a.Attributes?(y=a["Text"+(b+1)+"Percent"],ga+=y):y=1-ga,x[b]=new mxCell("",new mxGeometry(0,0,f,(d- -la)*y),"part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),x[b].vertex=!0,v.insert(x[b]),x[b].style+=A+p(a,c)+N(a["Text"+(b+1)])+I(a["Text"+(b+1)])+M(a["Text"+(b+1)]),x[b].value=k(a["Text"+(b+1)])}else v.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+m(a.Title),v.value=k(a.Title);break;case "ERDEntityBlock":A=q(a,c);la=.6*a.Name_h;A=A.replace("fillColor","swimlaneFillColor"); -""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+A+"startSize="+la+";"+p(a,c)+g(a,c)+l(a)+t(a)+m(a.Name);v.style=a.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+q(a,c);v.value=k(a.Name);x=[];ga=la/d;for(b=0;b<a.Fields;b++)y=0,x[b]=new mxCell("",new mxGeometry(0,0,f,.6*a["Field"+(b+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -x[b].vertex=!0,v.insert(x[b]),x[b].style+=A+N(a["Field"+(b+1)])+I(a["Field"+(b+1)])+M(a["Field"+(b+1)]),x[b].style=1==a.AltRows&&0!=b%2?x[b].style+"fillColor=#000000;opacity=5;":x[b].style+("fillColor=none;"+p(a,c)),x[b].value=k(a["Field"+(b+1)]);break;case "ERDEntityBlock2":A=q(a,c);la=.6*a.Name_h;A=A.replace("fillColor","swimlaneFillColor");""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+A+"startSize="+la+";"+ -p(a,c)+g(a,c)+l(a)+t(a)+m(a.Name);v.style=a.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+q(a,c);v.value=k(a.Name);var x=[],Q=[],ga=la,ra=30;null!=a.Column1&&(ra=.6*a.Column1);for(b=0;b<a.Fields;b++)y=0,Q[b]=new mxCell("",new mxGeometry(0,ga,ra,.6*a["Key"+(b+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Q[b].vertex=!0,v.insert(Q[b]),Q[b].style+=A+N(a["Key"+ -(b+1)])+I(a["Key"+(b+1)])+M(a["Key"+(b+1)]),Q[b].style=1==a.AltRows&&0!=b%2?Q[b].style+"fillColor=#000000;fillOpacity=5;":Q[b].style+("fillColor=none;"+p(a,c)),Q[b].value=k(a["Key"+(b+1)]),x[b]=new mxCell("",new mxGeometry(ra,ga,f-ra,.6*a["Field"+(b+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),x[b].vertex=!0,v.insert(x[b]),x[b].style+= -A+g(a,c)+l(a)+t(a)+N(a["Field"+(b+1)])+I(a["Field"+(b+1)])+M(a["Field"+(b+1)]),x[b].style=1==a.AltRows&&0!=b%2?x[b].style+"fillColor=#000000;fillOpacity=5;":x[b].style+("fillColor=none;"+p(a,c)),x[b].value=k(a["Field"+(b+1)]),ga+=.6*a["Key"+(b+1)+"_h"];break;case "ERDEntityBlock3":A=q(a,c);la=.6*a.Name_h;A=A.replace("fillColor","swimlaneFillColor");""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+A+"startSize="+ -la+";"+p(a,c)+g(a,c)+l(a)+t(a)+m(a.Name);v.style=a.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+q(a,c);v.value=k(a.Name);x=[];Q=[];ga=la;ra=30;null!=a.Column1&&(ra=.6*a.Column1);for(b=0;b<a.Fields;b++)y=0,Q[b]=new mxCell("",new mxGeometry(0,ga,ra,.6*a["Field"+(b+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Q[b].vertex=!0,v.insert(Q[b]),Q[b].style+=A+N(a["Field"+ -(b+1)])+I(a["Field"+(b+1)])+M(a["Field"+(b+1)]),Q[b].style=1==a.AltRows&&0!=b%2?Q[b].style+"fillColor=#000000;fillOpacity=5;":Q[b].style+("fillColor=none;"+p(a,c)),Q[b].value=k(a["Field"+(b+1)]),x[b]=new mxCell("",new mxGeometry(ra,ga,f-ra,.6*a["Type"+(b+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),x[b].vertex=!0,v.insert(x[b]), -x[b].style+=A+g(a,c)+l(a)+t(a)+N(a["Type"+(b+1)])+I(a["Type"+(b+1)])+M(a["Type"+(b+1)]),x[b].style=1==a.AltRows&&0!=b%2?x[b].style+"fillColor=#000000;fillOpacity=5;":x[b].style+("fillColor=none;"+p(a,c)),x[b].value=k(a["Type"+(b+1)]),ga+=.6*a["Field"+(b+1)+"_h"];break;case "ERDEntityBlock4":A=q(a,c);la=.6*a.Name_h;A=A.replace("fillColor","swimlaneFillColor");""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+A+"startSize="+ -la+";"+p(a,c)+g(a,c)+l(a)+t(a)+m(a.Name);v.style=a.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+q(a,c);v.value=k(a.Name);var x=[],Q=[],Ya=[],ga=la,ra=30,bc=40;null!=a.Column1&&(ra=.6*a.Column1);null!=a.Column2&&(bc=.6*a.Column2);for(b=0;b<a.Fields;b++)y=0,Q[b]=new mxCell("",new mxGeometry(0,ga,ra,.6*a["Key"+(b+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -Q[b].vertex=!0,v.insert(Q[b]),Q[b].style+=A+N(a["Key"+(b+1)])+I(a["Key"+(b+1)])+M(a["Key"+(b+1)]),Q[b].style=1==a.AltRows&&0!=b%2?Q[b].style+"fillColor=#000000;fillOpacity=5;":Q[b].style+("fillColor=none;"+p(a,c)),Q[b].value=k(a["Key"+(b+1)]),x[b]=new mxCell("",new mxGeometry(ra,ga,f-ra-bc,.6*a["Field"+(b+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -x[b].vertex=!0,v.insert(x[b]),x[b].style+=A+g(a,c)+l(a)+t(a)+N(a["Field"+(b+1)])+I(a["Field"+(b+1)])+M(a["Field"+(b+1)]),x[b].style=1==a.AltRows&&0!=b%2?x[b].style+"fillColor=#000000;fillOpacity=5;":x[b].style+("fillColor=none;"+p(a,c)),x[b].value=k(a["Field"+(b+1)]),Ya[b]=new mxCell("",new mxGeometry(f-bc,ga,bc,.6*a["Type"+(b+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -Ya[b].vertex=!0,v.insert(Ya[b]),Ya[b].style+=A+g(a,c)+l(a)+t(a)+N(a["Type"+(b+1)])+I(a["Type"+(b+1)])+M(a["Type"+(b+1)]),Ya[b].style=1==a.AltRows&&0!=b%2?Ya[b].style+"fillColor=#000000;fillOpacity=5;":Ya[b].style+("fillColor=none;"+p(a,c)),Ya[b].value=k(a["Type"+(b+1)]),ga+=.6*a["Key"+(b+1)+"_h"]}return v}var ec=["GSDFDProcessBlock","GSDFDProcessBlock2","RoundedRectangleContainerBlock","UI2ButtonBlock","UMLStateBlock"],fc=["ProcessBlock","UMLActivationBlock"],cc="VennPlainColor1 VennPlainColor2 VennPlainColor3 VennPlainColor4 VennPlainColor5 VennPlainColor6 VennPlainColor7 VennPlainColor8 VennGradientColor1 VennGradientColor2 VennGradientColor3 VennGradientColor4 VennGradientColor5 VennGradientColor6 VennGradientColor7 VennGradientColor8 UMLEndBlock DefaultTextBlockNew iOSButton".split(" "), -wc="AWSAndroidBlock3 AWSiOSBlock3 AWSJavaBlock3 AWSJavaScript AWSNetBlock3 AWSNodeJSBlock3 AWSPHPBlock3 AWSPythonBlock3 AWSRubyBlock3 AWSXamarin AWSCLIBlock3 AWSEclipseToolkitBlock3 AWSVisualStudioToolkitBlock3 AWSWindowsPowershellToolkitBlock3 DefaultTextBlock RectangleContainerBlock UMLStartBlock UMLEndBlock DefaultTextBlockNew UMLHForkJoinBlock iOSButton".split(" "),gb="VennPlainColor1 VennPlainColor2 VennPlainColor3 VennPlainColor4 VennPlainColor5 VennPlainColor6 VennPlainColor7 VennPlainColor8 VennGradientColor1 VennGradientColor2 VennGradientColor3 VennGradientColor4 VennGradientColor5 VennGradientColor6 VennGradientColor7 VennGradientColor8".split(" "), -uc=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],vc=["fpDoor"],wb={None:"none",Arrow:"block;endFill=1","Hollow Arrow":"block;endFill=0","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10","CFN ERD Many Arrow":"ERmany;startSize=10","CFN ERD Exactly One Arrow":"ERmandOne;startSize=10","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10","CFN ERD One Arrow":"ERone;startSize=16", -Generalization:"block;endFill=0;startSize=12","Big Open Arrow":"open;startSize=10",Asynch1:"openAsync;flipH=1;startSize=10",Asynch2:"openAsync;startSize=10",Aggregation:"diamond;endFill=0;startSize=16",Composition:"diamond;endFill=1;startSize=16",BlockEnd:"none;endFill=1;startSize=16"},hb={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15", +(function(){function c(a){var b=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==b&&null!=a.State?null!=a.State.t&&(b=a.State):null==b&&null!=a.Note?null!=a.Note.t&&(b=a.Note):null==b&&null!=a.Title?null!=a.Title.t&&(b=a.Title):null!=a.t&&(b=a);null==b&&null!=a.TextAreas&&null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(b=a.TextAreas.Text.Value);if(null!=b){if(null!=b.t)return b.t=b.t.replace(/</g,"<"),b.t=b.t.replace(/>/g,">"),b.t;if(null!=b.Value&& +null!=b.Value.t)return b.Value.t=b.Value.t.replace(/</g,"<"),b.Value.t=b.Value.t.replace(/>/g,">"),b.Value.t}return""}function u(a){return null!=a.Action?a.Action:a}function q(a){if(null!=a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else if(null!=a.m)return a.m;return null}function l(c){return h(c)+f(c)+b(c)+a(c)+d(c)+g(c)+n(c)+C(c)+D(c)+y(c)}function h(a){a= +q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=10;"}function f(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("c"==d.n&&null!=d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+a+";";b++}return""}function b(a){a=q(a);if(null!=a){var b=0,d=!1;if(null!=a)for(var g=0;!d&&g<a.length;){var e=a[g];"b"==e.n&&null!=e.v&&e.v&&(d=!0,b+=1);g++}d=!1;if(null!=a)for(g= +0;!d&&g<a.length;)e=a[g],"i"==e.n&&null!=e.v&&e.v&&(d=!0,b+=2),g++;d=!1;if(null!=a)for(g=0;!d&&g<a.length;)e=a[g],"u"==e.n&&null!=e.v&&e.v&&(d=!0,b+=4),g++;if(0<b)return"fontStyle="+b+";"}return""}function a(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function d(b){var d=q(b);if(null!=d)for(var g=0;g<d.length;){var n=d[g];if("il"==n.n){if(null!=n.v)return"spacingLeft="+.6*n.v+";"}else if("s"==n.n&&"align=center;"!=a(b)&&null!= +n.v)return"spacingLeft="+.6*n.v+";";g++}return""}function g(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function n(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function C(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+";";b++}return""}function D(a){return"number"===typeof a.InsetMargin? +"spacing="+parseInt(a.InsetMargin)+";":""}function y(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":L(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function p(a,b){return Ub.includes(b.Class)?"Venn"==b.Class.substring(0,4)?L(mxConstants.STYLE_STROKECOLOR,a.FillColor.substring(0,7),"#FFFFFF"):"":0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":L(mxConstants.STYLE_STROKECOLOR,a.LineColor.substring(0,7),"#000000")}function z(a,b){var d= +"";kb.includes(b.Class)||(d+=L(mxConstants.STYLE_OPACITY,a.Opacity,"100"));if("string"===typeof a.LineColor&&!kb.includes(b.Class)&&7<a.LineColor.length)var g="0x"+a.LineColor.substring(a.LineColor.length-2,a.LineColor.length),d=d+("strokeOpacity="+Math.round(parseInt(g)/2.55)+";");"string"===typeof a.FillColor&&!kb.includes(b.Class)&&7<a.FillColor.length&&(g="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d+="fillOpacity="+Math.round(parseInt(g)/2.55)+";");return d}function W(a, +b){if(null!=a.Rounding&&!Ga.includes(b.Class)){if(0<a.Rounding)return"rounded=1;absoluteArcSize=1;arcSize="+.6*a.Rounding+";"}else if(null==a.Rounding&&Ia.includes(b.Class))return"rounded=1;absoluteArcSize=1;arcSize=8;";return""}function P(a,b,d){return null!=a.Rotation&&(a=mxUtils.toDegree(parseFloat(a.Rotation)),"AdvancedSwimLaneBlockRotated"==b.Class?(a+=90,d.geometry.rotate90()):Vb.includes(b.Class)?(a-=90,d.geometry.rotate90(),d.geometry.rotate90(),d.geometry.rotate90()):fb.includes(b.Class)&& +(a+=180,d.geometry.rotate90(),d.geometry.rotate90()),0!=a)?"rotation="+a+";":""}function E(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function A(a,b){if(null!=a.FillColor&&!Ea.includes(b.Class))if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return L(mxConstants.STYLE_FILLCOLOR,a.FillColor.cs[0].c.substring(0,7))+L(mxConstants.STYLE_GRADIENTCOLOR,a.FillColor.cs[1].c.substring(0,7))}else return"string"===typeof a.FillColor?L(mxConstants.STYLE_FILLCOLOR, +a.FillColor.substring(0,7),"#FFFFFF"):L(mxConstants.STYLE_FILLCOLOR,"none");return""}function F(a){return"dashed"==a.StrokeStyle?"dashed=1;":"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 1;":""}function B(a){return L(mxConstants.STYLE_STROKEWIDTH,.6*parseFloat(a.LineWidth),"1")}function Z(l,q){var Z=u(q);if(null!=Z){var m=lb[Z.Class]+";";null!=m&&(l.style+=m);m=null!=Z.Properties?Z.Properties: +Z;if(null!=m){l.value=c(m);var e=l.style,L=h(m)+f(m)+b(m)+a(m,l)+d(m)+g(m)+n(m)+C(m)+D(m)+y(m)+p(m,Z)+z(m,Z)+W(m,Z)+P(m,Z,l)+(m.FlipX?"flipH=1;":"")+(m.FlipY?"flipV=1;":"")+E(m)+A(m,Z)+F(m)+B(m);Z="ImageSearchBlock2"==Z.Class?"image="+m.URL+";":"";l.style=e+(L+Z);if(l.edge){l.style+="rounded=1;arcSize=6;";if("diagonal"!=m.Shape)if(null!=m.ElbowPoints)for(l.geometry.points=[],Z=0;Z<m.ElbowPoints.length;Z++)l.geometry.points.push(new mxPoint(Math.round(.6*m.ElbowPoints[Z].x+0),Math.round(.6*m.ElbowPoints[Z].y+ +0)));else"elbow"==m.Shape?l.style=null!=m.Endpoint1.Block&&null!=m.Endpoint1.Block?l.style+"edgeStyle=orthogonalEdgeStyle;":l.style+"edgeStyle=elbowEdgeStyle;":null!=m.Endpoint1.Block&&null!=m.Endpoint1.Block&&(l.style+="edgeStyle=orthogonalEdgeStyle;","curve"==m.Shape&&(l.style+="curved=1;"));null!=m.Endpoint1.Style&&(l.style+="startArrow="+xb[m.Endpoint1.Style]+";");null!=m.Endpoint2.Style&&(l.style+="endArrow="+xb[m.Endpoint2.Style].replace(/startSize/g,"endSize")+";");fa(l,m.Endpoint1,!0);fa(l, +m.Endpoint2,!1)}}}}function K(a){var b=u(a).Properties.BoundingBox;null!=a.Class&&"AWS"===a.Class.substring(0,3)&&(b.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*b.x+0),Math.round(.6*b.y+0),Math.round(.6*b.w),Math.round(.6*b.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;Z(v,a);return v}function Y(a,b,d){d=2*(parseFloat(a.Location)-.5);a=new mxCell(c(a),new mxGeometry(d,0,0,0),"text;html=1;resizable=0;labelBackgroundColor=#ffffff;");a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function L(a, +b,d,g){null!=b&&null!=g&&(b=g(b));return null!=b&&b!=d?a+"="+b+";":""}function fa(a,b,d){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(d?"exitX":"entryX")+"="+b.LinkX+";"+(d?"exitY":"entryY")+"="+b.LinkY+";"+(d?"exitPerimeter":"entryPerimeter")+"=0;")}function ka(a,b,d,g,e,n,c,f){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;c.insert(a);n=[a];d=sb.cloneCell(d);f.insertEdge(d,!1);a.insertEdge(d,!0);n.push(d);g.push(e.addCell(d,null,null,null,null))}function ea(a, +b,d,g,e,n,c,f,C){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;C.insert(a);d=new mxCell("",new mxGeometry(d,g,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;C.insert(d);f=[d];e=sb.cloneCell(e);a.insertEdge(e,!0);d.insertEdge(e,!1);f.push(e);n.push(c.addCell(e,null,null,null,null))}function na(q,L,K){var m=u(q),e=m.Properties,Y=e.BoundingBox,w=Math.round(.6*Y.w),t=Math.round(.6*Y.h),fa=Math.round(.6*Y.x+0),na=Math.round(.6*Y.y+0);v=new mxCell("",new mxGeometry(fa, +na,w,t),"html=1;whiteSpace=wrap;");v.vertex=!0;switch(q.Class){case "BraceNoteBlock":case "UI2BraceNoteBlock":var Ga=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(Ga=!0);var Ia=null,za=null;Ga?(Ia=new mxCell("",new mxGeometry(w-.125*t,0,.125*t,t),"shape=curlyBracket;rounded=1;"),za=new mxCell("",new mxGeometry(0,0,w-.125*t,t),"strokeColor=none;fillColor=none;")):(Ia=new mxCell("",new mxGeometry(0,0,.125*t,t),"shape=curlyBracket;rounded=1;flipH=1;"),za=new mxCell("",new mxGeometry(.125*t, +0,w-.125*t,t),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=P(e,m,v);Ia.vertex=!0;v.insert(Ia);Ia.style+=p(e,m)+z(e,m)+E(e)+F(e)+B(e);za.vertex=!0;za.value=c(e);v.insert(za);za.style+=h(e)+f(e)+b(e)+a(e,za)+d(e)+g(e)+n(e)+C(e)+D(e)+y(e);break;case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":var Ub=0;null!=e.Lanes&&(Ub=e.Lanes.length);v.style="strokeColor=none;fillColor=none;";for(var Vb=0,db=[],k=0;k<Ub;k++){var kb=parseFloat(e.Lanes[k].p); +db.push(new mxCell("",new mxGeometry(w*Vb,0,w*kb,t),"shape=swimlane;startSize=25;"));db[k].vertex=!0;v.insert(db[k]);db[k].value=c(e["Lane_"+k]);db[k].style+=h(e["Lane_"+k])+f(e["Lane_"+k])+b(e["Lane_"+k])+a(e["Lane_"+k],db[k])+d(e["Lane_"+k])+g(e["Lane_"+k])+n(e["Lane_"+k])+C(e["Lane_"+k])+D(e["Lane_"+k])+y(e["Lane_"+k])+p(e,m)+z(e,m)+W(e,m)+P(e,m,db[k])+(e.FlipX?"flipH=1;":"")+(e.FlipY?"flipV=1;":"")+E(e)+A(e,m)+F(e)+B(e);Vb+=kb}break;case "AndroidDevice":if(null!=e.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;"; +var Ea=null,fb=null,yb=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",Ea=new mxCell("",new mxGeometry(.112*w,.077*t,.77*w,.85*t),""),e.KeyboardShown&&(fb=new mxCell("",new mxGeometry(.112*w,.727*t,.77*w,.2*t),"shape=mxgraph.android.keyboard;")),e.FullScreen||(yb=new mxCell("",new mxGeometry(.112*w,.077*t,.77*w,.03*t),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*t+";"));else if("Large Phone"== +e.AndroidDeviceName||"Phone"==e.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",Ea=new mxCell("",new mxGeometry(.04*w,.092*t,.92*w,.816*t),""),e.KeyboardShown&&(fb=new mxCell("",new mxGeometry(.04*w,.708*t,.92*w,.2*t),"shape=mxgraph.android.keyboard;")),e.FullScreen||(yb=new mxCell("",new mxGeometry(.04*w,.092*t,.92*w,.03*t),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*t+";"));Ea.vertex=!0;v.insert(Ea);"Dark"==e.Scheme?Ea.style+= +"fillColor=#111111;":"Light"==e.Scheme&&(Ea.style+="fillColor=#ffffff;");null!=fb&&(fb.vertex=!0,v.insert(fb));null!=yb&&(yb.vertex=!0,v.insert(yb))}break;case "AndroidAlertDialog":var Ja=new mxCell("",new mxGeometry(0,0,w,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ja.vertex=!0;v.insert(Ja);var ha=new mxCell("",new mxGeometry(0,25,w,10),"shape=line;strokeColor=#33B5E5;");ha.vertex=!0;v.insert(ha);var zb=new mxCell("",new mxGeometry(0,30,w,t-30),"strokeColor=none;fillColor=none;verticalAlign=top;"); +zb.vertex=!0;v.insert(zb);var la=new mxCell("",new mxGeometry(0,t-25,.5*w,25),"fillColor=none;");la.vertex=!0;v.insert(la);var ma=new mxCell("",new mxGeometry(.5*w,t-25,.5*w,25),"fillColor=none;");ma.vertex=!0;v.insert(ma);Ja.value=c(e.DialogTitle);Ja.style+=l(e.DialogTitle);zb.value=c(e.DialogText);zb.style+=l(e.DialogText);la.value=c(e.Button_0);la.style+=l(e.Button_0);ma.value=c(e.Button_1);ma.style+=l(e.Button_1);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",la.style+= +"strokeColor=#353535;",ma.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",la.style+="strokeColor=#E2E2E2;",ma.style+="strokeColor=#E2E2E2;");break;case "AndroidDateDialog":case "AndroidTimeDialog":Ja=new mxCell("",new mxGeometry(0,0,w,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ja.vertex=!0;v.insert(Ja);Ja.value=c(e.DialogTitle);Ja.style+=l(e.DialogTitle);ha=new mxCell("",new mxGeometry(0,25,w,10),"shape=line;strokeColor=#33B5E5;");ha.vertex=!0;v.insert(ha); +la=new mxCell("",new mxGeometry(0,t-25,.5*w,25),"fillColor=none;");la.vertex=!0;v.insert(la);la.value=c(e.Button_0);la.style+=l(e.Button_0);ma=new mxCell("",new mxGeometry(.5*w,t-25,.5*w,25),"fillColor=none;");ma.vertex=!0;v.insert(ma);ma.value=c(e.Button_1);ma.style+=l(e.Button_1);var jb=new mxCell("",new mxGeometry(.5*w-4,41,8,4),"shape=triangle;direction=north;");jb.vertex=!0;v.insert(jb);var ib=new mxCell("",new mxGeometry(.25*w-4,41,8,4),"shape=triangle;direction=north;");ib.vertex=!0;v.insert(ib); +var mb=new mxCell("",new mxGeometry(.75*w-4,41,8,4),"shape=triangle;direction=north;");mb.vertex=!0;v.insert(mb);var Ab=new mxCell("",new mxGeometry(.375*w,50,.2*w,15),"strokeColor=none;fillColor=none;");Ab.vertex=!0;v.insert(Ab);Ab.value=c(e.Label_1);Ab.style+=l(e.Label_1);var Bb=new mxCell("",new mxGeometry(.125*w,50,.2*w,15),"strokeColor=none;fillColor=none;");Bb.vertex=!0;v.insert(Bb);Bb.value=c(e.Label_0);Bb.style+=l(e.Label_0);var nb=null;"AndroidDateDialog"==q.Class&&(nb=new mxCell("",new mxGeometry(.625* +w,50,.2*w,15),"strokeColor=none;fillColor=none;"),nb.vertex=!0,v.insert(nb),nb.value=c(e.Label_2),nb.style+=l(e.Label_2));var Ka=new mxCell("",new mxGeometry(.43*w,60,.14*w,10),"shape=line;strokeColor=#33B5E5;");Ka.vertex=!0;v.insert(Ka);var La=new mxCell("",new mxGeometry(.18*w,60,.14*w,10),"shape=line;strokeColor=#33B5E5;");La.vertex=!0;v.insert(La);var lb=new mxCell("",new mxGeometry(.68*w,60,.14*w,10),"shape=line;strokeColor=#33B5E5;");lb.vertex=!0;v.insert(lb);var Cb=new mxCell("",new mxGeometry(.375* +w,65,.2*w,15),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.value=c(e.Label_4);Cb.style+=l(e.Label_4);var ob=null;"AndroidTimeDialog"==q.Class&&(ob=new mxCell("",new mxGeometry(.3*w,65,.1*w,15),"strokeColor=none;fillColor=none;"),ob.vertex=!0,v.insert(ob),ob.value=c(e.Label_Colon),ob.style+=l(e.Label_Colon));var Db=new mxCell("",new mxGeometry(.125*w,65,.2*w,15),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.value=c(e.Label_3);Db.style+=l(e.Label_3);var Eb=new mxCell("", +new mxGeometry(.625*w,65,.2*w,15),"strokeColor=none;fillColor=none;");Eb.vertex=!0;v.insert(Eb);Eb.value=c(e.Label_5);Eb.style+=l(e.Label_5);var xb=new mxCell("",new mxGeometry(.43*w,75,.14*w,10),"shape=line;strokeColor=#33B5E5;");xb.vertex=!0;v.insert(xb);var Tb=new mxCell("",new mxGeometry(.18*w,75,.14*w,10),"shape=line;strokeColor=#33B5E5;");Tb.vertex=!0;v.insert(Tb);var kc=new mxCell("",new mxGeometry(.68*w,75,.14*w,10),"shape=line;strokeColor=#33B5E5;");kc.vertex=!0;v.insert(kc);var Fb=new mxCell("", +new mxGeometry(.375*w,80,.2*w,15),"strokeColor=none;fillColor=none;");Fb.vertex=!0;v.insert(Fb);Fb.value=c(e.Label_7);Fb.style+=l(e.Label_7);var Gb=new mxCell("",new mxGeometry(.125*w,80,.2*w,15),"strokeColor=none;fillColor=none;");Gb.vertex=!0;v.insert(Gb);Gb.value=c(e.Label_6);Gb.style+=l(e.Label_6);var Hb=new mxCell("",new mxGeometry(.625*w,80,.2*w,15),"strokeColor=none;fillColor=none;");Hb.vertex=!0;v.insert(Hb);Hb.value=c(e.Label_8);Hb.style+=l(e.Label_8);var pb=new mxCell("",new mxGeometry(.5* +w-4,99,8,4),"shape=triangle;direction=south;");pb.vertex=!0;v.insert(pb);var qb=new mxCell("",new mxGeometry(.25*w-4,99,8,4),"shape=triangle;direction=south;");qb.vertex=!0;v.insert(qb);var rb=new mxCell("",new mxGeometry(.75*w-4,99,8,4),"shape=triangle;direction=south;");rb.vertex=!0;v.insert(rb);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",la.style+="strokeColor=#353535;",ma.style+="strokeColor=#353535;",jb.style+="strokeColor=none;fillColor=#7E7E7E;",ib.style+="strokeColor=none;fillColor=#7E7E7E;", +mb.style+="strokeColor=none;fillColor=#7E7E7E;",pb.style+="strokeColor=none;fillColor=#7E7E7E;",qb.style+="strokeColor=none;fillColor=#7E7E7E;",rb.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",la.style+="strokeColor=#E2E2E2;",ma.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=none;fillColor=#939393;",ib.style+="strokeColor=none;fillColor=#939393;",mb.style+="strokeColor=none;fillColor=#939393;",pb.style+="strokeColor=none;fillColor=#939393;", +qb.style+="strokeColor=none;fillColor=#939393;",rb.style+="strokeColor=none;fillColor=#939393;");break;case "AndroidListItems":var ta=t,ab=0;if(e.ShowHeader){var ab=8,Ib=new mxCell("",new mxGeometry(0,0,w,ab),"strokeColor=none;fillColor=none;");Ib.vertex=!0;v.insert(Ib);Ib.value=c(e.Header);Ib.style+=l(e.Header);var ta=ta-ab,lc=new mxCell("",new mxGeometry(0,ab-2,w,4),"shape=line;strokeColor=#999999;");lc.vertex=!0;v.insert(lc)}var Ma=parseInt(e.Items);0<Ma&&(ta/=Ma);for(var I=[],ha=[],k=0;k<Ma;k++)I[k]= +new mxCell("",new mxGeometry(0,ab+k*ta,w,ta),"strokeColor=none;fillColor=none;"),I[k].vertex=!0,v.insert(I[k]),I[k].value=c(e["Item_"+k]),I[k].style+=l(e["Item_"+k]),0<k&&(ha[k]=new mxCell("",new mxGeometry(0,ab+k*ta-2,w,4),"shape=line;"),ha[k].vertex=!0,v.insert(ha[k]),ha[k].style="Dark"==e.Scheme?ha[k].style+"strokeColor=#ffffff;":ha[k].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";break;case "AndroidTabs":var Na= +parseInt(e.Tabs),Aa=w;0<Na&&(Aa/=Na);for(var ba=[],ha=[],k=0;k<Na;k++)ba[k]=new mxCell("",new mxGeometry(k*Aa,0,Aa,t),"strokeColor=none;fillColor=none;"),ba[k].vertex=!0,v.insert(ba[k]),ba[k].value=c(e["Tab_"+k]),ba[k].style+=l(e["Tab_"+k]),0<k&&(ha[k]=new mxCell("",new mxGeometry(k*Aa-2,.2*t,4,.6*t),"shape=line;direction=north;"),ha[k].vertex=!0,v.insert(ha[k]),ha[k].style="Dark"==e.Scheme?ha[k].style+"strokeColor=#484848;":ha[k].style+"strokeColor=#CCCCCC;");var mc=new mxCell("",new mxGeometry(e.Selected* +Aa+2,t-3,Aa-4,3),"strokeColor=none;fillColor=#33B5E5;");mc.vertex=!0;v.insert(mc);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(fa),Math.round(na+.25*t),Math.round(w),Math.round(.5*t)),"html=1;whiteSpace=wrap;");v.vertex=!0;var Jb=new mxCell("",new mxGeometry(0,0,w*e.BarPosition,Math.round(.5*t)),"strokeColor=none;fillColor=#33B5E5;");Jb.vertex=!0;v.insert(Jb); +v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;": +e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=c(e.Label);v.style+=l(e.Label);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(e.HighlightShow){var bb=null,bb=e.HighlightTop?new mxCell("",new mxGeometry(0, +0,w,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,t-2,w,2),"strokeColor=none;");bb.vertex=!0;v.insert(bb);switch(e.HighlightColor){case "Blue":bb.style+="fillColor=#33B5E5;";break;case "Dark Gray":bb.style+="fillColor=#B0B0B0;";break;case "White":bb.style+="fillColor=#ffffff;"}}if(e.VlignShow){var tb=new mxCell("",new mxGeometry(20,5,2,t-10),"shape=line;direction=north;");tb.vertex=!0;v.insert(tb);switch(e.VlignColor){case "Blue":tb.style+="strokeColor=#244C5A;";break;case "White":tb.style+= +"strokeColor=#ffffff;"}}break;case "AndroidButton":v.value=c(e.Label);v.style+=l(e.Label)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";break;case "AndroidTextBox":v.value=c(e.Label);v.style+=l(e.Label);var Kb=new mxCell("",new mxGeometry(2,t-6,w-4,4),"shape=partialRectangle;top=0;fillColor=none;");Kb.vertex=!0;v.insert(Kb);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;": +v.style+"fillColor=#ffffff;strokeColor=none;";Kb.style=e.TextFocused?Kb.style+"strokeColor=#33B5E5;":Kb.style+"strokeColor=#A9A9A9;";break;case "AndroidRadioButton":var gb=null;e.Checked&&(gb=new mxCell("",new mxGeometry(.15*w,.15*t,.7*w,.7*t),"shape=ellipse;fillColor=#33B5E5;strokeWidth=0.6;"),gb.vertex=!0,v.insert(gb));"Dark"==e.Scheme?(v.style+="shape=ellipse;strokeWidth=0.6;strokeColor=#272727;",e.Checked?(gb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"): +(v.style+="shape=ellipse;strokeWidth=0.6;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&(gb.style+="strokeColor=#999999;"));break;case "AndroidCheckBox":var cc=null;e.Checked&&(cc=new mxCell("",new mxGeometry(.25*w,.05*-t,w,.8*t),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),cc.vertex=!0,v.insert(cc));v.style="Dark"==e.Scheme?v.style+"strokeWidth=0.6;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=0.6;strokeColor=#5C5C5C;fillColor=#ffffff;";break;case "AndroidToggle":v.style= +"Dark"==e.Scheme?e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";break;case "iOSSegmentedControl":Na=parseInt(e.Tabs);Aa=w;v.style+="strokeColor=none;fillColor=none;"; +0<Na&&(Aa/=Na);ba=[];ha=[];for(k=0;k<Na;k++)ba[k]=new mxCell("",new mxGeometry(k*Aa,0,Aa,t),"strokeColor="+e.FillColor+";"),ba[k].vertex=!0,v.insert(ba[k]),ba[k].value=c(e["Tab_"+k]),ba[k].style+=l(e["Tab_"+k]),ba[k].style=e.Selected==k?ba[k].style+A(e,m):ba[k].style+"fillColor=none;";break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(fa), +Math.round(na+.25*t),Math.round(w),Math.round(.5*t)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Jb=new mxCell("",new mxGeometry(0,0,w*e.BarPosition,Math.round(.5*t)),"strokeColor=none;"+A(e,m));Jb.vertex=!0;v.insert(Jb);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;"+A(e,m)+"strokeColor=#D6D6D6;";break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;"+A(e,m)+"strokeColor=#000000;";var R=new mxCell(c(e.Text),new mxGeometry(.35*w,0, +.3*w,t),"strokeColor=none;fillColor=none;");R.vertex=!0;v.insert(R);R.style+=l(e.Text);var va=new mxCell(c(e.Carrier),new mxGeometry(.09*w,0,.2*w,t),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.style+=l(e.Carrier);break;case "iOSSearchBar":v.style+="strokeColor=none;"+A(e,m)+z(e,m)+W(e,m)+l(e.Search);v.value=c(e.Search);var U=new mxCell("",new mxGeometry(.3*w,.3*t,.4*t,.4*t),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");U.vertex=!0;v.insert(U);break; +case "iOSNavBar":v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+A(e,m)+z(e,m)+l(e.Title);v.value=c(e.Title);R=new mxCell(c(e.LeftText),new mxGeometry(.03*w,0,.3*w,t),"strokeColor=none;fillColor=none;");R.vertex=!0;v.insert(R);R.style+=l(e.LeftText);va=new mxCell(c(e.RightText),new mxGeometry(.65*w,0,.3*w,t),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.style+=l(e.RightText);U=new mxCell("",new mxGeometry(.02*w,.2*t,.3*t,.5*t),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;"); +U.vertex=!0;v.insert(U);break;case "iOSTabs":Na=parseInt(e.Tabs);Aa=w;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;"+A(e,m)+z(e,m);0<Na&&(Aa/=Na);ba=[];ha=[];for(k=0;k<Na;k++)ba[k]=new mxCell("",new mxGeometry(k*Aa,0,Aa,t),"strokeColor=none;"),ba[k].vertex=!0,v.insert(ba[k]),ba[k].value=c(e["Tab_"+k]),ba[k].style+=h(e["Tab_"+k]),ba[k].style+=f(e["Tab_"+k])+b(e["Tab_"+k])+a(e["Tab_"+k])+d(e["Tab_"+k])+g(e["Tab_"+k])+n(e["Tab_"+k])+C(e["Tab_"+k])+D(e["Tab_"+k]),ba[k].style+= +"verticalAlign=bottom;",ba[k].style=e.Selected==k?ba[k].style+"fillColor=#BBBBBB;":ba[k].style+"fillColor=none;";break;case "iOSDatePicker":var Oa=new mxCell("",new mxGeometry(0,0,.5*w,.2*t),"strokeColor=none;fillColor=none;");Oa.vertex=!0;v.insert(Oa);Oa.value=c(e.Option11);Oa.style+=l(e.Option11);var Pa=new mxCell("",new mxGeometry(.5*w,0,.15*w,.2*t),"strokeColor=none;fillColor=none;");Pa.vertex=!0;v.insert(Pa);Pa.value=c(e.Option21);Pa.style+=l(e.Option21);var Qa=new mxCell("",new mxGeometry(.65* +w,0,.15*w,.2*t),"strokeColor=none;fillColor=none;");Qa.vertex=!0;v.insert(Qa);Qa.value=c(e.Option31);Qa.style+=l(e.Option31);var Ra=new mxCell("",new mxGeometry(0,.2*t,.5*w,.2*t),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=c(e.Option12);Ra.style+=l(e.Option12);var Sa=new mxCell("",new mxGeometry(.5*w,.2*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=c(e.Option22);Sa.style+=l(e.Option22);var Ta=new mxCell("",new mxGeometry(.65*w,.2*t, +.15*w,.2*t),"strokeColor=none;fillColor=none;");Ta.vertex=!0;v.insert(Ta);Ta.value=c(e.Option32);Ta.style+=l(e.Option32);var oa=new mxCell("",new mxGeometry(0,.4*t,.5*w,.2*t),"strokeColor=none;fillColor=none;");oa.vertex=!0;v.insert(oa);oa.value=c(e.Option13);oa.style+=l(e.Option13);var pa=new mxCell("",new mxGeometry(.5*w,.4*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");pa.vertex=!0;v.insert(pa);pa.value=c(e.Option23);pa.style+=l(e.Option23);var Ua=new mxCell("",new mxGeometry(.65*w,.4*t,.15* +w,.2*t),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(e.Option33);Ua.style+=l(e.Option33);var qa=new mxCell("",new mxGeometry(.8*w,.4*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(e.Option43);qa.style+=l(e.Option43);var ra=new mxCell("",new mxGeometry(0,.6*t,.5*w,.2*t),"strokeColor=none;fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(e.Option14);ra.style+=l(e.Option14);var Va=new mxCell("",new mxGeometry(.5*w,.6*t,.15*w,.2* +t),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(e.Option24);Va.style+=l(e.Option24);var Wa=new mxCell("",new mxGeometry(.65*w,.6*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(e.Option34);Wa.style+=l(e.Option34);var Xa=new mxCell("",new mxGeometry(.8*w,.6*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(e.Option44);Xa.style+=l(e.Option44);var sa=new mxCell("",new mxGeometry(0,.8*t,.5*w,.2*t), +"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(e.Option15);sa.style+=l(e.Option15);var Ya=new mxCell("",new mxGeometry(.5*w,.8*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(e.Option25);Ya.style+=l(e.Option25);var Za=new mxCell("",new mxGeometry(.65*w,.8*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(e.Option35);Za.style+=l(e.Option35);Ka=new mxCell("",new mxGeometry(0,.4*t-2,w,4),"shape=line;strokeColor=#888888;"); +Ka.vertex=!0;v.insert(Ka);La=new mxCell("",new mxGeometry(0,.6*t-2,w,4),"shape=line;strokeColor=#888888;");La.vertex=!0;v.insert(La);v.style+=A(e,m)+z(e,m)+"strokeColor=none;";break;case "iOSTimePicker":Oa=new mxCell("",new mxGeometry(0,0,.25*w,.2*t),"strokeColor=none;fillColor=none;");Oa.vertex=!0;v.insert(Oa);Oa.value=c(e.Option11);Oa.style+=l(e.Option11);Pa=new mxCell("",new mxGeometry(.25*w,0,.3*w,.2*t),"strokeColor=none;fillColor=none;");Pa.vertex=!0;v.insert(Pa);Pa.value=c(e.Option21);Pa.style+= +l(e.Option21);Ra=new mxCell("",new mxGeometry(0,.2*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=c(e.Option12);Ra.style+=l(e.Option12);Sa=new mxCell("",new mxGeometry(.25*w,.2*t,.3*w,.2*t),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=c(e.Option22);Sa.style+=l(e.Option22);oa=new mxCell("",new mxGeometry(0,.4*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");oa.vertex=!0;v.insert(oa);oa.value=c(e.Option13);oa.style+=l(e.Option13);pa=new mxCell("", +new mxGeometry(.25*w,.4*t,.3*w,.2*t),"strokeColor=none;fillColor=none;");pa.vertex=!0;v.insert(pa);pa.value=c(e.Option23);pa.style+=l(e.Option23);qa=new mxCell("",new mxGeometry(.7*w,.4*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(e.Option33);qa.style+=l(e.Option33);ra=new mxCell("",new mxGeometry(0,.6*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(e.Option14);ra.style+=l(e.Option14);Va=new mxCell("",new mxGeometry(.25* +w,.6*t,.3*w,.2*t),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(e.Option24);Va.style+=l(e.Option24);Xa=new mxCell("",new mxGeometry(.7*w,.6*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(e.Option34);Xa.style+=l(e.Option34);sa=new mxCell("",new mxGeometry(0,.8*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(e.Option15);sa.style+=l(e.Option15);Ya=new mxCell("",new mxGeometry(.25*w,.8*t,.3*w,.2* +t),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(e.Option25);Ya.style+=l(e.Option25);Ka=new mxCell("",new mxGeometry(0,.4*t-2,w,4),"shape=line;strokeColor=#888888;");Ka.vertex=!0;v.insert(Ka);La=new mxCell("",new mxGeometry(0,.6*t-2,w,4),"shape=line;strokeColor=#888888;");La.vertex=!0;v.insert(La);v.style+=A(e,m)+z(e,m)+"strokeColor=none;";break;case "iOSCountdownPicker":Qa=new mxCell("",new mxGeometry(.45*w,0,.2*w,.2*t),"strokeColor=none;fillColor=none;");Qa.vertex=!0; +v.insert(Qa);Qa.value=c(e.Option31);Qa.style+=l(e.Option31);Ta=new mxCell("",new mxGeometry(.45*w,.2*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");Ta.vertex=!0;v.insert(Ta);Ta.value=c(e.Option32);Ta.style+=l(e.Option32);oa=new mxCell("",new mxGeometry(0,.4*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");oa.vertex=!0;v.insert(oa);oa.value=c(e.Option13);oa.style+=l(e.Option13);pa=new mxCell("",new mxGeometry(.2*w,.4*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");pa.vertex=!0;v.insert(pa);pa.value= +c(e.Option23);pa.style+=l(e.Option23);Ua=new mxCell("",new mxGeometry(.45*w,.4*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(e.Option33);Ua.style+=l(e.Option33);qa=new mxCell("",new mxGeometry(.6*w,.4*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(e.Option43);qa.style+=l(e.Option43);ra=new mxCell("",new mxGeometry(0,.6*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(e.Option14);ra.style+= +l(e.Option14);Wa=new mxCell("",new mxGeometry(.45*w,.6*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(e.Option34);Wa.style+=l(e.Option34);sa=new mxCell("",new mxGeometry(0,.8*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(e.Option15);sa.style+=l(e.Option15);Za=new mxCell("",new mxGeometry(.45*w,.8*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(e.Option35);Za.style+=l(e.Option35);Ka= +new mxCell("",new mxGeometry(0,.4*t-2,w,4),"shape=line;strokeColor=#888888;");Ka.vertex=!0;v.insert(Ka);La=new mxCell("",new mxGeometry(0,.6*t-2,w,4),"shape=line;strokeColor=#888888;");La.vertex=!0;v.insert(La);v.style+=A(e,m)+z(e,m)+"strokeColor=none;";break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*e.SeparatorInset+";";v.style+=h(e.text)+f(e.text)+b(e.text)+y(e.text);v.value=c(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":U= +new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);break;case "DetailDisclosure":U=new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);var ga=new mxCell("",new mxGeometry(.79*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "DetailIndicator":ga=new mxCell("",new mxGeometry(.87* +w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "CheckMark":U=new mxCell("",new mxGeometry(.89*w,.37*t,.4*t,.26*t),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),U.vertex=!0,v.insert(U)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.6*e.SeparatorInset+";";v.style+=h(e.subtext)+ +f(e.subtext)+b(e.subtext);v.value=c(e.subtext);var ia=new mxCell("",new mxGeometry(0,.4*t,w,.6*t),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*e.SeparatorInset+";");ia.vertex=!0;v.insert(ia);ia.style+=h(e.text)+f(e.text)+b(e.text);ia.value=c(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":U=new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);break;case "DetailDisclosure":U= +new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);ga=new mxCell("",new mxGeometry(.79*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "DetailIndicator":ga=new mxCell("",new mxGeometry(.87*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "CheckMark":U=new mxCell("", +new mxGeometry(.89*w,.37*t,.4*t,.26*t),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),U.vertex=!0,v.insert(U)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*e.SeparatorInset+";";v.style+=h(e.subtext)+f(e.subtext)+b(e.subtext);v.value=c(e.subtext);ia=null;switch(e.AccessoryIndicatorType){case "Disclosure":U=new mxCell("",new mxGeometry(.91*w,.35* +t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);ia=new mxCell("",new mxGeometry(.55*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":U=new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);ga=new mxCell("",new mxGeometry(.79*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0; +v.insert(ga);ia=new mxCell("",new mxGeometry(.45*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":ga=new mxCell("",new mxGeometry(.87*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);ia=new mxCell("",new mxGeometry(.52*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":U=new mxCell("",new mxGeometry(.89*w,.37*t,.4*t,.26*t),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"); +U.vertex=!0;v.insert(U);ia=new mxCell("",new mxGeometry(.55*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:ia=new mxCell("",new mxGeometry(.65*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;")}ia.vertex=!0;v.insert(ia);ia.style+=h(e.text)+f(e.text)+b(e.text);ia.value=c(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";var Ha=new mxCell("",new mxGeometry(0,0,.25* +w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ha.vertex=!0;v.insert(Ha);Ha.style+=h(e.subtext)+f(e.subtext)+b(e.subtext);Ha.value=c(e.subtext);ia=new mxCell("",new mxGeometry(.25*w,0,.5*w,t),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");ia.vertex=!0;v.insert(ia);ia.style+=h(e.text)+f(e.text)+b(e.text);ia.value=c(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":U=new mxCell("",new mxGeometry(.91* +w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);break;case "DetailDisclosure":U=new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);ga=new mxCell("",new mxGeometry(.79*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "DetailIndicator":ga=new mxCell("",new mxGeometry(.87*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;"); +ga.vertex=!0;v.insert(ga);break;case "CheckMark":U=new mxCell("",new mxGeometry(.89*w,.37*t,.4*t,.26*t),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),U.vertex=!0,v.insert(U)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";R=new mxCell("",new mxGeometry(0,0,w,.4*t),"fillColor=none;strokeColor=none;spacing=10;align=left;");R.vertex=!0;v.insert(R);R.style+=h(e.text)+f(e.text)+b(e.text);R.value=c(e.text); +va=new mxCell("",new mxGeometry(0,.6*t,w,.4*t),"fillColor=none;strokeColor=none;spacing=10;align=left;");va.vertex=!0;v.insert(va);va.style+=h(e["bottom-text"])+f(e["bottom-text"])+b(e["bottom-text"]);va.value=c(e["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.style+=h(e.text)+f(e.text)+b(e.text);v.value=c(e.text);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var r=new mxCell("", +new mxGeometry(0,0,.9*w,.9*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e);var x=new mxCell("",new mxGeometry(.1*w,.1*t,.9*w,.9*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e);x.value=c(e.Text);e.Future&&(r.style+="dashed=1;",x.style+="dashed=1;")}else e.Future&&(v.style+="dashed=1;"),v.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e),v.value=c(e.Text);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":v.style+= +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e);r=null;switch(q.Class){case "SMHome":r=new mxCell("",new mxGeometry(.5*w-.4*t,.1*t,.8*t,.8*t),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":r=new mxCell("",new mxGeometry(.5*w-.4*t,.19*t,.8*t,.62*t),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":r=new mxCell("",new mxGeometry(.5*w-.4*t,.1*t,.8*t,.8*t),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMSettings":r=new mxCell("",new mxGeometry(.5*w-.35*t,.15*t,.7*t,.7*t),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":r=new mxCell("",new mxGeometry(.5*w-.35*t,.2*t,.7*t,.6*t),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":r=new mxCell("",new mxGeometry(.5*w-.3*t,.25*t,.6*t,.5*t),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMVideo":r=new mxCell("",new mxGeometry(.5*w-.4*t,.2*t,.8*t,.6*t),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":r=new mxCell("",new mxGeometry(.5*w-.3*t,.2*t,.6*t,.6*t),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":r=new mxCell("",new mxGeometry(.5*w-.4*t,.15*t,.8*t,.7*t),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMChart":var H=A(e,m),H=""==H?"#ffffff;":H.replace("fillColor=",""),r=new mxCell("",new mxGeometry(.5*w-.35*t,.15*t,.7*t,.7*t),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+H);break;case "SMCloud":r=new mxCell("",new mxGeometry(.5*w-.4*t,.27*t,.8*t,.46*t),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":r=new mxCell("",new mxGeometry(.5*w-.25*t,.15*t,.5*t,.7*t),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMForm":r=new mxCell("",new mxGeometry(.5*w-.4*t,.15*t,.8*t,.7*t),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":r=new mxCell("",new mxGeometry(.5*w-.4*t,.2*t,.8*t,.6*t),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":r=new mxCell("",new mxGeometry(.5*w-.4*t,.2*t,.8*t,.6*t),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}r.vertex= +!0;v.insert(r);r.style+=l(e);r.value=c(e.Text);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";r=new mxCell("",new mxGeometry(.1*w,0,.9*w,.9*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e);x=new mxCell("",new mxGeometry(0,.1*t,.9*w,.9*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Text);x.value=c(e.Text);break;case "UMLConstraintBlock":var Wb=new mxCell("",new mxGeometry(0,0,.25*t,t),"shape=curlyBracket;rounded=1;"); +Wb.vertex=!0;v.insert(Wb);var Xb=new mxCell("",new mxGeometry(w-.25*t,0,.25*t,t),"shape=curlyBracket;rounded=1;flipH=1;");Xb.vertex=!0;v.insert(Xb);za=new mxCell("",new mxGeometry(.25*t,0,w-.5*t,t),"strokeColor=none;fillColor=none;");za.vertex=!0;za.value=c(e);v.insert(za);v.style="strokeColor=none;fillColor=none;";v.style+=P(e,m,v);Wb.style+=p(e,m)+z(e,m)+E(e)+F(e)+B(e);Xb.style+=p(e,m)+z(e,m)+E(e)+F(e)+B(e);za.style+=h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+n(e)+C(e)+D(e)+y(e);break;case "UMLTextBlock":v.style+= +"strokeColor=none;"+z(e,m)+E(e)+F(e)+B(e)+l(e.Text);v.value=c(e.Text);break;case "BPMNActivity":switch(e.bpmnActivityType){case 1:v.style+=A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+B(e)+l(e.Text);v.value=c(e.Text);break;case 2:v.style+="shape=ext;double=1;"+A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+B(e)+l(e.Text);v.value=c(e.Text);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+A(e,m)+p(e,m)+z(e,m)+E(e)+B(e)+l(e.Text);v.value=c(e.Text);break;case 4:v.style+="shape=ext;strokeWidth=2;"+A(e,m)+p(e,m)+z(e,m)+E(e)+ +F(e)+l(e.Text),v.value=c(e.Text)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:r=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");r.geometry.offset=new mxPoint(4,7);break;case 2:r=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");r.geometry.offset=new mxPoint(4,7);break;case 3:r=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");r.geometry.offset=new mxPoint(4,5);break;case 4:r=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;"); +r.geometry.offset=new mxPoint(4,7);break;case 5:r=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");r.geometry.offset=new mxPoint(4,7);break;case 6:r=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");r.geometry.offset=new mxPoint(4,5);break;case 7:r=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),r.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Lb=A(e,m),H=p(e,m),H=H.replace("strokeColor","fillColor"), +Lb=Lb.replace("fillColor","strokeColor");""==H&&(H="fillColor=#000000;");""==Lb&&(Lb="strokeColor=#ffffff;");r.style+=Lb+H+"part=1;"}else r.style+=A(e,m)+p(e,m)+"part=1;";r.geometry.relative=!0;r.vertex=!0;v.insert(r)}var Mb=0;0!=e.bpmnActivityMarker1&&Mb++;0!=e.bpmnActivityMarker2&&Mb++;var wa=0;1==Mb?wa=-7.5:2==Mb&&(wa=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+= +A(e,m)+p(e,m);break;case 2:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 3:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 4:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 5:r=new mxCell("", +new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");r.geometry.offset=new mxPoint(wa,-17);H=p(e,m);H=H.replace("strokeColor","fillColor");""==H&&(H="fillColor=#000000;");r.style+=H;break;case 6:r=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),r.geometry.offset=new mxPoint(wa,-18),r.style+=A(e,m)+p(e,m)}r.geometry.relative=!0;r.vertex=!0;v.insert(r)}2==Mb&&(wa=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:r= +new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 2:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 3:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 4:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;"); +r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 5:r=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");r.geometry.offset=new mxPoint(wa,-17);H=p(e,m);H=H.replace("strokeColor","fillColor");""==H&&(H="fillColor=#000000;");r.style+=H;break;case 6:r=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),r.geometry.offset=new mxPoint(wa,-18),r.style+=A(e,m)+p(e,m)}r.geometry.relative=!0;r.vertex=!0; +v.insert(r)}break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;"+A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+n(e)+C(e)+D(e);v.value=c(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(e.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+= +"outline=end;"}switch(e.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+= +"symbol=terminate;"}break;case "BPMNConversation":v.style+="shape=hexagon;"+A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+l(e);v.value=c(e.Text);v.style=0==e.bpmnConversationType?v.style+B(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(r=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),r.geometry.offset=new mxPoint(-6,-17),r.style+=A(e,m)+p(e,m),r.geometry.relative=!0,r.vertex=!0,v.insert(r));break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;"+ +A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+l(e);switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}break; +case "BPMNData":v.style+="shape=note;size=14;"+A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+l(e);switch(e.bpmnDataType){case 1:r=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");r.geometry.offset=new mxPoint(-6,-15);r.style+=A(e,m)+p(e,m);r.geometry.relative=!0;r.vertex=!0;v.insert(r);break;case 2:r=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");r.geometry.offset=new mxPoint(3,3);r.style+=A(e,m)+p(e,m);r.geometry.relative=!0;r.vertex=!0; +v.insert(r);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";R=new mxCell("",new mxGeometry(0,0,w,20),"strokeColor=none;fillColor=none;");R.geometry.offset=new mxPoint(0,14);R.geometry.relative=!0;R.vertex=!0;v.insert(R);R.value=c(e.Text);R.style+=l(e);break;case 3:r=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),r.geometry.offset=new mxPoint(3,3),r.style+=p(e,m),r.geometry.relative=!0,r.vertex=!0,v.insert(r),H=p(e,m),H=H.replace("strokeColor", +"fillColor"),""==H&&(H="fillColor=#000000;"),r.style+=H,R=new mxCell("",new mxGeometry(0,0,w,20),"strokeColor=none;fillColor=none;"),R.geometry.offset=new mxPoint(0,14),R.geometry.relative=!0,R.vertex=!0,v.insert(R),R.value=c(e.Text),R.style+=l(e)}break;case "BPMNBlackPool":v.style+=A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,w,t),"fillColor=#000000;strokeColor=none;opacity=30;");r.vertex=!0;v.insert(r);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;"; +r=new mxCell("",new mxGeometry(0,0,.95*w,.95*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e);x=new mxCell("",new mxGeometry(.05*w,.05*t,.95*w,.95*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Text);x.value=c(e.Text);break;case "GSDFDDataStoreBlock":v.style+="shape=partialRectangle;right=0;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Text);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,.2*w,t),"part=1;");r.vertex=!0;v.insert(r);r.style+= +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Number);r.value=c(e.Number);break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==q.Class?v.value=c(e.Text):"VSMProductionControlBlock"==q.Class&&(v.value=c(e.Resources));v.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+C(e)+D(e)+y(e);"VSMDedicatedProcessBlock"==q.Class&&(r=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"), +r.geometry.relative=!0,r.geometry.offset=new mxPoint(4,-13),r.vertex=!0,v.insert(r),r.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e));R=new mxCell("",new mxGeometry(0,0,w,15),"strokeColor=none;fillColor=none;part=1;");R.vertex=!0;v.insert(R);R.value=c(e.Title);R.style+=l(e.Title);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=c(e.Text);v.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+C(e)+n(e)+ +D(e);R=new mxCell("",new mxGeometry(.1*w,.3*t,.8*w,.6*t),"part=1;");R.vertex=!0;v.insert(R);R.value=c(e.Resource);R.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Resource);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+C(e)+D(e);v.value=c(e.Text);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";var ta=t,Ma=parseInt(e.Cells), +M=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+"part=1;";0<Ma&&(ta/=Ma);I=[];ha=[];for(k=1;k<=Ma;k++)I[k]=new mxCell("",new mxGeometry(0,(k-1)*ta,w,ta),M),I[k].vertex=!0,v.insert(I[k]),I[k].value=c(e["cell_"+k]),I[k].style+=l(e["cell_"+k]);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+n(e)+C(e)+D(e);v.value=c(e.Text);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;"+ +A(e,m);ta=t;Ma=parseInt(e.Cells);M=p(e,m)+z(e,m)+B(e)+"part=1;fillColor=none;";0<Ma&&(ta/=Ma);I=[];Ha=[];for(k=1;k<=Ma;k++)I[k]=new mxCell("",new mxGeometry(.5*w,(k-1)*ta,.5*w,ta),"shape=partialRectangle;left=0;"+M),I[k].vertex=!0,v.insert(I[k]),Ha[k]=new mxCell("",new mxGeometry(0,(k-1)*ta,w,ta),"strokeColor=none;fillColor=none;part=1;"),Ha[k].vertex=!0,v.insert(Ha[k]),Ha[k].value=c(e["cell_"+k]),Ha[k].style+=l(e["cell_"+k]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18"; +v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.17*w,.2*t,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+A(e,m)+z(e,m)+B(e);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";M="shape=card;size=18;flipH=1;part=1;"+p(e,m)+A(e,m)+z(e,m)+B(e);r=new mxCell("", +new mxGeometry(.1*w,0,.9*w,.8*t),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;");r.vertex=!0;v.insert(r);r.style+=M;x=new mxCell("",new mxGeometry(.05*w,.1*t,.9*w,.8*t),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=M;var G=new mxCell("",new mxGeometry(0,.2*t,.9*w,.8*t),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;");G.vertex=!0;v.insert(G);G.style+=M+ +l(e);G.value=c(e.Text);break;case "AWSRoundedRectangleContainerBlock2":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"), +x.geometry.relative=!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.Beanstalk?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"), +x.geometry.relative=!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.EC2?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),x.geometry.relative= +!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.Subnet?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),x.geometry.relative= +!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.VPC?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),x.geometry.relative= +!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.AWS?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),x.geometry.relative=!0,x.geometry.offset= +new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.Corporate?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),x.geometry.relative=!0,x.geometry.offset= +new mxPoint(30,0),x.vertex=!0,v.insert(x)):(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"+p(e,m)+l(e.Title)+F(e)+B(e),v.value=c(e.Title));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+l(e.Title)+A(e,m)+z(e,m)+E(e);v.value=c(e.Title);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+ +l(e.Title)+A(e,m)+z(e,m)+E(e);v.value=c(e.Title);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+l(e.Title)+A(e,m)+z(e,m)+E(e);v.value=c(e.Title);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";var V=new mxCell("",new mxGeometry(.25*w,.25*t,.5*w,.5*t),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");V.vertex=!0;v.insert(V);var aa=[V];V.style+=A(e, +m);var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;ka(.5*w,0,S,L,K,aa,v,V);ka(.855*w,.145*t,S,L,K,aa,v,V);ka(w,.5*t,S,L,K,aa,v,V);ka(.855*w,.855*t,S,L,K,aa,v,V);ka(.5*w,t,S,L,K,aa,v,V);ka(.145*w,.855*t,S,L,K,aa,v,V);ka(0,.5*t,S,L,K,aa,v,V);ka(.145*w,.145*t,S,L,K,aa,v,V);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";V=new mxCell("",new mxGeometry(0,.5*t- +10,w,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");V.vertex=!0;v.insert(V);aa=[V];S=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;for(var aa=[V],Nb=w/e.NumTopNodes,k=0;k<e.NumTopNodes;k++)ka(.5*Nb+k*Nb,0,S,L,K,aa,v,V);Nb=w/e.NumBottomNodes;for(k=0;k<e.NumBottomNodes;k++)ka(.5* +Nb+k*Nb,t,S,L,K,aa,v,V);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e);v.value=c(e.Title);e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);"EIMessageChannelBlock"== +q.Class?(r=new mxCell("",new mxGeometry(.5,.5,.9*w,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),r.geometry.offset=new mxPoint(.45*-w,0)):"EIDatatypeChannelBlock"==q.Class?(r=new mxCell("",new mxGeometry(.5,.5,.9*w,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),r.geometry.offset=new mxPoint(.45*-w,0)):"EIInvalidMessageChannelBlock"==q.Class?(r=new mxCell("",new mxGeometry(.5,.5,.9*w,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),r.geometry.offset= +new mxPoint(.45*-w,0)):"EIDeadLetterChannelBlock"==q.Class?(r=new mxCell("",new mxGeometry(.5,.5,.9*w,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),r.geometry.offset=new mxPoint(.45*-w,0)):"EIGuaranteedDeliveryBlock"==q.Class&&(r=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),r.geometry.offset=new mxPoint(-10,-7));r.geometry.relative=!0;r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); +S.geometry.relative=!0;S.edge=!0;ea(.15*w,.25*t,.85*w,.25*t,S,L,K,aa,v,V);break;case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,.07*t,.21*w,.86*t),"fillColor=#FFFF33;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e)+F(e);x=new mxCell("",new mxGeometry(.26*w,.09*t,.2*w,.82*t),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");x.vertex=!0;v.insert(x); +x.style+=p(e,m)+z(e,m)+B(e)+F(e);G=new mxCell("",new mxGeometry(1,.5,.35*w,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");G.geometry.relative=!0;G.geometry.offset=new mxPoint(.4*-w,-10);G.vertex=!0;v.insert(G);G.style+=p(e,m)+z(e,m)+B(e)+F(e);O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");O.geometry.relative=!0;O.edge=!0;r.insertEdge(O,!0);x.insertEdge(O, +!1);O.style+=p(e,m);L.push(K.addCell(O,null,null,null,null));N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");N.geometry.relative=!0;N.edge=!0;x.insertEdge(N,!0);G.insertEdge(N,!1);L.push(K.addCell(N,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+= +"strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);for(var Ob=e.Messages,dc=(t-17)/Ob,x=[],S=[],k=0;k<Ob;k++){var Pb=dc*(k+1)-3;x[k]=new mxCell("",new mxGeometry(w-20,Pb,20,20),"part=1;");x[k].vertex=!0;v.insert(x[k]);x[k].style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e);switch(q.Class){case "EIMessageBlock":x[k].value=c(e["message_"+ +(k+1)]);x.style+=l(e["message_"+(k+1)]);break;case "EICommandMessageBlock":x[k].value="C";x[k].style+="fontStyle=1;fontSize=10;";break;case "EIDocumentMessageBlock":x[k].value="D";x[k].style+="fontStyle=1;fontSize=10;";break;case "EIEventMessageBlock":x[k].value="E",x[k].style+="fontStyle=1;fontSize=10;"}S[k]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");S[k].geometry.relative=!0;S[k].edge=!0;r.insertEdge(S[k],!1); +x[k].insertEdge(S[k],!0);S[k].style+=p(e,m)+B(e);var eb=[];eb.push(new mxPoint(fa+8.5,na+Pb+10));S[k].geometry.points=eb;L.push(K.addCell(S[k],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.45*w,.25*t,.3*w,.5*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); +S.geometry.relative=!0;S.edge=!0;ea(0,.5*t,.4*w,.5*t,S,L,K,aa,v,V);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);var O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");O.geometry.relative=!0;O.edge=!0;ea(.05*w,.5*t,.85*w,.5*t,O,L,K,aa,v,V);var N=new mxCell("",new mxGeometry(0,0,0,0), +"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");N.geometry.relative=!0;N.edge=!0;ea(.05*w,.5*t,.85*w,.15*t,N,L,K,aa,v,V);var X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");X.geometry.relative=!0;X.edge=!0;ea(.05*w,.5*t,.85*w,.85*t,X,L,K,aa,v,V);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");O.geometry.relative=!0;O.edge=!0;O.style+=p(e,m);ea(.05*w,.5*t,.95*w,.5*t,O,L,K,aa,v,V);N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); +N.geometry.relative=!0;N.edge=!0;N.style+=p(e,m);ea(.3*w,.1*t,.3*w,.5*t,N,L,K,aa,v,V);X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");X.geometry.relative=!0;X.edge=!0;X.style+=p(e,m);ea(.7*w,.1*t,.7*w,.5*t,X,L,K,aa,v,V);var ja=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); +ja.geometry.relative=!0;ja.edge=!0;ja.style+=p(e,m);ea(.5*w,.5*t,.5*w,.9*t,ja,L,K,aa,v,V);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.2*w,.21*t,.16*w,.24*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e);O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); +O.geometry.relative=!0;O.edge=!0;ea(.45*w,.33*t,.8*w,.33*t,O,L,K,aa,v,V);x=new mxCell("",new mxGeometry(.64*w,.55*t,.16*w,.24*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+z(e,m)+B(e);N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");N.geometry.relative=!0;N.edge=!0;ea(.55*w,.67*t,.2*w,.67*t,N,L,K,aa,v,V);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.1*w,.15*t,.8*w,.7*t),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.04*w,.06*t,.18*w,.28*t),"shape=ellipse;fillColor=#808080;part=1;");r.vertex=!0;v.insert(r);r.style+= +p(e,m)+B(e);x=new mxCell("",new mxGeometry(.2*w,.56*t,.2*w,.32*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+z(e,m)+B(e)+F(e);x.value="A";x.style+="fontStyle=1;fontSize=10;";O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");O.geometry.relative=!0;O.edge=!0;r.insertEdge(O,!1);x.insertEdge(O,!0);O.style+=p(e,m)+B(e);eb=[];eb.push(new mxPoint(fa+.13*w,na+.72*t));O.geometry.points=eb;L.push(K.addCell(O,null, +null,null,null));G=new mxCell("",new mxGeometry(.6*w,.06*t,.18*w,.28*t),"shape=ellipse;fillColor=#808080;part=1;");G.vertex=!0;v.insert(G);G.style+=p(e,m)+B(e);Q=new mxCell("",new mxGeometry(.76*w,.56*t,.2*w,.32*t),"part=1;");Q.vertex=!0;v.insert(Q);Q.style+=p(e,m)+z(e,m)+B(e)+F(e);Q.value="B";Q.style+="fontStyle=1;fontSize=10;";N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");N.geometry.relative=!0;N.edge=!0; +G.insertEdge(N,!1);Q.insertEdge(N,!0);N.style+=p(e,m)+B(e);var nc=[];nc.push(new mxPoint(fa+.69*w,na+.72*t));N.geometry.points=nc;L.push(K.addCell(N,null,null,null,null));X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");X.geometry.relative=!0;X.edge=!0;r.insertEdge(X,!1);G.insertEdge(X,!0);X.style+=p(e,m)+B(e);L.push(K.addCell(X,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("1",new mxGeometry(.2*w,.4*t,.1*w,.19*t),"fontStyle=1;fontSize=10;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);x=new mxCell("2",new mxGeometry(.45*w,.4*t,.1*w,.19*t),"fontStyle=1;fontSize=10;part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+B(e);G=new mxCell("3",new mxGeometry(.7*w,.4*t,.1*w,.19*t),"fontStyle=1;fontSize=10;part=1;");G.vertex=!0;v.insert(G);G.style+=p(e,m)+B(e);O=new mxCell("",new mxGeometry(0,0,0,0), +"curved=1;endArrow=block;html=1;endSize=3;part=1;");r.insertEdge(O,!1);x.insertEdge(O,!0);O.geometry.points=[new mxPoint(fa+.375*w,na+.15*t)];O.geometry.relative=!0;O.edge=!0;O.style+=p(e,m)+B(e);L.push(K.addCell(O,null,null,null,null));N=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");x.insertEdge(N,!1);G.insertEdge(N,!0);N.geometry.points=[new mxPoint(fa+.675*w,na+.15*t)];N.geometry.relative=!0;N.edge=!0;N.style+=p(e,m)+B(e);L.push(K.addCell(N,null,null, +null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.3*w,.2*t,.4*w,.6*t),"shape=mxgraph.ios7.icons.clock;flipH=1;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+h(e)+f(e)+b(e)+a(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.38* +w,.42*t,.24*w,.16*t),"part=1;fillColor=#aefe7d;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);x=new mxCell("",new mxGeometry(.38*w,0,.24*w,.16*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=A(e,m)+p(e,m)+B(e);G=new mxCell("",new mxGeometry(.76*w,.23*t,.24*w,.16*t),"part=1;");G.vertex=!0;v.insert(G);G.style=x.style;var Q=new mxCell("",new mxGeometry(.76*w,.61*t,.24*w,.16*t),"part=1;");Q.vertex=!0;v.insert(Q);Q.style=x.style;var Yb=new mxCell("",new mxGeometry(.38*w,.84*t,.24*w,.16*t),"part=1;");Yb.vertex= +!0;v.insert(Yb);Yb.style=x.style;var Zb=new mxCell("",new mxGeometry(0,.61*t,.24*w,.16*t),"part=1;");Zb.vertex=!0;v.insert(Zb);Zb.style=x.style;var $b=new mxCell("",new mxGeometry(0,.23*t,.24*w,.16*t),"part=1;");$b.vertex=!0;v.insert($b);$b.style=x.style;O=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(O,!1);x.insertEdge(O,!0);O.edge=!0;O.style+=p(e,m)+B(e);L.push(K.addCell(O,null,null,null,null));N=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(N, +!1);G.insertEdge(N,!0);N.edge=!0;N.style+=p(e,m)+B(e);L.push(K.addCell(N,null,null,null,null));X=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(X,!1);Q.insertEdge(X,!0);X.edge=!0;X.style+=p(e,m)+B(e);L.push(K.addCell(X,null,null,null,null));ja=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(ja,!1);Yb.insertEdge(ja,!0);ja.edge=!0;ja.style+=p(e,m)+B(e);L.push(K.addCell(ja,null,null,null,null));var ub=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;"); +r.insertEdge(ub,!1);Zb.insertEdge(ub,!0);ub.edge=!0;ub.style+=p(e,m)+B(e);L.push(K.addCell(ub,null,null,null,null));var vb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(vb,!1);$b.insertEdge(vb,!0);vb.edge=!0;vb.style+=p(e,m)+B(e);L.push(K.addCell(vb,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;"); +O.geometry.relative=!0;O.edge=!0;ea(.05*w,.5*t,.6*w,.25*t,O,L,K,aa,v,V);N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");N.geometry.relative=!0;N.edge=!0;ea(.05*w,.5*t,.6*w,.75*t,N,L,K,aa,v,V);r=new mxCell("",new mxGeometry(.7*w,.1*t,.15*w,.32*t),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.25*w,.25*t,.5*w,.5*t),"shape=mxgraph.eip.control_bus;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);G=new mxCell("",new mxGeometry(w- +45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");G.vertex=!0;v.insert(G);G.style+=p(e,m)+B(e);X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");X.geometry.relative=!0;X.edge=!0;r.insertEdge(X,!1);G.insertEdge(X,!0);X.style+=p(e,m)+B(e);X.geometry.points=[new mxPoint(fa+8.5,na+40)];L.push(K.addCell(X,null,null,null,null));Q=new mxCell("",new mxGeometry(w-45,t-20,20,20),"part=1;");Q.vertex=!0; +v.insert(Q);Q.value=c(e.message_0);Q.style+=l(e.message_0);Q.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e);ja=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");ja.geometry.relative=!0;ja.edge=!0;r.insertEdge(ja,!1);Q.insertEdge(ja,!0);ja.style+=p(e,m)+B(e);ja.geometry.points=[new mxPoint(fa+8.5,na+t-10)];L.push(K.addCell(ja,null,null,null,null));Ob=e.HistoryMessages;dc=(t-75)/Ob;x=[];S=[];for(k=0;k<Ob;k++)Pb=dc*(k+1)+30, +x[k]=new mxCell("",new mxGeometry(w-20,Pb,20,20),"part=1;"),x[k].vertex=!0,x[k].value=c(e["message_"+(k+1)]),x.style+=l(e["message_"+(k+1)]),v.insert(x[k]),x[k].style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e),S[k]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),S[k].geometry.relative=!0,S[k].edge=!0,G.insertEdge(S[k],!1),x[k].insertEdge(S[k],!0),S[k].style+=p(e,m)+B(e),eb=[],eb.push(new mxPoint(fa+w-30,na+Pb+10)),S[k].geometry.points= +eb,L.push(K.addCell(S[k],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;"+p(e,m)+z(e,m)+E(e)+B(e)+P(e,m,v);F(e);0>e.DoorAngle&&(v.style+="flipV=1;");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;"+p(e,m)+z(e,m)+E(e)+B(e)+P(e,m,v)+F(e);0<e.DoorAngle&&(v.style+="flipV=1;");break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;"+P(e,m,v);r=new mxCell("",new mxGeometry(0,0,w,.25*t),"part=1;");r.vertex=!0;v.insert(r);r.style+= +p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e);for(var x=[],oc=.02*w,ec=(w-2*oc)/e.LightCount,pc=.8*ec,k=0;k<e.LightCount;k++)x[k]=new mxCell("",new mxGeometry(oc+ec*k+(ec-pc)/2,.25*t,pc,.75*t),"part=1;shape=ellipse;"),x[k].vertex=!0,v.insert(x[k]),x[k].style+=p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;"+P(e,m,v);for(var r=[],qc=w/e.SinkCount,k=0;k<e.SinkCount;k++)r[k]=new mxCell("",new mxGeometry(qc*k,0,qc,t),"part=1;shape=mxgraph.floorplan.sink_2;"), +r[k].vertex=!0,v.insert(r[k]),r[k].style+=p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var xa=.1*w/e.StallCount,r=new mxCell("",new mxGeometry(0,0,xa,t),"fillColor=#000000;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);for(var Fa=(w-xa)/e.StallCount,fc=[],Qb=[],Rb=[],Sb=[],H=p(e,m),H=""==H?"#000000;":H.replace("stokreColor=",""),rc="part=1;fillColor="+H+p(e,m)+B(e),gc=A(e,m)+p(e,m)+B(e),k=0;k<e.StallCount;k++)fc[k]=new mxCell("", +new mxGeometry((k+1)*Fa,0,xa,t),rc),fc[k].vertex=!0,v.insert(fc[k]),Rb[k]=new mxCell("",new mxGeometry(xa+k*Fa+.05*(Fa-xa),t-.92*(Fa-xa),.9*(Fa-xa),.92*(Fa-xa)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Rb[k].vertex=!0,v.insert(Rb[k]),Rb[k].style+=gc,Qb[k]=new mxCell("",new mxGeometry(xa+k*Fa+.2*(Fa-xa),0,.6*(Fa-xa),.8*(Fa-xa)),"shape=mxgraph.floorplan.toilet;part=1;"),Qb[k].vertex=!0,v.insert(Qb[k]),Qb[k].style+=gc,Sb[k]=new mxCell("",new mxGeometry(xa+k*Fa,.42*t,.15*(Fa-xa),.12*(Fa-xa)), +"part=1;"),Sb[k].vertex=!0,v.insert(Sb[k]),Sb[k].style+=gc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ac="edgeStyle=none;endArrow=none;part=1;"+p(e,m)+B(e)+z(e,m)+E(e)+F(e),H=p(e,m),H=""==H?"#000000;":H.replace("stokreColor=",""),hc="shape=triangle;part=1;fillColor="+H+p(e,m)+B(e)+z(e,m)+E(e)+F(e),O=new mxCell("",new mxGeometry(0,0,0,0),ac);O.geometry.relative=!0;O.edge=!0;ea(0,.5*t,.65*w,.5*t,O,L,K,aa,v,V);for(var J=t/e.numLines,N=[],hb=[],k=0;k<e.numLines;k++)N[k]= +new mxCell("",new mxGeometry(0,0,0,0),ac),N[k].geometry.relative=!0,N[k].edge=!0,ea(.65*w,.5*t,.96*w,(k+.5)*J,N[k],L,K,aa,v,V),hb[k]=new mxCell("",new mxGeometry(.95*w,(k+.2)*J,.05*w,.6*J),hc),hb[k].vertex=!0,v.insert(hb[k]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";ac="edgeStyle=none;endArrow=none;part=1;"+p(e,m)+B(e)+z(e,m)+E(e)+F(e);H=p(e,m);H=""==H?"#000000;":H.replace("stokreColor=","");hc="shape=triangle;part=1;fillColor="+H+p(e,m)+B(e)+z(e,m)+E(e)+F(e);J=t/e.numLines; +N=[];hb=[];for(k=0;k<e.numLines;k++)N[k]=new mxCell("",new mxGeometry(0,0,0,0),ac),N[k].geometry.relative=!0,N[k].edge=!0,ea(0,(k+.5)*J,.96*w,(k+.5)*J,N[k],L,K,aa,v,V),hb[k]=new mxCell("",new mxGeometry(.95*w,(k+.2)*J,.05*w,.6*J),hc),hb[k].vertex=!0,v.insert(hb[k]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e)+l(e);v.value=c(e.Text);switch(e.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break; +case 2:v.style+="shape=hexagon;size=0.10;direction=south;"}break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e)+l(e);v.value=c(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e)+l(e);v.value= +c(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;"+P(e,m,v)+l(e);v.value=c(e.Text);M=p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e);r=new mxCell("",new mxGeometry(0,.2*t,w,.6*t),"part=1;shape=trapezoid;direction=south;");r.vertex=!0;v.insert(r);r.style+=M;M+="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(O=new mxCell("",new mxGeometry(0, +0,0,0),""),O.geometry.relative=!0,O.edge=!0,O.style+=M,ea(0,0,0,.2*t,O,L,K,aa,v,V),N=new mxCell("",new mxGeometry(0,0,0,0),""),N.geometry.relative=!0,N.edge=!0,N.style+=M,ea(w,.67*t,w,t,N,L,K,aa,v,V)):(r.style+="flipH=1;",O=new mxCell("",new mxGeometry(0,0,0,0),""),O.geometry.relative=!0,O.edge=!0,O.style+=M,ea(0,0,0,.33*t,O,L,K,aa,v,V),N=new mxCell("",new mxGeometry(0,0,0,0),""),N.geometry.relative=!0,N.edge=!0,N.style+=M,ea(w,.8*t,w,t,N,L,K,aa,v,V));1==e.centerLineType&&(X=new mxCell("",new mxGeometry(0, +0,0,0),""),X.geometry.relative=!0,X.edge=!0,X.style+=M,ea(.2*w,.5*t,.8*w,.5*t,X,L,K,aa,v,V));break;case "PEMotorDrivenTurbineBlock":M=p(e,m)+A(e,m)+B(e)+z(e,m)+F(e);v.style+="shape=ellipse;"+E(e)+P(e,m,v)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.2*w,.2*t,.6*w,.6*t),"part=1;shape=trapezoid;direction=south;");r.vertex=!0;v.insert(r);r.style+=M;break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":M= +z(e,m);v.style+=M+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);switch(q.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+= +"shape=mxgraph.pid2inst.progLogCont;"}"PEIndicator2Block"==q.Class||"PESharedIndicator2Block"==q.Class?(r=new mxCell("",new mxGeometry(0,0,w,.5*w),"part=1;strokeColor=none;fillColor=none;"),r.vertex=!0,v.insert(r),r.style+=M+l(e.TopText),r.value=c(e.TopText),x=new mxCell("",new mxGeometry(0,.5*w,w,.5*w),"part=1;strokeColor=none;fillColor=none;")):(r=new mxCell("",new mxGeometry(0,0,w,.5*t),"part=1;strokeColor=none;fillColor=none;"),r.vertex=!0,v.insert(r),r.style+=M+l(e.TopText),r.value=c(e.TopText), +x=new mxCell("",new mxGeometry(0,.5*t,w,.5*t),"part=1;strokeColor=none;fillColor=none;"));x.vertex=!0;v.insert(x);x.style+=M;l(e.BotText);x.value=c(e.BotText);switch(e.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var ic=!1;"PEPoweredValveBlock"== +q.Class?1!=e.poweredHandOperated&&(ic=!0):1!=e.handOperated&&(ic=!0);if(ic){var e=u(q).Properties,Y=e.BoundingBox,sc=Y.h;Y.h="PEAngleValveBlock"==q.Class||"PEAngleGlobeValveBlock"==q.Class?.7*Y.h:.6*Y.h;v=new mxCell("",new mxGeometry(Math.round(.6*Y.x+0),Math.round(.6*(Y.y+sc-Y.h)+0),Math.round(.6*Y.w),Math.round(.6*Y.h)),"");v.vertex=!0;Z(v,q)}if("PEPoweredValveBlock"==q.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;"+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+ +E(e)+P(e,m,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",r=new mxCell("",new mxGeometry(.325*w,0,.35*w,.35*t),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),r.vertex=!0,v.insert(r),r.style+=M+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+"fontSize=6;"+f(e.PoweredText)+b(e.PoweredText)+a(e.PoweredText)+d(e.PoweredText)+g(e.PoweredText)+C(e.PoweredText)+D(e.PoweredText)+y(e.PoweredText),r.value=c(e.PoweredText)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;"+ +z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v)+h(e)+f(e)+b(e)+a(e);v.value=c(e.Text);switch(q.Class){case "PEGateValveBlock":v.style+="valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;"+z(e,m)+p(e,m)+ +A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);1==e.vScroll&&(G=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(-20,110),G.vertex=!0,v.insert(G),v.style+="spacingRight=20;");1==e.hScroll&&(Q=1==e.vScroll?new mxCell("",new mxGeometry(0, +1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),Q.geometry.relative=!0,Q.geometry.offset=new mxPoint(0,-20),Q.vertex=!0,v.insert(Q));break;case "UI2WindowBlock":v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v)+h(e.Title)+f(e.Title)+b(e.Title);v.value= +c(e.Title);1==e.vScroll&&(G=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(-20,30),G.vertex=!0,v.insert(G),v.style+="spacingRight=20;");1==e.hScroll&&(Q=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"): +new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),Q.geometry.relative=!0,Q.geometry.offset=new mxPoint(0,-20),Q.vertex=!0,v.insert(Q));break;case "UI2DialogBlock":v.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v)+l(e.Text);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,w,30),"part=1;resizeHeight=0;");r.vertex=!0;v.insert(r);r.style+=M+l(e.Title);r.value=c(e.Title);x=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;"); +x.geometry.relative=!0;x.geometry.offset=new mxPoint(-25,-10);x.vertex=!0;r.insert(x);1==e.vScroll&&(G=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(-20,30),G.vertex=!0,v.insert(G),v.style+="spacingRight=20;"); +1==e.hScroll&&(Q=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),Q.geometry.relative=!0,Q.geometry.offset=new mxPoint(0,-20),Q.vertex=!0,v.insert(Q));break;case "UI2AccordionBlock":v.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);r=[];J=25;for(k=0;k<=e.Panels-1;k++)r[k]=k<e.Selected-1?new mxCell("", +new mxGeometry(0,k*J,w,J),"part=1;fillColor=#000000;fillOpacity=25;"):k==e.Selected-1?new mxCell("",new mxGeometry(0,k*J,w,J),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,t-(e.Panels-e.Selected)*J+(k-e.Selected)*J,w,J),"part=1;fillColor=#000000;fillOpacity=25;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=l(e["Panel_"+(k+1)]),r[k].value=c(e["Panel_"+(k+1)]),r[k].style.includes(";align=")||(r[k].style+="align=left;spacingLeft=5;");var da=p(e,m),da=da.replace("strokeColor","fillColor2");""== +da&&(da="fillColor2=#000000;");1==e.vScroll&&(x=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-e.Selected*J-20-(e.Panels-e.Selected)*J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-e.Selected*J-(e.Panels-e.Selected)*J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(-20,e.Selected*J),x.vertex=!0,v.insert(x),v.style+= +"spacingRight=20;",x.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));1==e.hScroll&&(G=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*J),G.vertex=!0,v.insert(G),G.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));Q=1==e.vScroll?new mxCell("", +new mxGeometry(0,e.Selected*J,w-20,t-e.Selected*J-20-(e.Panels-e.Selected)*J),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*J,w-20,t-e.Selected*J-(e.Panels-e.Selected)*J),"part=1;fillColor=none;strokeColor=none;");Q.vertex=!0;v.insert(Q);Q.style+=l(e.Content_1);Q.style.includes(";align=")||(Q.style+="align=left;spacingLeft=5;");Q.value=c(e.Content_1);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var r=[],x=[],J=25,Ba=3,T=(w+ +Ba)/(e.Tabs+1),Ca=new mxCell("",new mxGeometry(0,J,w,t-J),"part=1;");Ca.vertex=!0;v.insert(Ca);Ca.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);for(k=0;k<=e.Tabs-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(10+k*T,0,T-Ba,J),""),x[k].vertex=!0,v.insert(x[k]),x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Tab_"+(k+1)])):(r[k]=new mxCell("",new mxGeometry(10+k*T,0,T-Ba,J),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e),x[k]=new mxCell("",new mxGeometry(0, +0,T-Ba,J),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Tab_"+(k+1)])),x[k].value=c(e["Tab_"+(k+1)]),x[k].style.includes(";align=")||(x[k].style+="align=left;spacingLeft=2;");da=p(e,m);da=da.replace("strokeColor","fillColor2");""==da&&(da="fillColor2=#000000;");1==e.vScroll&&(x=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-20-J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("", +new mxGeometry(1,0,20,t-J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(-20,J),x.vertex=!0,v.insert(x),v.style+="spacingRight=20;",x.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));1==e.hScroll&&(G=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), +G.geometry.relative=!0,G.geometry.offset=new mxPoint(0,-20),G.vertex=!0,v.insert(G),G.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";r=[];x=[];J=25;Ba=3;T=(w+Ba)/e.Tabs;Ca=new mxCell("",new mxGeometry(0,J,w,t-J),"part=1;");Ca.vertex=!0;v.insert(Ca);Ca.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);for(k=0;k<=e.Tabs-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(k*T,0,T-Ba,J),""),x[k].vertex=!0,v.insert(x[k]), +x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Tab_"+(k+1)])):(r[k]=new mxCell("",new mxGeometry(k*T,0,T-Ba,J),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e),x[k]=new mxCell("",new mxGeometry(0,0,T-Ba,J),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Tab_"+(k+1)])),x[k].value=c(e["Tab_"+(k+1)]),x[k].style.includes(";align=")||(x[k].style+="align=left;spacingLeft=2;");da=p(e,m);da=da.replace("strokeColor", +"fillColor2");""==da&&(da="fillColor2=#000000;");1==e.vScroll&&(x=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-20-J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(-20,J),x.vertex=!0,v.insert(x),v.style+="spacingRight=20;",x.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+ +F(e));1==e.hScroll&&(G=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(0,-20),G.vertex=!0,v.insert(G),G.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";r=[];x=[];Ba=3;J=25+Ba; +T=80;ab=10;Ca=new mxCell("",new mxGeometry(T,0,w-T,t),"part=1;");Ca.vertex=!0;v.insert(Ca);Ca.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);for(k=0;k<=e.Tabs-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(0,ab+k*J,T,J-Ba),""),x[k].vertex=!0,v.insert(x[k]),x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Tab_"+(k+1)])):(r[k]=new mxCell("",new mxGeometry(0,ab+k*J,T,J-Ba),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e),x[k]=new mxCell("",new mxGeometry(0, +0,T,J-Ba),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Tab_"+(k+1)])),x[k].value=c(e["Tab_"+(k+1)]),x[k].style.includes(";align=")||(x[k].style+="align=left;spacingLeft=2;");da=p(e,m);da=da.replace("strokeColor","fillColor2");""==da&&(da="fillColor2=#000000;");1==e.vScroll&&(x=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1, +0,20,t),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(-20,0),x.vertex=!0,v.insert(x),v.style+="spacingRight=20;",x.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));1==e.hScroll&&(G=1==e.vScroll?new mxCell("",new mxGeometry(T,1,w-20-T,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(T,1,w-T,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), +G.geometry.relative=!0,G.geometry.offset=new mxPoint(0,-20),G.vertex=!0,v.insert(G),G.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";J=t/e.Options;r=[];x=[];for(k=0;k<e.Options;k++)r[k]=new mxCell("",new mxGeometry(0,k*J+.5*J-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Option_"+ +(k+1)]),null!=e.Selected[k+1]&&1==e.Selected[k+1]&&(H=p(e,m),H=H.replace("strokeColor","fillColor"),""==H&&(H="fillColor=#000000;"),x[k]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=H+z(e,m)+p(e,m)+B(e)+F(e)),r[k].value=c(e["Option_"+(k+1)]);break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";T=w/e.Options;r=[];x=[];for(k=0;k<e.Options;k++)r[k]=new mxCell("",new mxGeometry(k*T,.5* +t-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Option_"+(k+1)]),null!=e.Selected[k+1]&&1==e.Selected[k+1]&&(H=p(e,m),H=H.replace("strokeColor","fillColor"),""==H&&(H="fillColor=#000000;"),x[k]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=H+z(e,m)+p(e,m)+B(e)+F(e)), +r[k].value=c(e["Option_"+(k+1)]);break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";J=t/e.Options;r=[];x=[];for(k=0;k<e.Options;k++)r[k]=new mxCell("",new mxGeometry(0,k*J+.5*J-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Option_"+(k+1)]),null!=e.Selected&&e.Selected==k+1&&(H=p(e,m),H=H.replace("strokeColor","fillColor"), +""==H&&(H="fillColor=#000000;"),x[k]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=H+z(e,m)+p(e,m)+B(e)+F(e)),r[k].value=c(e["Option_"+(k+1)]);break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";T=w/e.Options;r=[];x=[];for(k=0;k<e.Options;k++)r[k]=new mxCell("",new mxGeometry(k*T,.5*t-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), +r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Option_"+(k+1)]),null!=e.Selected&&e.Selected==k+1&&(H=p(e,m),H=H.replace("strokeColor","fillColor"),""==H&&(H="fillColor=#000000;"),x[k]=new mxCell("",new mxGeometry(2,2,6,6),"shape=ellipse;part=1;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=H+z(e,m)+p(e,m)+B(e)+F(e)),r[k].value=c(e["Option_"+(k+1)]);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;"+ +z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e);"UI2VSliderBlock"==q.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";r=new mxCell("",new mxGeometry(0,0,.6*w,t),"part=1;");r.vertex=!0;v.insert(r);r.style+=z(e,m)+p(e,m)+B(e)+F(e)+E(e)+l(e.Date);r.value=c(e.Date);H=p(e,m);H=H.replace("strokeColor","fillColor");""==H&&(H="fillColor=#000000;");x=new mxCell("",new mxGeometry(.75*w,0,.25*w,t),"part=1;shape=mxgraph.gmdl.calendar;"); +x.vertex=!0;v.insert(x);x.style+=H+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e);break;case "UI2SearchBlock":v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+z(e,m)+p(e,m)+B(e)+F(e)+E(e)+h(e.Search)+f(e.Search)+b(e.Search);v.value=c(e.Search);break;case "UI2NumericStepperBlock":H=p(e,m);H=H.replace("strokeColor","fillColor");""==H&&(H="fillColor=#000000;");v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+ +H+z(e,m)+p(e,m)+B(e)+F(e)+E(e)+h(e.Number)+f(e.Number)+b(e.Number);v.value=c(e.Number);break;case "UI2ButtonBarBlock":v.style+=z(e,m)+p(e,m)+B(e)+F(e)+E(e);r=[];x=[];T=w/e.Buttons;for(k=0;k<=e.Buttons-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(k*T,0,T,t),""),x[k].vertex=!0,v.insert(x[k]),x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Button_"+(k+1)])):(r[k]=new mxCell("",new mxGeometry(k*T,0,T,t),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e), +x[k]=new mxCell("",new mxGeometry(0,0,T,t),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Button_"+(k+1)])),x[k].value=c(e["Button_"+(k+1)]);break;case "UI2VerticalButtonBarBlock":v.style+=z(e,m)+p(e,m)+B(e)+F(e)+E(e);r=[];x=[];J=t/e.Buttons;for(k=0;k<=e.Buttons-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(0,k*J,w,J),""),x[k].vertex=!0,v.insert(x[k]),x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Button_"+(k+1)])):(r[k]=new mxCell("", +new mxGeometry(0,k*J,w,J),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e),x[k]=new mxCell("",new mxGeometry(0,0,w,J),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Button_"+(k+1)])),x[k].value=c(e["Button_"+(k+1)]);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;"+z(e,m)+p(e,m)+B(e)+F(e)+E(e);r=[];x=[];T=w/e.Links;for(k=0;k<e.Links;k++)0!=k?(x[k]=new mxCell("",new mxGeometry(k*T,0,T,t), +"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),x[k].style+=z(e,m)+E(e)+p(e,m)+B(e)+F(e)):x[k]=new mxCell("",new mxGeometry(k*T,0,T,t),"fillColor=none;strokeColor=none;"),x[k].vertex=!0,v.insert(x[k]),x[k].style+=l(e["Link_"+(k+1)]),x[k].value=c(e["Link_"+(k+1)]);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;"+z(e,m)+p(e,m)+B(e)+F(e)+E(e);r=[];x=[];T=w/e.Links;for(k=0;k<e.Links;k++)r[k]=new mxCell("",new mxGeometry(k*T,0,T,t),"fillColor=none;strokeColor=none;"), +r[k].vertex=!0,v.insert(r[k]),r[k].style+=l(e["Link_"+(k+1)]),r[k].value=c(e["Link_"+(k+1)]);for(k=1;k<e.Links;k++)x[k]=new mxCell("",new mxGeometry(k/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),x[k].geometry.relative=!0,x[k].geometry.offset=new mxPoint(-3,-5),x[k].vertex=!0,v.insert(x[k]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;"+z(e,m)+A(e,m)+E(e);r=[];T=w/(e.Buttons+1);for(k=0;k<=e.Buttons-1;k++)r[k]=k!=e.Selected-1?new mxCell("",new mxGeometry(0,0,T,t),"strokeColor=none;fillColor=none;resizeHeight=1;"): +new mxCell("",new mxGeometry(0,0,T,t),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),r[k].geometry.relative=!0,r[k].geometry.offset=new mxPoint(k*T,0),r[k].vertex=!0,v.insert(r[k]),r[k].style+=l(e["MenuItem_"+(k+1)]),r[k].value=c(e["MenuItem_"+(k+1)]);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+l(e.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+l(e.Text_prev); +v.value=c(e.Text_prev)+" ";for(k=0;k<e.Links;k++)v.value+=c(e["Link_"+(k+1)])+" ";v.value+=c(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=z(e,m)+A(e,m)+p(e,m)+B(e)+F(e)+E(e);for(var I=[],$a=[],wb=[],J=t/e.Lines,M=null,k=0;k<e.Lines;k++)null!=e["Item_"+(k+1)]&&(null==M&&(M=""+h(e["Item_"+(k+1)])+f(e["Item_"+(k+1)])+b(e["Item_"+(k+1)])),I[k]=new mxCell("",new mxGeometry(0,k*t/e.Lines,w,J),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),I[k].vertex=!0,v.insert(I[k]),I[k].style+= +M,I[k].value=c(e["Item_"+(k+1)])),null!=e.Icons[k+1]&&null!=I[k]&&("dot"==e.Icons[k+1]?($a[k]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),$a[k].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[k+1]&&($a[k]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),$a[k].geometry.offset=new mxPoint(6.5,-4)),null!=$a[k]&&($a[k].geometry.relative=!0,$a[k].vertex=!0,I[k].insert($a[k]),H=p(e,m),H=H.replace("strokeColor","fillColor"), +""==H&&(H="fillColor=#000000;"),$a[k].style+=H)),null!=e["Shortcut_"+(k+1)]&&(null==M&&(M=""+h(e["Shortcut_"+(k+1)])+f(e["Shortcut_"+(k+1)])+b(e["Shortcut_"+(k+1)])),wb[k]=new mxCell("",new mxGeometry(.6*w,k*t/e.Lines,.4*w,J),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),wb[k].vertex=!0,v.insert(wb[k]),wb[k].style+=M,wb[k].value=c(e["Shortcut_"+(k+1)])),null!=e.Dividers[k+1]&&(I[k]=new mxCell("",new mxGeometry(.05*w,k*t/e.Lines,.9*w,J),"shape=line;strokeWidth=0.25;"),I[k].vertex= +!0,v.insert(I[k]),I[k].style+=p(e,m));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "UI2TooltipSquareBlock":v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+z(e,m)+A(e,m)+p(e,m)+B(e)+F(e)+E(e)+l(e.Tip);v.value=c(e.Tip);break;case "UI2CalloutBlock":v.style+="shape=ellipse;"+z(e,m)+A(e,m)+p(e,m)+B(e)+F(e)+E(e)+l(e.Txt);v.value=c(e.Txt); +break;case "UI2AlertBlock":v.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v)+l(e.Txt);v.value=c(e.Txt);r=new mxCell("",new mxGeometry(0,0,w,30),"part=1;resizeHeight=0;");r.vertex=!0;v.insert(r);r.style+=M+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+l(e.Title);r.value=c(e.Title);x=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");x.geometry.relative=!0;x.geometry.offset=new mxPoint(-25,-10);x.vertex=!0;r.insert(x);for(var tc=45*e.Buttons+ +(10*e.Buttons-1),G=[],k=0;k<e.Buttons;k++)G[k]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),G[k].geometry.relative=!0,G[k].geometry.offset=new mxPoint(.5*-tc+55*k,-40),G[k].vertex=!0,v.insert(G[k]),G[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+l(e["Button_"+(k+1)]),G[k].value=c(e["Button_"+(k+1)]);break;case "UMLClassBlock":if(0==e.Simple){var M=A(e,m),ya=.6*e.TitleHeight,M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ +M+"startSize="+ya+";"+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+l(e.Title);v.value=c(e.Title);for(var I=[],jc=[],ua=ya/t,k=0;k<=e.Attributes;k++)0<k&&(jc[k]=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),jc[k].vertex=!0,v.insert(jc[k])),J=0,k<e.Attributes?(J=e["Text"+(k+1)+"Percent"],ua+=J):J=1-ua,I[k]=new mxCell("",new mxGeometry(0,0,w,(t- +ya)*J),"part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),I[k].vertex=!0,v.insert(I[k]),I[k].style+=M+z(e,m)+h(e["Text"+(k+1)])+f(e["Text"+(k+1)])+b(e["Text"+(k+1)]),I[k].value=c(e["Text"+(k+1)])}else v.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+l(e.Title),v.value=c(e.Title);break;case "ERDEntityBlock":M=A(e,m);ya=.6*e.Name_h;M=M.replace("fillColor","swimlaneFillColor"); +""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+"startSize="+ya+";"+z(e,m)+p(e,m)+B(e)+F(e)+l(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+A(e,m);v.value=c(e.Name);I=[];ua=ya/t;for(k=0;k<e.Fields;k++)J=0,I[k]=new mxCell("",new mxGeometry(0,0,w,.6*e["Field"+(k+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +I[k].vertex=!0,v.insert(I[k]),I[k].style+=M+h(e["Field"+(k+1)])+f(e["Field"+(k+1)])+b(e["Field"+(k+1)]),I[k].style=1==e.AltRows&&0!=k%2?I[k].style+"fillColor=#000000;opacity=5;":I[k].style+("fillColor=none;"+z(e,m)),I[k].value=c(e["Field"+(k+1)]);break;case "ERDEntityBlock2":M=A(e,m);ya=.6*e.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+"startSize="+ya+";"+ +z(e,m)+p(e,m)+B(e)+F(e)+l(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+A(e,m);v.value=c(e.Name);var I=[],ca=[],ua=ya,Da=30;null!=e.Column1&&(Da=.6*e.Column1);for(k=0;k<e.Fields;k++)J=0,ca[k]=new mxCell("",new mxGeometry(0,ua,Da,.6*e["Key"+(k+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),ca[k].vertex=!0,v.insert(ca[k]),ca[k].style+=M+ +h(e["Key"+(k+1)])+f(e["Key"+(k+1)])+b(e["Key"+(k+1)]),ca[k].style=1==e.AltRows&&0!=k%2?ca[k].style+"fillColor=#000000;fillOpacity=5;":ca[k].style+("fillColor=none;"+z(e,m)),ca[k].value=c(e["Key"+(k+1)]),I[k]=new mxCell("",new mxGeometry(Da,ua,w-Da,.6*e["Field"+(k+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),I[k].vertex=!0,v.insert(I[k]), +I[k].style+=M+p(e,m)+B(e)+F(e)+h(e["Field"+(k+1)])+f(e["Field"+(k+1)])+b(e["Field"+(k+1)]),I[k].style=1==e.AltRows&&0!=k%2?I[k].style+"fillColor=#000000;fillOpacity=5;":I[k].style+("fillColor=none;"+z(e,m)),I[k].value=c(e["Field"+(k+1)]),ua+=.6*e["Key"+(k+1)+"_h"];break;case "ERDEntityBlock3":M=A(e,m);ya=.6*e.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+ +"startSize="+ya+";"+z(e,m)+p(e,m)+B(e)+F(e)+l(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+A(e,m);v.value=c(e.Name);I=[];ca=[];ua=ya;Da=30;null!=e.Column1&&(Da=.6*e.Column1);for(k=0;k<e.Fields;k++)J=0,ca[k]=new mxCell("",new mxGeometry(0,ua,Da,.6*e["Field"+(k+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),ca[k].vertex=!0,v.insert(ca[k]), +ca[k].style+=M+h(e["Field"+(k+1)])+f(e["Field"+(k+1)])+b(e["Field"+(k+1)]),ca[k].style=1==e.AltRows&&0!=k%2?ca[k].style+"fillColor=#000000;fillOpacity=5;":ca[k].style+("fillColor=none;"+z(e,m)),ca[k].value=c(e["Field"+(k+1)]),I[k]=new mxCell("",new mxGeometry(Da,ua,w-Da,.6*e["Type"+(k+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +I[k].vertex=!0,v.insert(I[k]),I[k].style+=M+p(e,m)+B(e)+F(e)+h(e["Type"+(k+1)])+f(e["Type"+(k+1)])+b(e["Type"+(k+1)]),I[k].style=1==e.AltRows&&0!=k%2?I[k].style+"fillColor=#000000;fillOpacity=5;":I[k].style+("fillColor=none;"+z(e,m)),I[k].value=c(e["Type"+(k+1)]),ua+=.6*e["Field"+(k+1)+"_h"];break;case "ERDEntityBlock4":M=A(e,m);ya=.6*e.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ +M+"startSize="+ya+";"+z(e,m)+p(e,m)+B(e)+F(e)+l(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+A(e,m);v.value=c(e.Name);var I=[],ca=[],cb=[],ua=ya,Da=30,bc=40;null!=e.Column1&&(Da=.6*e.Column1);null!=e.Column2&&(bc=.6*e.Column2);for(k=0;k<e.Fields;k++)J=0,ca[k]=new mxCell("",new mxGeometry(0,ua,Da,.6*e["Key"+(k+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +ca[k].vertex=!0,v.insert(ca[k]),ca[k].style+=M+h(e["Key"+(k+1)])+f(e["Key"+(k+1)])+b(e["Key"+(k+1)]),ca[k].style=1==e.AltRows&&0!=k%2?ca[k].style+"fillColor=#000000;fillOpacity=5;":ca[k].style+("fillColor=none;"+z(e,m)),ca[k].value=c(e["Key"+(k+1)]),I[k]=new mxCell("",new mxGeometry(Da,ua,w-Da-bc,.6*e["Field"+(k+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +I[k].vertex=!0,v.insert(I[k]),I[k].style+=M+p(e,m)+B(e)+F(e)+h(e["Field"+(k+1)])+f(e["Field"+(k+1)])+b(e["Field"+(k+1)]),I[k].style=1==e.AltRows&&0!=k%2?I[k].style+"fillColor=#000000;fillOpacity=5;":I[k].style+("fillColor=none;"+z(e,m)),I[k].value=c(e["Field"+(k+1)]),cb[k]=new mxCell("",new mxGeometry(w-bc,ua,bc,.6*e["Type"+(k+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +cb[k].vertex=!0,v.insert(cb[k]),cb[k].style+=M+p(e,m)+B(e)+F(e)+h(e["Type"+(k+1)])+f(e["Type"+(k+1)])+b(e["Type"+(k+1)]),cb[k].style=1==e.AltRows&&0!=k%2?cb[k].style+"fillColor=#000000;fillOpacity=5;":cb[k].style+("fillColor=none;"+z(e,m)),cb[k].value=c(e["Type"+(k+1)]),ua+=.6*e["Key"+(k+1)+"_h"]}return v}var Ga=["GSDFDProcessBlock","GSDFDProcessBlock2","RoundedRectangleContainerBlock","UI2ButtonBlock","UMLStateBlock"],Ia=["ProcessBlock","UMLActivationBlock"],Ub="VennPlainColor1 VennPlainColor2 VennPlainColor3 VennPlainColor4 VennPlainColor5 VennPlainColor6 VennPlainColor7 VennPlainColor8 VennGradientColor1 VennGradientColor2 VennGradientColor3 VennGradientColor4 VennGradientColor5 VennGradientColor6 VennGradientColor7 VennGradientColor8 UMLEndBlock DefaultTextBlockNew iOSButton".split(" "), +Ea="AWSAndroidBlock3 AWSiOSBlock3 AWSJavaBlock3 AWSJavaScript AWSNetBlock3 AWSNodeJSBlock3 AWSPHPBlock3 AWSPythonBlock3 AWSRubyBlock3 AWSXamarin AWSCLIBlock3 AWSEclipseToolkitBlock3 AWSVisualStudioToolkitBlock3 AWSWindowsPowershellToolkitBlock3 DefaultTextBlock RectangleContainerBlock UMLStartBlock UMLEndBlock DefaultTextBlockNew UMLHForkJoinBlock iOSButton".split(" "),kb="VennPlainColor1 VennPlainColor2 VennPlainColor3 VennPlainColor4 VennPlainColor5 VennPlainColor6 VennPlainColor7 VennPlainColor8 VennGradientColor1 VennGradientColor2 VennGradientColor3 VennGradientColor4 VennGradientColor5 VennGradientColor6 VennGradientColor7 VennGradientColor8".split(" "), +Vb=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],fb=["fpDoor"],xb={None:"none",Arrow:"block;endFill=1","Hollow Arrow":"block;endFill=0","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10","CFN ERD Many Arrow":"ERmany;startSize=10","CFN ERD Exactly One Arrow":"ERmandOne;startSize=10","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10","CFN ERD One Arrow":"ERone;startSize=16", +Generalization:"block;endFill=0;startSize=12","Big Open Arrow":"open;startSize=10",Asynch1:"openAsync;flipH=1;startSize=10",Asynch2:"openAsync;startSize=10",Aggregation:"diamond;endFill=0;startSize=16",Composition:"diamond;endFill=1;startSize=16",BlockEnd:"none;endFill=1;startSize=16"},lb={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15", HotspotBlock:"strokeColor=none;opacity=50",ImageSearchBlock2:"shape=image",ProcessBlock:"",DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50",PredefinedProcessBlock:"shape=process",DocumentBlock:"shape=document",MultiDocumentBlock:"shape=mxgraph.flowchart.multi-document",ManualInputBlock:"shape=manualInput;size=15",PreparationBlock:"shape=hexagon",DataBlock:"shape=parallelogram",DataBlockNew:"shape=parallelogram",DatabaseBlock:"shape=cylinder",DirectAccessStorageBlock:"shape=mxgraph.flowchart.direct_data", InternalStorageBlock:"shape=internalStorage;dx=10;dy=10",PaperTapeBlock:"shape=tape;size=0.2",ManualOperationBlockNew:"shape=trapezoid;flipV=1",DelayBlock:"shape=delay",StoredDataBlock:"shape=dataStorage",MergeBlock:"triangle;direction=south",ConnectorBlock:"ellipse",OrBlock:"shape=mxgraph.flowchart.summing_function",SummingJunctionBlock:"shape=mxgraph.flowchart.or",DisplayBlock:"shape=display",OffPageLinkBlock:"shape=offPageConnector",BraceNoteBlock:"mxCompositeShape",NoteBlock:"shape=mxgraph.flowchart.annotation_1", AdvancedSwimLaneBlock:"mxCompositeShape",AdvancedSwimLaneBlockRotated:"mxCompositeShape",RectangleContainerBlock:"fillColor=none;container=1",DiamondContainerBlock:"shape=rhombus;fillColor=none;container=1",RoundedRectangleContainerBlock:"fillColor=none;container=1;rounded=1;absoluteArcSize=1;arcSize=24",CircleContainerBlock:"shape=ellipse;fillColor=none;container=1",PillContainerBlock:"arcSize=50;fillColor=none;container=1",IsoscelesTriangleBlock:"triangle;direction=north",RightTriangleBlock:"shape=mxgraph.basic.orthogonal_triangle", @@ -7770,72 +7770,538 @@ Image_iphone_button_blue:"",Image_iphone_button_grayblue:"",Image_iphone_button_ Image_iphone_sort_handle:"shape=mxgraph.ios7.icons.options",Image_iphone_slider:"shape=mxgraph.ios.iSlider;barPos=60",Image_iphone_dropdown:"shape=mxgraph.ios.iComboBox;buttonText=;fillColor=#dddddd;fillColor2=#3D5565",Image_iphone_email_name:"",Image_iphone_switch_off:"shape=mxgraph.android.switch_off;fillColor=#666666",Image_iphone_keyboard_button_blue:"",Image_iphone_keyboard_letters:"shape=mxgraph.ios.iKeybLett",Image_iphone_keyboard_landscape:"shape=mxgraph.ios.iKeybLett",Image_iphone_large_tabbed_button:"mxCompositeShape", Image_iphone_sort_button:"mxCompositeShape",Image_iphone_tab_bar:"mxCompositeShape",Image_iphone_picker_multi:"mxCompositeShape",Image_iphone_picker_web:"mxCompositeShape",Image_iphone_add_icon_blue:"shape=mxgraph.ios.iAddIcon;fillColor=#8BbEff;fillColor2=#135Ec8;strokeColor=#ffffff",Image_iphone_add_icon_green:"shape=mxgraph.ios.iAddIcon;fillColor=#7AdF78;fillColor2=#1A9917;strokeColor=#ffffff",Image_iphone_remove_icon:"shape=mxgraph.ios.iDeleteIcon;fillColor=#e8878E;fillColor2=#BD1421;strokeColor=#ffffff", Image_iphone_arrow_icon:"shape=mxgraph.ios.iArrowIcon;fillColor=#8BbEff;fillColor2=#135Ec8;strokeColor=#ffffff",Image_iphone_arrow:"shape=mxgraph.ios7.misc.more",Image_iphone_checkmark:"shape=mxgraph.ios7.misc.check",Image_iphone_check_off:"shape=ellipse",Image_iphone_location_dot:"shape=ellipse",Image_iphone_mark_as_read:"shape=ellipse",Image_iphone_pin_green:"shape=mxgraph.ios.iPin;fillColor2=#00dd00;fillColor3=#004400;strokeColor=#006600",Image_iphone_pin_red:"shape=mxgraph.ios.iPin;fillColor2=#dd0000;fillColor3=#440000;strokeColor=#660000", -Image_iphone_radio_off:"shape=ellipse",Image_iphone_checkbox_off:"",Image_iphone_indicator:"fillColor=#e8878E;gradientColor=#BD1421;strokeColor=#ffffff",Image_iphone_thread_count:""},Vb=function(g,k,l){l.includes(g)||l.push(g);if(g in k){var c=k[g];c.id=g;if(null!=c.Members)for(var a in c.Members)l=Vb(a,k,l)}return l};EditorUi.prototype.pasteLucidChart=function(g,k,l,c){var a=this.editor.graph;a.getModel().beginUpdate();try{var m=function(b,c){var g=null!=c.Endpoint1.Block?d[c.Endpoint1.Block]:null, -k=null!=c.Endpoint2.Block?d[c.Endpoint2.Block]:null,l;l=new mxCell("",new mxGeometry(0,0,100,100),"html=1;");l.geometry.relative=!0;l.edge=!0;gc(l,b);var m=cb(b).Properties,n=null!=m?m.TextAreas:b.TextAreas;if(null!=n){for(var p=0;null!=n["t"+p];){var q=n["t"+p];l=db(q,l);p++}for(p=1;null!=n["m"+p];)q=n["m"+p],l=db(q,l,b),p++;null!=n.Text&&(l=db(n,l,b));n=null!=m?m.TextAreas:b.TextAreas;null!=n.Message&&(l=db(n.Message,l,b))}null==g&&null!=c.Endpoint1&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.6* -c.Endpoint1.x),Math.round(.6*c.Endpoint1.y)),!0);null==k&&null!=c.Endpoint2&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.6*c.Endpoint2.x),Math.round(.6*c.Endpoint2.y)),!1);f.push(a.addCell(l,null,null,g,k))},f=[],d={},n=[],p=[],q=0;if(null!=g.Groups)for(var t in g.Groups){var r=g.Groups[t];r.id=t;if(1==r.Hidden&&null!=r.Members){p.includes(t)||p.push(t);for(var z in r.Members)p=Vb(z,g.Groups,p)}}if(null!=g.Blocks)for(t in g.Blocks)r=g.Blocks[t],r.id=t,p.includes(t)||(z=!1,null!=hb[r.Class]&& -"mxCompositeShape"==hb[r.Class]&&(d[r.id]=xc(r,f,a),n.push(r),z=!0),z||(d[r.id]=yb(r),n.push(r)));else for(q=0;q<g.Objects.length;q++)r=g.Objects[q],r.IsBlock&&null!=r.Action&&null!=r.Action.Properties&&(d[r.id]=yb(r)),n.push(r);n.sort(function(a,c){a=cb(a);c=cb(c);return null!=a.Properties&&null!=c.Properties?a.Properties.ZOrder-c.Properties.ZOrder:0});for(q=0;q<n.length;q++){var r=n[q],D=d[r.id];null!=D?f.push(a.addCell(D)):r.IsLine&&null!=r.Action&&null!=r.Action.Properties&&m(r,r.Action.Properties)}if(null!= -g.Lines)for(t in g.Lines)p.includes(t)||(r=g.Lines[t],m(r,r));if(c&&null!=k&&null!=l){a.isGridEnabled()&&(k=a.snap(k),l=a.snap(l));var I=a.getBoundingBoxFromGeometry(f,!0);null!=I&&a.moveCells(f,k-I.x,l-I.y)}a.setSelectionCells(f)}finally{a.getModel().endUpdate()}a.isSelectionEmpty()||(a.scrollCellToVisible(a.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(a.view.getState(a.getSelectionCell())))}})(); -function VsdxExport(a){function e(c,d){var h={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>", +Image_iphone_radio_off:"shape=ellipse",Image_iphone_checkbox_off:"",Image_iphone_indicator:"fillColor=#e8878E;gradientColor=#BD1421;strokeColor=#ffffff",Image_iphone_thread_count:""},Tb=function(a,b,d){d.includes(a)||d.push(a);if(a in b){var g=b[a];g.id=a;if(null!=g.Members)for(var e in g.Members)d=Tb(e,b,d)}return d};EditorUi.prototype.pasteLucidChart=function(a,b,d,g){var e=this.editor.graph;e.getModel().beginUpdate();try{var n=function(a,b){var d=null!=b.Endpoint1.Block?f[b.Endpoint1.Block]:null, +g=null!=b.Endpoint2.Block?f[b.Endpoint2.Block]:null,n;n=new mxCell("",new mxGeometry(0,0,100,100),"html=1;");n.geometry.relative=!0;n.edge=!0;Z(n,a);var C=u(a).Properties,k=null!=C?C.TextAreas:a.TextAreas;if(null!=k){for(var D=0;null!=k["t"+D];){var y=k["t"+D];n=Y(y,n);D++}for(D=1;null!=k["m"+D];)y=k["m"+D],n=Y(y,n,a),D++;null!=k.Text&&(n=Y(k,n,a));k=null!=C?C.TextAreas:a.TextAreas;null!=k.Message&&(n=Y(k.Message,n,a))}null==d&&null!=b.Endpoint1&&n.geometry.setTerminalPoint(new mxPoint(Math.round(.6* +b.Endpoint1.x),Math.round(.6*b.Endpoint1.y)),!0);null==g&&null!=b.Endpoint2&&n.geometry.setTerminalPoint(new mxPoint(Math.round(.6*b.Endpoint2.x),Math.round(.6*b.Endpoint2.y)),!1);c.push(e.addCell(n,null,null,d,g))},c=[],f={},C=[],D=[],y=0;if(null!=a.Groups)for(var p in a.Groups){var m=a.Groups[p];m.id=p;if(1==m.Hidden&&null!=m.Members){D.includes(p)||D.push(p);for(var h in m.Members)D=Tb(h,a.Groups,D)}}if(null!=a.Blocks)for(p in a.Blocks)m=a.Blocks[p],m.id=p,D.includes(p)||(h=!1,null!=lb[m.Class]&& +"mxCompositeShape"==lb[m.Class]&&(f[m.id]=na(m,c,e),C.push(m),h=!0),h||(f[m.id]=K(m),C.push(m)));else for(y=0;y<a.Objects.length;y++)m=a.Objects[y],m.IsBlock&&null!=m.Action&&null!=m.Action.Properties&&(f[m.id]=K(m)),C.push(m);C.sort(function(a,b){a=u(a);b=u(b);return null!=a.Properties&&null!=b.Properties?a.Properties.ZOrder-b.Properties.ZOrder:0});for(y=0;y<C.length;y++){var m=C[y],l=f[m.id];null!=l?c.push(e.addCell(l)):m.IsLine&&null!=m.Action&&null!=m.Action.Properties&&n(m,m.Action.Properties)}if(null!= +a.Lines)for(p in a.Lines)D.includes(p)||(m=a.Lines[p],n(m,m));if(g&&null!=b&&null!=d){e.isGridEnabled()&&(b=e.snap(b),d=e.snap(d));var z=e.getBoundingBoxFromGeometry(c,!0);null!=z&&e.moveCells(c,b-z.x,d-z.y)}e.setSelectionCells(c)}finally{e.getModel().endUpdate()}e.isSelectionEmpty()||(e.scrollCellToVisible(e.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(e.view.getState(e.getSelectionCell())))}})();function VsdxExport(c){function u(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>", "_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>", "docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>", "docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>", "visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>", "visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>", "visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"}, -g;for(g in h)if(1<d&&g==p.CONTENT_TYPES_XML){for(var y=mxUtils.parseXml(h[g]),a=y.documentElement,k=a.children,b=null,f=0;f<k.length;f++){var e=k[f];"/visio/pages/page1.xml"==e.getAttribute(p.PART_NAME)&&(b=e)}for(f=2;f<=d;f++)k=b.cloneNode(),k.setAttribute(p.PART_NAME,"/visio/pages/page"+f+".xml"),a.appendChild(k);C(c,g,y,!0)}else c.file(g,h[g])}function k(c,d,h){return null!=c.createElementNS?c.createElementNS(d,h):c.createElement(h)}function l(c){var d=E[c];null==d&&(d=D++,E[c]=d);return d}function b(c){var d= -{};try{var h=c.getGraphBounds().clone(),g=c.view.scale,y=c.view.translate,a=Math.round(h.x/g)-y.x,k=Math.round(h.y/g)-y.y,b=c.pageFormat.width,f=c.pageFormat.height;0>a&&(a+=Math.ceil((y.x-h.x/g)/b)*b);0>k&&(k+=Math.ceil((y.y-h.y/g)/f)*f);var e=Math.max(1,Math.ceil((h.width/g+a)/b)),l=Math.max(1,Math.ceil((h.height/g+k)/f));d.gridEnabled=c.gridEnabled;d.gridSize=c.gridSize;d.guidesEnabled=c.graphHandler.guidesEnabled;d.pageVisible=c.pageVisible;d.pageScale=c.pageScale;d.pageWidth=c.pageFormat.width* -e;d.pageHeight=c.pageFormat.height*l;d.backgroundClr=c.background;d.mathEnabled=c.mathEnabled;d.shadowVisible=c.shadowVisible}catch(I){}return d}function m(c,d,h,g){return f(c,d/p.CONVERSION_FACTOR,h,g)}function f(c,d,h,g){h=k(h,p.XMLNS,"Cell");h.setAttribute("N",c);h.setAttribute("V",d);g&&h.setAttribute("F",g);return h}function t(c,d,h,g,a){var y=k(a,p.XMLNS,"Row");y.setAttribute("T",c);y.setAttribute("IX",d);y.appendChild(m("X",h,a));y.appendChild(m("Y",g,a));return y}function r(c,d,h){var g=c.style[mxConstants.STYLE_FILLCOLOR]; -if(g&&"none"!=g){if(d.appendChild(f("FillForegnd",g,h)),(g=c.style[mxConstants.STYLE_GRADIENTCOLOR])&&"none"!=g){d.appendChild(f("FillBkgnd",g,h));var g=c.style[mxConstants.STYLE_GRADIENT_DIRECTION],a=28;if(g)switch(g){case mxConstants.DIRECTION_EAST:a=25;break;case mxConstants.DIRECTION_WEST:a=27;break;case mxConstants.DIRECTION_NORTH:a=30}d.appendChild(f("FillPattern",a,h))}}else d.appendChild(f("FillPattern",0,h));(g=c.style[mxConstants.STYLE_STROKECOLOR])&&"none"!=g?d.appendChild(f("LineColor", -g,h)):d.appendChild(f("LinePattern",0,h));(g=c.style[mxConstants.STYLE_STROKEWIDTH])&&d.appendChild(m("LineWeight",g,h));(a=c.style[mxConstants.STYLE_OPACITY])?g=a:(g=c.style[mxConstants.STYLE_FILL_OPACITY],a=c.style[mxConstants.STYLE_STROKE_OPACITY]);g&&d.appendChild(f("FillForegndTrans",1-parseInt(g)/100,h));a&&d.appendChild(f("LineColorTrans",1-parseInt(a)/100,h));if(1==c.style[mxConstants.STYLE_DASHED]){g=c.style[mxConstants.STYLE_DASH_PATTERN];a=9;if(g)switch(g){case "1 1":a=10;break;case "1 2":a= -3;break;case "1 4":a=17}d.appendChild(f("LinePattern",a,h))}1==c.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(f("ShdwPattern",1,h)),d.appendChild(f("ShdwForegnd","#000000",h)),d.appendChild(f("ShdwForegndTrans",.6,h)),d.appendChild(f("ShapeShdwType",1,h)),d.appendChild(f("ShapeShdwOffsetX","0.02946278254943948",h)),d.appendChild(f("ShapeShdwOffsetY","-0.02946278254943948",h)),d.appendChild(f("ShapeShdwScaleFactor","1",h)),d.appendChild(f("ShapeShdwBlur","0.05555555555555555",h)),d.appendChild(f("ShapeShdwShow", -2,h)));1==c.style[mxConstants.STYLE_FLIPH]&&d.appendChild(f("FlipX",1,h));1==c.style[mxConstants.STYLE_FLIPV]&&d.appendChild(f("FlipY",1,h));1==c.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(m("Rounding",.1*c.cell.geometry.width,h));(c=c.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(f("TextBkgnd",c,h))}function v(c,a,h,g){var d=k(h,p.XMLNS,"Shape");d.setAttribute("ID",c);d.setAttribute("NameU","Shape"+c);d.setAttribute("LineStyle","0");d.setAttribute("FillStyle","0");d.setAttribute("TextStyle", -"0");c=a.width/2;var b=a.height/2;d.appendChild(m("PinX",a.x+c+q.shiftX,h));d.appendChild(m("PinY",g-a.y-b-q.shiftY,h));d.appendChild(m("Width",a.width,h));d.appendChild(m("Height",a.height,h));d.appendChild(m("LocPinX",c,h));d.appendChild(m("LocPinY",b,h));return d}function n(c,a){var d=p.ARROWS_MAP[(null==c?"none":c)+"|"+(null==a?"1":a)];return null!=d?d:1}function A(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?3:9>=a?4:22>=a?5:6}function G(a,d,h,g){var c=d.view.getState(a);d=k(h,p.XMLNS,"Shape"); -var b=l(a.id);d.setAttribute("ID",b);d.setAttribute("NameU","Dynamic connector."+b);d.setAttribute("Name","Dynamic connector."+b);d.setAttribute("Type","Shape");d.setAttribute("Master","4");var e=q.state,b=c.absolutePoints,z=c.cellBounds,B=z.width/2,w=z.height/2;d.appendChild(m("PinX",z.x+B,h));d.appendChild(m("PinY",g-z.y-w,h));d.appendChild(m("Width",z.width,h));d.appendChild(m("Height",z.height,h));d.appendChild(m("LocPinX",B,h));d.appendChild(m("LocPinY",w,h));q.newEdge(d,c,h);B=function(a,c){var g= -a.x,d=a.y,g=g*e.scale-z.x+e.dx+q.shiftX,d=(c?0:z.height)-d*e.scale+z.y-e.dy-q.shiftY;return{x:g,y:d}};w=B(b[0],!0);d.appendChild(m("BeginX",z.x+w.x,h,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));d.appendChild(m("BeginY",g-z.y+w.y,h,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));w=B(b[b.length-1],!0);d.appendChild(m("EndX",z.x+w.x,h,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));d.appendChild(m("EndY",g-z.y+w.y,h,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));d.appendChild(f("BegTrigger", -"2",h,a.source?"_XFTRIGGER(Sheet."+l(a.source.id)+"!EventXFMod)":null));d.appendChild(f("EndTrigger","2",h,a.target?"_XFTRIGGER(Sheet."+l(a.target.id)+"!EventXFMod)":null));d.appendChild(f("ConFixedCode","6",h));d.appendChild(f("LayerMember","0",h));r(c,d,h);g=c.style[mxConstants.STYLE_STARTSIZE];a=n(c.style[mxConstants.STYLE_STARTARROW],c.style[mxConstants.STYLE_STARTFILL]);d.appendChild(f("BeginArrow",a,h));d.appendChild(f("BeginArrowSize",A(g),h));g=c.style[mxConstants.STYLE_ENDSIZE];a=n(c.style[mxConstants.STYLE_ENDARROW], -c.style[mxConstants.STYLE_ENDFILL]);d.appendChild(f("EndArrow",a,h));d.appendChild(f("EndArrowSize",A(g),h));null!=c.text&&c.text.checkBounds()&&(q.save(),c.text.paint(q),q.restore());c=k(h,p.XMLNS,"Section");c.setAttribute("N","Geometry");c.setAttribute("IX","0");for(a=0;a<b.length;a++)g=B(b[a]),c.appendChild(t(0==a?"MoveTo":"LineTo",a+1,g.x,g.y,h));c.appendChild(f("NoFill","1",h));c.appendChild(f("NoLine","0",h));d.appendChild(c);return d}function u(a,d,h,g,b){var c=a.geometry;if(null!=c){c.relative&& -b&&(c=c.clone(),c.x*=b.width,c.y*=b.height,c.relative=0);b=l(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){g=v(b+"10000",c,h,g);g.setAttribute("Type","Group");b=k(h,p.XMLNS,"Shapes");q.save();q.translate(-c.x,-c.y);var f=c.clone();f.x=0;f.y=0;a.setGeometry(f);a.treatAsSingle=!0;f=u(a,d,h,c.height,c);a.treatAsSingle=!1;a.setGeometry(c);b.appendChild(f);for(var e=0;e<a.children.length;e++)f=u(a.children[e],d,h,c.height,c),b.appendChild(f);g.appendChild(b);q.restore();return g}return a.vertex?(g=v(b, -c,h,g),a=d.view.getState(a),r(a,g,h),q.newShape(g,a,h),null!=a.text&&a.text.checkBounds()&&(q.save(),a.text.paint(q),q.restore()),null!=a.shape&&a.shape.checkBounds()&&(q.save(),a.shape.paint(q),q.restore()),g.appendChild(q.getShapeGeo()),q.endShape(),g.setAttribute("Type",q.getShapeType()),g):G(a,d,h,g)}return null}function x(a,d){var c=mxUtils.createXmlDocument(),g=k(c,p.XMLNS,"PageContents");g.setAttribute("xmlns:r",p.XMLNS_R);g.setAttribute("xml:space",p.XML_SPACE);var b=k(c,p.XMLNS,"Shapes"); -g.appendChild(b);var f=a.model,e=a.view.translate,m=a.view.scale,B=a.getGraphBounds();q.shiftX=0;q.shiftY=0;if(B.x/m<e.x||B.y/m<e.y)q.shiftX=Math.ceil((e.x-B.x/m)/a.pageFormat.width)*a.pageFormat.width,q.shiftY=Math.ceil((e.y-B.y/m)/a.pageFormat.height)*a.pageFormat.height;q.save();q.translate(-e.x,-e.y);q.scale(1/m);q.newPage();var m=a.getDefaultParent(),w;for(w in f.cells)e=f.cells[w],e.parent==m&&(e=u(e,a,c,d.pageHeight),null!=e&&b.appendChild(e));b=k(c,p.XMLNS,"Connects");g.appendChild(b);for(w in f.cells)e= -f.cells[w],e.edge&&(e.source&&(m=k(c,p.XMLNS,"Connect"),m.setAttribute("FromSheet",l(e.id)),m.setAttribute("FromCell","BeginX"),m.setAttribute("ToSheet",l(e.source.id)),b.appendChild(m)),e.target&&(m=k(c,p.XMLNS,"Connect"),m.setAttribute("FromSheet",l(e.id)),m.setAttribute("FromCell","EndX"),m.setAttribute("ToSheet",l(e.target.id)),b.appendChild(m)));c.appendChild(g);q.restore();return c}function C(a,d,b,g){a.file(d,(g?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(b))} -function F(a,b,e){var g=mxUtils.createXmlDocument(),d=mxUtils.createXmlDocument(),c=k(g,p.XMLNS,"Pages");c.setAttribute("xmlns:r",p.XMLNS_R);c.setAttribute("xml:space",p.XML_SPACE);var h=k(d,p.RELS_XMLNS,"Relationships"),l=1,q;for(q in b){var w="page"+l+".xml",n=k(g,p.XMLNS,"Page");n.setAttribute("ID",l-1);n.setAttribute("NameU",q);n.setAttribute("Name",q);var t=k(g,p.XMLNS,"PageSheet"),u=e[q];t.appendChild(m("PageWidth",u.pageWidth,g));t.appendChild(m("PageHeight",u.pageHeight,g));t.appendChild(f("PageScale", -u.pageScale,g));t.appendChild(f("DrawingScale",1,g));u=k(g,p.XMLNS,"Rel");u.setAttribute("r:id","rId"+l);var v=k(g,p.XMLNS,"Section");v.setAttribute("N","Layer");var r=k(g,p.XMLNS,"Row");r.setAttribute("IX","0");v.appendChild(r);r.appendChild(f("Name","Connector",g));r.appendChild(f("Color","255",g));r.appendChild(f("Status","0",g));r.appendChild(f("Visible","1",g));r.appendChild(f("Print","1",g));r.appendChild(f("Active","0",g));r.appendChild(f("Lock","0",g));r.appendChild(f("Snap","1",g));r.appendChild(f("Glue", -"1",g));r.appendChild(f("NameUniv","Connector",g));r.appendChild(f("ColorTrans","0",g));t.appendChild(v);n.appendChild(t);n.appendChild(u);c.appendChild(n);n=k(d,p.RELS_XMLNS,"Relationship");n.setAttribute("Id","rId"+l);n.setAttribute("Type",p.PAGES_TYPE);n.setAttribute("Target",w);h.appendChild(n);C(a,p.VISIO_PAGES+w,b[q]);l++}g.appendChild(c);d.appendChild(h);C(a,p.VISIO_PAGES+"pages.xml",g);C(a,p.VISIO_PAGES+"_rels/pages.xml.rels",d)}function H(a,b){var d=p.VISIO_PAGES_RELS+"page"+b+".xml.rels", -g=mxUtils.createXmlDocument(),c=k(g,p.RELS_XMLNS,"Relationships"),e=k(g,p.RELS_XMLNS,"Relationship");e.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");e.setAttribute("Id","rId1");e.setAttribute("Target","../masters/master1.xml");c.appendChild(e);var f=q.images;if(0<f.length)for(var l=0;l<f.length;l++)e=k(g,p.RELS_XMLNS,"Relationship"),e.setAttribute("Type",p.XMLNS_R+"/image"),e.setAttribute("Id","rId"+(l+2)),e.setAttribute("Target","../media/"+f[l]),c.appendChild(e); -g.appendChild(c);C(a,d,g)}var p=this,q=new mxVsdxCanvas2D,E={},D=1;this.exportCurrentDiagrams=function(){try{if(a.spinner.spin(document.body,mxResources.get("exporting"))){var c=new JSZip;q.init(c);E={};D=1;var d={},f={},g=null!=a.pages?a.pages.length:1;if(null!=a.pages){for(var k=a.editor.graph.getSelectionCells(),l=a.currentPage,m=0;m<a.pages.length;m++){var p=a.pages[m];a.currentPage!=p&&a.selectPage(p,!0);var n=p.getName(),w=a.editor.graph,r=b(w);d[n]=x(w,r);H(c,m+1);f[n]=r}l!=a.currentPage&& -a.selectPage(l,!0);a.editor.graph.setSelectionCells(k)}else w=a.editor.graph,r=b(w),n="Page1",d[n]=x(w,r),H(c,1),f[n]=r;e(c,g);F(c,d,f);d=function(){c.generateAsync({type:"base64"}).then(function(g){a.spinner.stop();var b=a.getBaseFilename();a.saveData(b+".vsdx","vsdx",g,"application/vnd.visio2013",!0)})};0<q.filesLoading?q.onFilesLoaded=d:d()}return!0}catch(I){return console.log(I),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page"; +g;for(g in d)if(1<b&&g==E.CONTENT_TYPES_XML){for(var n=mxUtils.parseXml(d[g]),c=n.documentElement,f=c.children,C=null,D=0;D<f.length;D++){var y=f[D];"/visio/pages/page1.xml"==y.getAttribute(E.PART_NAME)&&(C=y)}for(D=2;D<=b;D++)f=C.cloneNode(),f.setAttribute(E.PART_NAME,"/visio/pages/page"+D+".xml"),c.appendChild(f);z(a,g,n,!0)}else a.file(g,d[g])}function q(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function l(a){var b=F[a];null==b&&(b=B++,F[a]=b);return b}function h(a){var b= +{};try{var d=a.getGraphBounds().clone(),g=a.view.scale,n=a.view.translate,c=Math.round(d.x/g)-n.x,f=Math.round(d.y/g)-n.y,C=a.pageFormat.width,D=a.pageFormat.height;0>c&&(c+=Math.ceil((n.x-d.x/g)/C)*C);0>f&&(f+=Math.ceil((n.y-d.y/g)/D)*D);var y=Math.max(1,Math.ceil((d.width/g+c)/C)),p=Math.max(1,Math.ceil((d.height/g+f)/D));b.gridEnabled=a.gridEnabled;b.gridSize=a.gridSize;b.guidesEnabled=a.graphHandler.guidesEnabled;b.pageVisible=a.pageVisible;b.pageScale=a.pageScale;b.pageWidth=a.pageFormat.width* +y;b.pageHeight=a.pageFormat.height*p;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(Ea){}return b}function f(a,d,g,n){return b(a,d/E.CONVERSION_FACTOR,g,n)}function b(a,b,d,g){d=q(d,E.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);g&&d.setAttribute("F",g);return d}function a(a,b,d,g,n){var c=q(n,E.XMLNS,"Row");c.setAttribute("T",a);c.setAttribute("IX",b);c.appendChild(f("X",d,n));c.appendChild(f("Y",g,n));return c}function d(a,d,g){var n= +a.style[mxConstants.STYLE_FILLCOLOR];if(n&&"none"!=n){if(d.appendChild(b("FillForegnd",n,g)),(n=a.style[mxConstants.STYLE_GRADIENTCOLOR])&&"none"!=n){d.appendChild(b("FillBkgnd",n,g));var n=a.style[mxConstants.STYLE_GRADIENT_DIRECTION],c=28;if(n)switch(n){case mxConstants.DIRECTION_EAST:c=25;break;case mxConstants.DIRECTION_WEST:c=27;break;case mxConstants.DIRECTION_NORTH:c=30}d.appendChild(b("FillPattern",c,g))}}else d.appendChild(b("FillPattern",0,g));(n=a.style[mxConstants.STYLE_STROKECOLOR])&& +"none"!=n?d.appendChild(b("LineColor",n,g)):d.appendChild(b("LinePattern",0,g));(n=a.style[mxConstants.STYLE_STROKEWIDTH])&&d.appendChild(f("LineWeight",n,g));(c=a.style[mxConstants.STYLE_OPACITY])?n=c:(n=a.style[mxConstants.STYLE_FILL_OPACITY],c=a.style[mxConstants.STYLE_STROKE_OPACITY]);n&&d.appendChild(b("FillForegndTrans",1-parseInt(n)/100,g));c&&d.appendChild(b("LineColorTrans",1-parseInt(c)/100,g));if(1==a.style[mxConstants.STYLE_DASHED]){n=a.style[mxConstants.STYLE_DASH_PATTERN];c=9;if(n)switch(n){case "1 1":c= +10;break;case "1 2":c=3;break;case "1 4":c=17}d.appendChild(b("LinePattern",c,g))}1==a.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(b("ShdwPattern",1,g)),d.appendChild(b("ShdwForegnd","#000000",g)),d.appendChild(b("ShdwForegndTrans",.6,g)),d.appendChild(b("ShapeShdwType",1,g)),d.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",g)),d.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",g)),d.appendChild(b("ShapeShdwScaleFactor","1",g)),d.appendChild(b("ShapeShdwBlur","0.05555555555555555", +g)),d.appendChild(b("ShapeShdwShow",2,g)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,g));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,g));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(f("Rounding",.1*a.cell.geometry.width,g));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,g))}function g(a,b,d,g){var n=q(d,E.XMLNS,"Shape");n.setAttribute("ID",a);n.setAttribute("NameU","Shape"+a);n.setAttribute("LineStyle","0");n.setAttribute("FillStyle", +"0");n.setAttribute("TextStyle","0");a=b.width/2;var c=b.height/2;n.appendChild(f("PinX",b.x+a+A.shiftX,d));n.appendChild(f("PinY",g-b.y-c-A.shiftY,d));n.appendChild(f("Width",b.width,d));n.appendChild(f("Height",b.height,d));n.appendChild(f("LocPinX",a,d));n.appendChild(f("LocPinY",c,d));return n}function n(a,b){var d=E.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function C(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?3:9>=a?4:22>=a?5:6}function D(g,c,D,y){var p=c.view.getState(g); +c=q(D,E.XMLNS,"Shape");var h=l(g.id);c.setAttribute("ID",h);c.setAttribute("NameU","Dynamic connector."+h);c.setAttribute("Name","Dynamic connector."+h);c.setAttribute("Type","Shape");c.setAttribute("Master","4");var z=A.state,h=p.absolutePoints,W=p.cellBounds,u=W.width/2,P=W.height/2;c.appendChild(f("PinX",W.x+u,D));c.appendChild(f("PinY",y-W.y-P,D));c.appendChild(f("Width",W.width,D));c.appendChild(f("Height",W.height,D));c.appendChild(f("LocPinX",u,D));c.appendChild(f("LocPinY",P,D));A.newEdge(c, +p,D);u=function(a,b){var d=a.x,g=a.y,d=d*z.scale-W.x+z.dx+A.shiftX,g=(b?0:W.height)-g*z.scale+W.y-z.dy-A.shiftY;return{x:d,y:g}};P=u(h[0],!0);c.appendChild(f("BeginX",W.x+P.x,D,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));c.appendChild(f("BeginY",y-W.y+P.y,D,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));P=u(h[h.length-1],!0);c.appendChild(f("EndX",W.x+P.x,D,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(f("EndY",y-W.y+P.y,D,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)")); +c.appendChild(b("BegTrigger","2",D,g.source?"_XFTRIGGER(Sheet."+l(g.source.id)+"!EventXFMod)":null));c.appendChild(b("EndTrigger","2",D,g.target?"_XFTRIGGER(Sheet."+l(g.target.id)+"!EventXFMod)":null));c.appendChild(b("ConFixedCode","6",D));c.appendChild(b("LayerMember","0",D));d(p,c,D);y=p.style[mxConstants.STYLE_STARTSIZE];g=n(p.style[mxConstants.STYLE_STARTARROW],p.style[mxConstants.STYLE_STARTFILL]);c.appendChild(b("BeginArrow",g,D));c.appendChild(b("BeginArrowSize",C(y),D));y=p.style[mxConstants.STYLE_ENDSIZE]; +g=n(p.style[mxConstants.STYLE_ENDARROW],p.style[mxConstants.STYLE_ENDFILL]);c.appendChild(b("EndArrow",g,D));c.appendChild(b("EndArrowSize",C(y),D));null!=p.text&&p.text.checkBounds()&&(A.save(),p.text.paint(A),A.restore());p=q(D,E.XMLNS,"Section");p.setAttribute("N","Geometry");p.setAttribute("IX","0");for(g=0;g<h.length;g++)y=u(h[g]),p.appendChild(a(0==g?"MoveTo":"LineTo",g+1,y.x,y.y,D));p.appendChild(b("NoFill","1",D));p.appendChild(b("NoLine","0",D));c.appendChild(p);return c}function y(a,b,n, +c,f){var C=a.geometry;if(null!=C){C.relative&&f&&(C=C.clone(),C.x*=f.width,C.y*=f.height,C.relative=0);f=l(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){c=g(f+"10000",C,n,c);c.setAttribute("Type","Group");f=q(n,E.XMLNS,"Shapes");A.save();A.translate(-C.x,-C.y);var p=C.clone();p.x=0;p.y=0;a.setGeometry(p);a.treatAsSingle=!0;p=y(a,b,n,C.height,C);a.treatAsSingle=!1;a.setGeometry(C);f.appendChild(p);for(var h=0;h<a.children.length;h++)p=y(a.children[h],b,n,C.height,C),f.appendChild(p);c.appendChild(f); +A.restore();return c}return a.vertex?(c=g(f,C,n,c),a=b.view.getState(a),d(a,c,n),A.newShape(c,a,n),null!=a.text&&a.text.checkBounds()&&(A.save(),a.text.paint(A),A.restore()),null!=a.shape&&a.shape.checkBounds()&&(A.save(),a.shape.paint(A),A.restore()),c.appendChild(A.getShapeGeo()),A.endShape(),c.setAttribute("Type",A.getShapeType()),c):D(a,b,n,c)}return null}function p(a,b){var d=mxUtils.createXmlDocument(),g=q(d,E.XMLNS,"PageContents");g.setAttribute("xmlns:r",E.XMLNS_R);g.setAttribute("xml:space", +E.XML_SPACE);var n=q(d,E.XMLNS,"Shapes");g.appendChild(n);var c=a.model,f=a.view.translate,C=a.view.scale,D=a.getGraphBounds();A.shiftX=0;A.shiftY=0;if(D.x/C<f.x||D.y/C<f.y)A.shiftX=Math.ceil((f.x-D.x/C)/a.pageFormat.width)*a.pageFormat.width,A.shiftY=Math.ceil((f.y-D.y/C)/a.pageFormat.height)*a.pageFormat.height;A.save();A.translate(-f.x,-f.y);A.scale(1/C);A.newPage();var C=a.getDefaultParent(),p;for(p in c.cells)f=c.cells[p],f.parent==C&&(f=y(f,a,d,b.pageHeight),null!=f&&n.appendChild(f));n=q(d, +E.XMLNS,"Connects");g.appendChild(n);for(p in c.cells)f=c.cells[p],f.edge&&(f.source&&(C=q(d,E.XMLNS,"Connect"),C.setAttribute("FromSheet",l(f.id)),C.setAttribute("FromCell","BeginX"),C.setAttribute("ToSheet",l(f.source.id)),n.appendChild(C)),f.target&&(C=q(d,E.XMLNS,"Connect"),C.setAttribute("FromSheet",l(f.id)),C.setAttribute("FromCell","EndX"),C.setAttribute("ToSheet",l(f.target.id)),n.appendChild(C)));d.appendChild(g);A.restore();return d}function z(a,b,d,g){a.file(b,(g?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+ +mxUtils.getXml(d))}function W(a,d,g){var n=mxUtils.createXmlDocument(),c=mxUtils.createXmlDocument(),C=q(n,E.XMLNS,"Pages");C.setAttribute("xmlns:r",E.XMLNS_R);C.setAttribute("xml:space",E.XML_SPACE);var D=q(c,E.RELS_XMLNS,"Relationships"),y=1,p;for(p in d){var h="page"+y+".xml",l=q(n,E.XMLNS,"Page");l.setAttribute("ID",y-1);l.setAttribute("NameU",p);l.setAttribute("Name",p);var W=q(n,E.XMLNS,"PageSheet"),u=g[p];W.appendChild(f("PageWidth",u.pageWidth,n));W.appendChild(f("PageHeight",u.pageHeight, +n));W.appendChild(b("PageScale",u.pageScale,n));W.appendChild(b("DrawingScale",1,n));u=q(n,E.XMLNS,"Rel");u.setAttribute("r:id","rId"+y);var P=q(n,E.XMLNS,"Section");P.setAttribute("N","Layer");var A=q(n,E.XMLNS,"Row");A.setAttribute("IX","0");P.appendChild(A);A.appendChild(b("Name","Connector",n));A.appendChild(b("Color","255",n));A.appendChild(b("Status","0",n));A.appendChild(b("Visible","1",n));A.appendChild(b("Print","1",n));A.appendChild(b("Active","0",n));A.appendChild(b("Lock","0",n));A.appendChild(b("Snap", +"1",n));A.appendChild(b("Glue","1",n));A.appendChild(b("NameUniv","Connector",n));A.appendChild(b("ColorTrans","0",n));W.appendChild(P);l.appendChild(W);l.appendChild(u);C.appendChild(l);l=q(c,E.RELS_XMLNS,"Relationship");l.setAttribute("Id","rId"+y);l.setAttribute("Type",E.PAGES_TYPE);l.setAttribute("Target",h);D.appendChild(l);z(a,E.VISIO_PAGES+h,d[p]);y++}n.appendChild(C);c.appendChild(D);z(a,E.VISIO_PAGES+"pages.xml",n);z(a,E.VISIO_PAGES+"_rels/pages.xml.rels",c)}function P(a,b){var d=E.VISIO_PAGES_RELS+ +"page"+b+".xml.rels",g=mxUtils.createXmlDocument(),n=q(g,E.RELS_XMLNS,"Relationships"),c=q(g,E.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");n.appendChild(c);var f=A.images;if(0<f.length)for(var C=0;C<f.length;C++)c=q(g,E.RELS_XMLNS,"Relationship"),c.setAttribute("Type",E.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(C+2)),c.setAttribute("Target","../media/"+ +f[C]),n.appendChild(c);g.appendChild(n);z(a,d,g)}var E=this,A=new mxVsdxCanvas2D,F={},B=1;this.exportCurrentDiagrams=function(){try{if(c.spinner.spin(document.body,mxResources.get("exporting"))){var a=new JSZip;A.init(a);F={};B=1;var b={},d={},g=null!=c.pages?c.pages.length:1;if(null!=c.pages){for(var n=c.editor.graph.getSelectionCells(),f=c.currentPage,C=0;C<c.pages.length;C++){var D=c.pages[C];c.currentPage!=D&&c.selectPage(D,!0);var y=D.getName(),l=c.editor.graph,z=h(l);b[y]=p(l,z);P(a,C+1);d[y]= +z}f!=c.currentPage&&c.selectPage(f,!0);c.editor.graph.setSelectionCells(n)}else l=c.editor.graph,z=h(l),y="Page1",b[y]=p(l,z),P(a,1),d[y]=z;u(a,g);W(a,b,d);b=function(){a.generateAsync({type:"base64"}).then(function(a){c.spinner.stop();var b=c.getBaseFilename();c.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<A.filesLoading?A.onFilesLoaded=b:b()}return!0}catch(Ea){return console.log(Ea),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page"; VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1"; VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/"; -VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(a){this.filesLoading=0;this.zip=a};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(a){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,a):this.xmlDoc.createElement(a)}; -mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var a=this.createElt("Section");a.setAttribute("N","Geometry");a.setAttribute("IX",this.geoIndex++);this.geoSec=a;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(a,e,k){this.geoIndex=0;this.shape=a;this.cellState=e;this.xmGeo=e.cell.geometry;this.xmlDoc=k;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()}; -mxVsdxCanvas2D.prototype.newEdge=function(a,e,k){this.shape=a;this.cellState=e;this.xmGeo=e.cellBounds;this.xmlDoc=k};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec}; -mxVsdxCanvas2D.prototype.createCellElemScaled=function(a,e,k){return this.createCellElem(a,e/VsdxExport.prototype.CONVERSION_FACTOR,k)};mxVsdxCanvas2D.prototype.createCellElem=function(a,e,k){var l=this.createElt("Cell");l.setAttribute("N",a);l.setAttribute("V",e);k&&l.setAttribute("F",k);return l}; -mxVsdxCanvas2D.prototype.createRowScaled=function(a,e,k,l,b,m,f,t,r,v,n,A,G,u){return this.createRowRel(a,e,k/VsdxExport.prototype.CONVERSION_FACTOR,l/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,f/VsdxExport.prototype.CONVERSION_FACTOR,t/VsdxExport.prototype.CONVERSION_FACTOR,r,v,n,A,G,u)}; -mxVsdxCanvas2D.prototype.createRowRel=function(a,e,k,l,b,m,f,t,r,v,n,A,G,u){var x=this.createElt("Row");x.setAttribute("T",a);x.setAttribute("IX",e);x.appendChild(this.createCellElem("X",k,r));x.appendChild(this.createCellElem("Y",l,v));null!=b&&x.appendChild(this.createCellElem("A",b,n));null!=m&&x.appendChild(this.createCellElem("B",m,A));null!=f&&x.appendChild(this.createCellElem("C",f,G));null!=t&&x.appendChild(this.createCellElem("D",t,u));return x}; +VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(c){this.filesLoading=0;this.zip=c};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(c){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,c):this.xmlDoc.createElement(c)}; +mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var c=this.createElt("Section");c.setAttribute("N","Geometry");c.setAttribute("IX",this.geoIndex++);this.geoSec=c;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(c,u,q){this.geoIndex=0;this.shape=c;this.cellState=u;this.xmGeo=u.cell.geometry;this.xmlDoc=q;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()}; +mxVsdxCanvas2D.prototype.newEdge=function(c,u,q){this.shape=c;this.cellState=u;this.xmGeo=u.cellBounds;this.xmlDoc=q};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec}; +mxVsdxCanvas2D.prototype.createCellElemScaled=function(c,u,q){return this.createCellElem(c,u/VsdxExport.prototype.CONVERSION_FACTOR,q)};mxVsdxCanvas2D.prototype.createCellElem=function(c,u,q){var l=this.createElt("Cell");l.setAttribute("N",c);l.setAttribute("V",u);q&&l.setAttribute("F",q);return l}; +mxVsdxCanvas2D.prototype.createRowScaled=function(c,u,q,l,h,f,b,a,d,g,n,C,D,y){return this.createRowRel(c,u,q/VsdxExport.prototype.CONVERSION_FACTOR,l/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,f/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,d,g,n,C,D,y)}; +mxVsdxCanvas2D.prototype.createRowRel=function(c,u,q,l,h,f,b,a,d,g,n,C,D,y){var p=this.createElt("Row");p.setAttribute("T",c);p.setAttribute("IX",u);p.appendChild(this.createCellElem("X",q,d));p.appendChild(this.createCellElem("Y",l,g));null!=h&&p.appendChild(this.createCellElem("A",h,n));null!=f&&p.appendChild(this.createCellElem("B",f,C));null!=b&&p.appendChild(this.createCellElem("C",b,D));null!=a&&p.appendChild(this.createCellElem("D",a,y));return p}; mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()}; -mxVsdxCanvas2D.prototype.rect=function(a,e,k,l){1<this.geoStepIndex&&this.createGeoSec();var b=this.state;k*=b.scale;l*=b.scale;var m=this.xmGeo;a=(a-m.x+b.dx)*b.scale/k;e=(m.height-e+m.y-b.dy)*b.scale/l;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,a,e));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,a+1,e));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,a+1,e-1));this.geoSec.appendChild(this.createRowRel("RelLineTo", -this.geoStepIndex++,a,e-1));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,a,e))};mxVsdxCanvas2D.prototype.roundrect=function(a,e,k,l,b,m){this.rect(a,e,k,l);this.shape.appendChild(this.createCellElemScaled("Rounding",b))}; -mxVsdxCanvas2D.prototype.ellipse=function(a,e,k,l){1<this.geoStepIndex&&this.createGeoSec();var b=this.state;k*=b.scale;l*=b.scale;var m=this.xmGeo,f=m.height*b.scale,t=m.width*b.scale;a=(a-m.x+b.dx)*b.scale;e=f+(-e+m.y-b.dy)*b.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,a+k/2,e-l/2,a,e-l/2,a+k/2,e,"Width*"+(a+k/2)/t,"Height*"+(e-l/2)/f,"Width*"+a/t,"Height*"+(e-l/2)/f,"Width*"+(a+k/2)/t,"Height*"+e/f))}; -mxVsdxCanvas2D.prototype.moveTo=function(a,e){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=a;this.lastMoveToY=e;this.lastX=a;this.lastY=e;var k=this.xmGeo,l=this.state;a=(a-k.x+l.dx)*l.scale;e=(k.height-e+k.y-l.dy)*l.scale;var b=k.height*l.scale,k=k.width*l.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,a/k,e/b))}; -mxVsdxCanvas2D.prototype.lineTo=function(a,e){this.lastX=a;this.lastY=e;var k=this.xmGeo,l=this.state;a=(a-k.x+l.dx)*l.scale;e=(k.height-e+k.y-l.dy)*l.scale;var b=k.height*l.scale,k=k.width*l.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,a/k,e/b))}; -mxVsdxCanvas2D.prototype.quadTo=function(a,e,k,l){this.lastX=k;this.lastY=l;var b=this.state,m=this.xmGeo,f=m.height*b.scale,t=m.width*b.scale;a=(a-m.x+b.dx)*b.scale;e=(m.height-e+m.y-b.dy)*b.scale;k=(k-m.x+b.dx)*b.scale;l=(m.height-l+m.y-b.dy)*b.scale;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,k/t,l/f,a/t,e/f))}; -mxVsdxCanvas2D.prototype.curveTo=function(a,e,k,l,b,m){this.lastX=b;this.lastY=m;var f=this.state,t=this.xmGeo,r=t.height*f.scale,v=t.width*f.scale;a=(a-t.x+f.dx)*f.scale;e=(t.height-e+t.y-f.dy)*f.scale;k=(k-t.x+f.dx)*f.scale;l=(t.height-l+t.y-f.dy)*f.scale;b=(b-t.x+f.dx)*f.scale;m=(t.height-m+t.y-f.dy)*f.scale;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,b/v,m/r,a/v,e/r,k/v,l/r))}; -mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(a,e){var k=this.createElt("ForeignData");k.setAttribute("ForeignType","Bitmap");a=a.toUpperCase();"BMP"!=a&&k.setAttribute("CompressionType",a);var l=this.createElt("Rel");l.setAttribute("r:id","rId"+e);k.appendChild(l);this.shape.appendChild(k);this.shapeType="Foreign"}; -mxVsdxCanvas2D.prototype.convertSvg2Png=function(a,e,k){var l=this;this.filesLoading++;try{var b=document.createElement("canvas"),m=b.getContext("2d");e||(a=String.fromCharCode.apply(null,new Uint8Array(a)),a=window.btoa?btoa(a):Base64.encode(a,!0));e="data:image/svg+xml;base64,"+a;img=new Image;img.onload=function(){b.width=this.width;b.height=this.height;m.drawImage(this,0,0);try{k(b.toDataURL("image/png"))}catch(f){}l.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed"); -try{k(a)}catch(f){}l.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()};img.src=e}catch(f){console.log("SVG2PNG conversion failed"+f.message);try{k(a)}catch(t){}this.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()}}; -mxVsdxCanvas2D.prototype.image=function(a,e,k,l,b,m,f,t){var r=this,v="image"+(this.images.length+1)+".",n;if(0==b.indexOf("data:"))n=b.indexOf("base64,"),m=b.substring(n+7),n=b.substring(11,n-1),0==n.indexOf("svg")?(n="png",v+=n,this.convertSvg2Png(m,!0,function(a){r.zip.file("visio/media/"+v,a.substring(22),{base64:!0})})):(v+=n,this.zip.file("visio/media/"+v,m,{base64:!0}));else if(window.XMLHttpRequest){b=this.converter.convert(b);this.filesLoading++;n=b.lastIndexOf(".");n=b.substring(n+1);var A= -!1;0==n.indexOf("svg")&&(n="png",A=!0);v+=n;m=new XMLHttpRequest;m.open("GET",b,!0);m.responseType="arraybuffer";m.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(A?r.convertSvg2Png(this.response,!1,function(a){r.zip.file("visio/media/"+v,a.substring(22),{base64:!0})}):r.zip.file("visio/media/"+v,this.response)),r.filesLoading--,0==r.filesLoading))r.onFilesLoaded()};m.send()}this.images.push(v);this.shapeImg={type:n,id:this.images.length+1};b=this.state;k*=b.scale;l*=b.scale; -n=this.xmGeo;a=(a-n.x+b.dx)*b.scale;e=(n.height-e+n.y-b.dy)*b.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",a));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",e-l));this.shape.appendChild(this.createCellElemScaled("ImgWidth",k));this.shape.appendChild(this.createCellElemScaled("ImgHeight",l))}; -mxVsdxCanvas2D.prototype.text=function(a,e,k,l,b,m,f,t,r,v,n,A,G){var u=this;if(this.textEnabled&&null!=b){mxUtils.isNode(b)&&(b=mxUtils.getOuterHtml(b));"html"==r&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(b=b.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=b,b=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));v=this.state;n=this.xmGeo;k*=v.scale;l*=v.scale;var x=this.createElt("Section"); -x.setAttribute("N","Character");var C=this.createElt("Section");C.setAttribute("N","Paragraph");var F=this.createElt("Text"),H=0,p=0,q=0,E=0,D=0,c=0,d=function(a,b,d,e,f){d=a.fontSize;var g=a.fontFamily,h=mxUtils.getSizeForString(f,d,g);t&&h.width>k&&(h=mxUtils.getSizeForString(f,d,g,k));a.blockElem?(E+=h.width,p=Math.min(Math.max(p,E),k),E=0,D=Math.max(D,h.height),q+=D+c,c=D,D=0):(E+=h.width,p=Math.min(Math.max(p,E),k),D=Math.max(D,h.height),q=Math.max(q,D));h=u.createElt("Row");h.setAttribute("IX", -H);a.fontColor&&h.appendChild(u.createCellElem("Color",a.fontColor));d&&h.appendChild(u.createCellElemScaled("Size",.97*d));g&&h.appendChild(u.createCellElem("Font",g));d=0;a.bold&&(d|=17);a.italic&&(d|=34);a.underline&&(d|=4);h.appendChild(u.createCellElem("Style",d));h.appendChild(u.createCellElem("Case","0"));h.appendChild(u.createCellElem("Pos","0"));h.appendChild(u.createCellElem("FontScale","1"));h.appendChild(u.createCellElem("Letterspace","0"));b.appendChild(h);b=u.createElt("cp");b.setAttribute("IX", -H++);e.appendChild(b);a=u.xmlDoc.createTextNode(f+(a.blockElem?"\n":""));e.appendChild(a)},h=function(a,b){b=b||{};for(var c=0;c<a.length;c++)if(3==a[c].nodeType){var e={fontColor:b.fontColor||u.cellState.style.fontColor,fontSize:b.fontSize||u.cellState.style.fontSize,fontFamily:b.fontFamily||u.cellState.style.fontFamily,align:b.align||u.cellState.style.align,bold:b.bold,italic:b.italic,underline:b.underline};d(e,x,C,F,a[c].textContent)}else if(1==a[c].nodeType){var e=a[c].nodeName.toUpperCase(), -g=a[c].childNodes.length,f=window.getComputedStyle(a[c],null),k="bold"==f.getPropertyValue("font-weight")||b.bold,l="italic"==f.getPropertyValue("font-style")||b.italic,m=0<=f.getPropertyValue("text-decoration").indexOf("underline")||b.underline,p=f.getPropertyValue("text-align"),n;n=f.getPropertyValue("color");n=(n=n.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===n.length?"#"+("0"+parseInt(n[1],10).toString(16)).slice(-2)+("0"+parseInt(n[2],10).toString(16)).slice(-2)+ -("0"+parseInt(n[3],10).toString(16)).slice(-2):"";e={bold:k,italic:l,underline:m,align:p,fontColor:n,fontSize:parseFloat(f.getPropertyValue("font-size")),fontFamily:f.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==f.getPropertyValue("display")||"BR"==e||"LI"==e};0<g?(d(e,x,C,F,""),h(a[c].childNodes,e)):d(e,x,C,F,a[c].textContent)}};"html"==r&&mxClient.IS_SVG?(b=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1].childNodes,h(b,{})):d({fontColor:u.cellState.style.fontColor, -fontSize:u.cellState.style.fontSize,fontFamily:u.cellState.style.fontFamily},x,C,F,b);r=b=0;switch(m){case "right":b=p/2;break;case "center":b=0;break;case "left":b=-p/2}switch(f){case "top":r=q/2;break;case "middle":r=0;break;case "bottom":r=-q/2}l=Math.max(l,q);k=Math.max(k,p);a=(a-n.x+v.dx)*v.scale;e=(n.height-e+n.y-v.dy)*v.scale;m=k/2;f=l/2;this.shape.appendChild(this.createCellElemScaled("TxtPinX",a));this.shape.appendChild(this.createCellElemScaled("TxtPinY",e));this.shape.appendChild(this.createCellElemScaled("TxtWidth", -k));this.shape.appendChild(this.createCellElemScaled("TxtHeight",l));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",m+b));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",f+r));0!=A&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-A)*Math.PI/180));this.shape.appendChild(x);this.shape.appendChild(F)}}; -mxVsdxCanvas2D.prototype.rotate=function(a,e,k,l,b){0!=a&&(e=this.state,l+=e.dx,b+=e.dy,l*=e.scale,b*=e.scale,this.shape.appendChild(this.createCellElem("Angle",(360-a)*Math.PI/180)),e.rotation+=a,e.rotationCx=l,e.rotationCy=b)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))}; -mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};/*! +mxVsdxCanvas2D.prototype.rect=function(c,u,q,l){1<this.geoStepIndex&&this.createGeoSec();var h=this.state;q*=h.scale;l*=h.scale;var f=this.xmGeo;c=(c-f.x+h.dx)*h.scale/q;u=(f.height-u+f.y-h.dy)*h.scale/l;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,c,u));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c+1,u));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c+1,u-1));this.geoSec.appendChild(this.createRowRel("RelLineTo", +this.geoStepIndex++,c,u-1));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c,u))};mxVsdxCanvas2D.prototype.roundrect=function(c,u,q,l,h,f){this.rect(c,u,q,l);this.shape.appendChild(this.createCellElemScaled("Rounding",h))}; +mxVsdxCanvas2D.prototype.ellipse=function(c,u,q,l){1<this.geoStepIndex&&this.createGeoSec();var h=this.state;q*=h.scale;l*=h.scale;var f=this.xmGeo,b=f.height*h.scale,a=f.width*h.scale;c=(c-f.x+h.dx)*h.scale;u=b+(-u+f.y-h.dy)*h.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,c+q/2,u-l/2,c,u-l/2,c+q/2,u,"Width*"+(c+q/2)/a,"Height*"+(u-l/2)/b,"Width*"+c/a,"Height*"+(u-l/2)/b,"Width*"+(c+q/2)/a,"Height*"+u/b))}; +mxVsdxCanvas2D.prototype.moveTo=function(c,u){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=c;this.lastMoveToY=u;this.lastX=c;this.lastY=u;var q=this.xmGeo,l=this.state;c=(c-q.x+l.dx)*l.scale;u=(q.height-u+q.y-l.dy)*l.scale;var h=q.height*l.scale,q=q.width*l.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,c/q,u/h))}; +mxVsdxCanvas2D.prototype.lineTo=function(c,u){this.lastX=c;this.lastY=u;var q=this.xmGeo,l=this.state;c=(c-q.x+l.dx)*l.scale;u=(q.height-u+q.y-l.dy)*l.scale;var h=q.height*l.scale,q=q.width*l.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c/q,u/h))}; +mxVsdxCanvas2D.prototype.quadTo=function(c,u,q,l){this.lastX=q;this.lastY=l;var h=this.state,f=this.xmGeo,b=f.height*h.scale,a=f.width*h.scale;c=(c-f.x+h.dx)*h.scale;u=(f.height-u+f.y-h.dy)*h.scale;q=(q-f.x+h.dx)*h.scale;l=(f.height-l+f.y-h.dy)*h.scale;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,q/a,l/b,c/a,u/b))}; +mxVsdxCanvas2D.prototype.curveTo=function(c,u,q,l,h,f){this.lastX=h;this.lastY=f;var b=this.state,a=this.xmGeo,d=a.height*b.scale,g=a.width*b.scale;c=(c-a.x+b.dx)*b.scale;u=(a.height-u+a.y-b.dy)*b.scale;q=(q-a.x+b.dx)*b.scale;l=(a.height-l+a.y-b.dy)*b.scale;h=(h-a.x+b.dx)*b.scale;f=(a.height-f+a.y-b.dy)*b.scale;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,h/g,f/d,c/g,u/d,q/g,l/d))}; +mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(c,u){var q=this.createElt("ForeignData");q.setAttribute("ForeignType","Bitmap");c=c.toUpperCase();"BMP"!=c&&q.setAttribute("CompressionType",c);var l=this.createElt("Rel");l.setAttribute("r:id","rId"+u);q.appendChild(l);this.shape.appendChild(q);this.shapeType="Foreign"}; +mxVsdxCanvas2D.prototype.convertSvg2Png=function(c,u,q){var l=this;this.filesLoading++;try{var h=document.createElement("canvas"),f=h.getContext("2d");u||(c=String.fromCharCode.apply(null,new Uint8Array(c)),c=window.btoa?btoa(c):Base64.encode(c,!0));u="data:image/svg+xml;base64,"+c;img=new Image;img.onload=function(){h.width=this.width;h.height=this.height;f.drawImage(this,0,0);try{q(h.toDataURL("image/png"))}catch(b){}l.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed"); +try{q(c)}catch(b){}l.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()};img.src=u}catch(b){console.log("SVG2PNG conversion failed"+b.message);try{q(c)}catch(a){}this.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()}}; +mxVsdxCanvas2D.prototype.image=function(c,u,q,l,h,f,b,a){var d=this,g="image"+(this.images.length+1)+".",n;if(0==h.indexOf("data:"))n=h.indexOf("base64,"),f=h.substring(n+7),n=h.substring(11,n-1),0==n.indexOf("svg")?(n="png",g+=n,this.convertSvg2Png(f,!0,function(a){d.zip.file("visio/media/"+g,a.substring(22),{base64:!0})})):(g+=n,this.zip.file("visio/media/"+g,f,{base64:!0}));else if(window.XMLHttpRequest){h=this.converter.convert(h);this.filesLoading++;n=h.lastIndexOf(".");n=h.substring(n+1);var C= +!1;0==n.indexOf("svg")&&(n="png",C=!0);g+=n;f=new XMLHttpRequest;f.open("GET",h,!0);f.responseType="arraybuffer";f.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(C?d.convertSvg2Png(this.response,!1,function(a){d.zip.file("visio/media/"+g,a.substring(22),{base64:!0})}):d.zip.file("visio/media/"+g,this.response)),d.filesLoading--,0==d.filesLoading))d.onFilesLoaded()};f.send()}this.images.push(g);this.shapeImg={type:n,id:this.images.length+1};h=this.state;q*=h.scale;l*=h.scale; +n=this.xmGeo;c=(c-n.x+h.dx)*h.scale;u=(n.height-u+n.y-h.dy)*h.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",c));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",u-l));this.shape.appendChild(this.createCellElemScaled("ImgWidth",q));this.shape.appendChild(this.createCellElemScaled("ImgHeight",l))}; +mxVsdxCanvas2D.prototype.text=function(c,u,q,l,h,f,b,a,d,g,n,C,D){var y=this;if(this.textEnabled&&null!=h){mxUtils.isNode(h)&&(h=mxUtils.getOuterHtml(h));"html"==d&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(h=h.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=h,h=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));g=this.state;n=this.xmGeo;q*=g.scale;l*=g.scale;var p=this.createElt("Section"); +p.setAttribute("N","Character");var z=this.createElt("Section");z.setAttribute("N","Paragraph");var W=this.createElt("Text"),P=0,E=0,A=0,F=0,B=0,Z=0,K=function(b,d,g,n,c){g=b.fontSize;var f=b.fontFamily,C=mxUtils.getSizeForString(c,g,f);a&&C.width>q&&(C=mxUtils.getSizeForString(c,g,f,q));b.blockElem?(F+=C.width,E=Math.min(Math.max(E,F),q),F=0,B=Math.max(B,C.height),A+=B+Z,Z=B,B=0):(F+=C.width,E=Math.min(Math.max(E,F),q),B=Math.max(B,C.height),A=Math.max(A,B));C=y.createElt("Row");C.setAttribute("IX", +P);b.fontColor&&C.appendChild(y.createCellElem("Color",b.fontColor));g&&C.appendChild(y.createCellElemScaled("Size",.97*g));f&&C.appendChild(y.createCellElem("Font",f));g=0;b.bold&&(g|=17);b.italic&&(g|=34);b.underline&&(g|=4);C.appendChild(y.createCellElem("Style",g));C.appendChild(y.createCellElem("Case","0"));C.appendChild(y.createCellElem("Pos","0"));C.appendChild(y.createCellElem("FontScale","1"));C.appendChild(y.createCellElem("Letterspace","0"));d.appendChild(C);d=y.createElt("cp");d.setAttribute("IX", +P++);n.appendChild(d);b=y.xmlDoc.createTextNode(c+(b.blockElem?"\n":""));n.appendChild(b)},Y=function(a,b){b=b||{};for(var d=0;d<a.length;d++)if(3==a[d].nodeType){var g={fontColor:b.fontColor||y.cellState.style.fontColor,fontSize:b.fontSize||y.cellState.style.fontSize,fontFamily:b.fontFamily||y.cellState.style.fontFamily,align:b.align||y.cellState.style.align,bold:b.bold,italic:b.italic,underline:b.underline};K(g,p,z,W,a[d].textContent)}else if(1==a[d].nodeType){var g=a[d].nodeName.toUpperCase(), +n=a[d].childNodes.length,c=window.getComputedStyle(a[d],null),f="bold"==c.getPropertyValue("font-weight")||b.bold,C="italic"==c.getPropertyValue("font-style")||b.italic,D=0<=c.getPropertyValue("text-decoration").indexOf("underline")||b.underline,h=c.getPropertyValue("text-align"),l;l=c.getPropertyValue("color");l=(l=l.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===l.length?"#"+("0"+parseInt(l[1],10).toString(16)).slice(-2)+("0"+parseInt(l[2],10).toString(16)).slice(-2)+ +("0"+parseInt(l[3],10).toString(16)).slice(-2):"";g={bold:f,italic:C,underline:D,align:h,fontColor:l,fontSize:parseFloat(c.getPropertyValue("font-size")),fontFamily:c.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==c.getPropertyValue("display")||"BR"==g||"LI"==g};0<n?(K(g,p,z,W,""),Y(a[d].childNodes,g)):K(g,p,z,W,a[d].textContent)}};"html"==d&&mxClient.IS_SVG?(h=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1].childNodes,Y(h,{})):K({fontColor:y.cellState.style.fontColor, +fontSize:y.cellState.style.fontSize,fontFamily:y.cellState.style.fontFamily},p,z,W,h);d=h=0;switch(f){case "right":h=E/2;break;case "center":h=0;break;case "left":h=-E/2}switch(b){case "top":d=A/2;break;case "middle":d=0;break;case "bottom":d=-A/2}l=Math.max(l,A);q=Math.max(q,E);c=(c-n.x+g.dx)*g.scale;u=(n.height-u+n.y-g.dy)*g.scale;f=q/2;b=l/2;this.shape.appendChild(this.createCellElemScaled("TxtPinX",c));this.shape.appendChild(this.createCellElemScaled("TxtPinY",u));this.shape.appendChild(this.createCellElemScaled("TxtWidth", +q));this.shape.appendChild(this.createCellElemScaled("TxtHeight",l));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",f+h));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",b+d));0!=C&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-C)*Math.PI/180));this.shape.appendChild(p);this.shape.appendChild(W)}}; +mxVsdxCanvas2D.prototype.rotate=function(c,u,q,l,h){0!=c&&(u=this.state,l+=u.dx,h+=u.dy,l*=u.scale,h*=u.scale,this.shape.appendChild(this.createCellElem("Angle",(360-c)*Math.PI/180)),u.rotation+=c,u.rotationCx=l,u.rotationCy=h)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))}; +mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(c,u){this.pos=0;this.buffer=c;this.is_with_alpha=!!u;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()} +BmpDecoder.prototype.parseHeader=function(){var c=this.buffer;this.fileSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.reserved=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.offset=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.headerSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.width=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos]; +this.pos+=4;this.height=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.planes=c[this.pos+1]<<8|c[this.pos];this.pos+=2;this.bitPP=c[this.pos+1]<<8|c[this.pos];this.pos+=2;this.compress=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.rawSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.hr=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.vr=c[this.pos+3]<<24|c[this.pos+ +2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.colors=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.importantColors=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){c=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(c);for(var u=0;u<c;u++){var q=this.buffer[this.pos++],l=this.buffer[this.pos++],h=this.buffer[this.pos++],f=this.buffer[this.pos++]; +this.palette[u]={red:h,green:l,blue:q,quad:f}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var c="bit"+this.bitPP,u=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=u;this.data=u.data;this[c]()}catch(q){console.log("bit decode error:"+q)}}; +BmpDecoder.prototype.bit1=function(){for(var c=Math.ceil(this.width/8),u=c%4,q=this.height-1;0<=q;q--){for(var l=0;l<c;l++)for(var h=this.buffer[this.pos++],f=q*this.width*4+32*l,b=0;8>b;b++)if(8*l+b<this.width){var a=this.palette[h>>7-b&1];this.data[f+4*b]=a.red;this.data[f+4*b+1]=a.green;this.data[f+4*b+2]=a.blue;this.data[f+4*b+3]=255}else break;0!=u&&(this.pos+=4-u)}}; +BmpDecoder.prototype.bit4=function(){for(var c=Math.ceil(this.width/2),u=c%4,q=this.height-1;0<=q;q--){for(var l=0;l<c;l++){var h=this.buffer[this.pos++],f=q*this.width*4+8*l,b=h&15,h=this.palette[h>>4];this.data[f]=h.red;this.data[f+1]=h.green;this.data[f+2]=h.blue;this.data[f+3]=255;if(2*l+1>=this.width)break;h=this.palette[b];this.data[f+4]=h.red;this.data[f+4+1]=h.green;this.data[f+4+2]=h.blue;this.data[f+4+3]=255}0!=u&&(this.pos+=4-u)}}; +BmpDecoder.prototype.bit8=function(){for(var c=this.width%4,u=this.height-1;0<=u;u--){for(var q=0;q<this.width;q++){var l=this.buffer[this.pos++],h=u*this.width*4+4*q;l<this.palette.length?(l=this.palette[l],this.data[h]=l.red,this.data[h+1]=l.green,this.data[h+2]=l.blue):(this.data[h]=255,this.data[h+1]=255,this.data[h+2]=255);this.data[h+3]=255}0!=c&&(this.pos+=4-c)}}; +BmpDecoder.prototype.bit15=function(){var c=2*this.width%4;0!=c&&(c=4-c);for(var u=this.height-1;0<=u;u--){for(var q=0;q<this.width;q++){var l=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var h=(l&31)/31*255|0,f=(l>>5&31)/31*255|0,b=l>>15?255:0,a=u*this.width*4+4*q;this.data[a]=(l>>10&31)/31*255|0;this.data[a+1]=f;this.data[a+2]=h;this.data[a+3]=b}this.pos+=c}}; +BmpDecoder.prototype.bit16=function(){var c=2*this.width%4;0!=c&&(c=4-c);for(var u=this.height-1;0<=u;u--){for(var q=0;q<this.width;q++){var l=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var h=(l&31)/31*255|0,f=(l>>5&31)/31*255|0,b=u*this.width*4+4*q;this.data[b]=(l>>10&31)/31*255|0;this.data[b+1]=f;this.data[b+2]=h;this.data[b+3]=255}this.pos+=c}}; +BmpDecoder.prototype.bit24=function(){var c=3*this.width%4;0!=c&&(c=4-c);for(var u=this.height-1;0<=u;u--){for(var q=0;q<this.width;q++){var l=this.buffer[this.pos++],h=this.buffer[this.pos++],f=this.buffer[this.pos++],b=u*this.width*4+4*q;this.data[b]=f;this.data[b+1]=h;this.data[b+2]=l;this.data[b+3]=255}this.pos+=c}}; +BmpDecoder.prototype.bit32=function(){for(var c=this.height-1;0<=c;c--)for(var u=0;u<this.width;u++){var q=this.buffer[this.pos++],l=this.buffer[this.pos++],h=this.buffer[this.pos++],f=this.buffer[this.pos++],b=c*this.width*4+4*u;this.data[b]=h;this.data[b+1]=l;this.data[b+2]=q;this.data[b+3]=f}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(c,u){function q(){this.constructor=c}for(var l in u)u.hasOwnProperty(l)&&(c[l]=u[l]);c.prototype=null===u?Object.create(u):(q.prototype=u.prototype,new q)},com; +(function(c){(function(u){(function(q){var l=function(){function h(){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.debugPaths=!1;this.vsdxModel=null}h.vsdxPlaceholder_$LI$=function(){null==h.vsdxPlaceholder&&(h.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return h.vsdxPlaceholder}; +h.prototype.decodeVsdx=function(f,b,a,d){var g=this,n={},C={},D=function(){for(var a=h.vsdxPlaceholder+"/document.xml",d=n[a]?n[a]:null,f=d.firstChild;null!=f&&1!=f.nodeType;)f=f.nextSibling;if(null!=f&&1==f.nodeType)g.importNodes(d,f,a,n);else return null;g.vsdxModel=new c.mxgraph.io.vsdx.mxVsdxModel(d,n,C);for(var a=g.vsdxModel.getPages(),D=g.RESPONSE_HEADER,y=function(a){null==a.entries&&(a.entries=[]);return a.entries}(a),a=function(a){a=y[a].getValue();if(!a.isBackground()){var b=p.createMxGraph(); +b.getModel().beginUpdate();p.importPage(a,b,b.getDefaultParent());var d=a.getBackPage();if(null!=d){b.getModel().setValue(b.getDefaultParent(),a.getPageName());var n=new mxCell(d.getPageName());b.addCell(n,b.getModel().getRoot(),0,null,null);p.importPage(d,b,b.getDefaultParent())}d=a.getPageScale()/a.getDrawingScale();if(1!==d){var n=b.getModel(),c;for(c in n.cells){var f=n.cells[c],C=n.getGeometry(f);if(null!=C&&(p.scaleRect(C,d),p.scaleRect(C.alternateBounds,d),n.isEdge(f)&&(p.scalePoint(C.sourcePoint, +d),p.scalePoint(C.targetPoint,d),p.scalePoint(C.offset,d),f=C.points,null!=f)))for(C=0;C<f.length;C++)p.scalePoint(f[C],d)}}b.getModel().endUpdate();D=D.concat(g.RESPONSE_DIAGRAM_START);D=D.concat(g.processPage(b,a));D=D.concat(g.RESPONSE_DIAGRAM_END)}},p=g,d=0;d<y.length;d++)a(d);D=D.concat(g.RESPONSE_END);b&&b(D)},y=0,p=0,l=function(){p==y&&D()};JSZip.loadAsync(f).then(function(a){a.forEach(function(a,b){var d=b.name,f=d.toLowerCase(),D=f.length;f.indexOf(".xml")==D-4||f.indexOf(".xml.rels")==D- +9?(y++,b.async("string").then(function(a){if(0!==a.length){var b=void 0;void 0===b&&(b=0);""===a.substr(b,3)&&(a=a.substring(3));a=mxUtils.parseXml(a);a.vsdxFileName=d;n[d]=a}p++;l()})):0===f.indexOf(h.vsdxPlaceholder+"/media")&&(y++,function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".emf")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){for(var b=!1,n="",f=0;f<a.length-8;f++)if(g.isPng(a,f)||g.isJpg(a,f)){n=c.mxgraph.online.mxBase64.encodeToString(a, +f);b=!0;break}b&&(C[d]=n);p++;l()}):function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=new BmpDecoder(a);var b=document.createElement("canvas");b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");C[d]=a.substr(23);p++;l()}):b.async("base64").then(function(a){C[d]=a;p++;l()}))})},function(a){null!=d&&d(a)})};h.prototype.createMxGraph=function(){var c= +new mxGraph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};h.prototype.processPage=function(c,b){var a=(new mxCodec).encode(c.getModel());a.setAttribute("style","default-style2");var a=mxUtils.getXml(a),d="";if(null!=b)var g=mxUtils.htmlEntities(b.getPageName()),d=d+('<diagram name="'+g+'">');return d+=Graph.prototype.compress(a)};h.prototype.isJpg=function(c,b){return 255===c[b]&&216===c[b+1]&&255===c[b+ +2]};h.prototype.isPng=function(c,b){return 137===c[b]&&80===c[b+1]&&78===c[b+2]&&71===c[b+3]&&13===c[b+4]&&10===c[b+5]&&26===c[b+6]&&10===c[b+7]};h.prototype.scalePoint=function(c,b){null!=c&&(c.x*=b,c.y*=b);return c};h.prototype.scaleRect=function(c,b){null!=c&&(c.x*=b,c.y*=b,c.height*=b,c.width*=b);return c};h.prototype.importNodes=function(c,b,a,d){var g=a.lastIndexOf("/"),n=a,f=a;if(-1!==g&&(n=a.substring(0,g),f=a.substring(g+1,a.length),a=function(a,b){return a[b]?a[b]:null}(d,n+"/_rels/"+f+ +".rels"),null!=a)){var D=a.getElementsByTagName("Relationship");a={};for(g=0;g<D.length;g++){var f=D.item(g),y=f.getAttribute("Id"),f=f.getAttribute("Target");a[y]=f}b=b.getElementsByTagName("Rel");for(g=0;g<b.length;g++)if(D=b.item(g),f=function(a,b){return a[b]?a[b]:null}(a,D.getAttribute("r:id")),f=n+"/"+f,null!=f&&(y=d[f]?d[f]:null,null!=y)){D=D.parentNode;for(y=y.firstChild;null!=y&&1!=y.nodeType;)y=y.nextSibling;if(null!=y&&1==y.nodeType)for(y=y.firstChild;null!=y;){if(null!=y&&1==y.nodeType){var p= +D.appendChild(c.importNode(y,!0));this.importNodes(c,p,f,d)}y=y.nextSibling}}}};h.prototype.importPage=function(c,b,a){for(var d=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(c.getShapes())),g=c.getPageDimensions().y,n=c.getId();d.hasNext();){var f=d.next();this.addShape(b,f.getValue(),a,n,g)}for(c=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null}, +hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(c.getConnects()));c.hasNext();)f=c.next(),f=this.addConnectedEdge(b,f.getValue(),n,g),null!=f&&function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries.splice(d,1)[0]}(this.edgeShapeMap,f);for(f=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b< +a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(this.edgeShapeMap));f.hasNext();)c=f.next(),c.getKey().getPageNumber()===n&&this.addUnconnectedEdge(b,function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,c.getKey()),c.getValue(),g);this.sanitiseGraph(b);return g};h.prototype.addShape=function(f,b,a,d,g){b.parentHeight= +g;var n=c.mxgraph.io.vsdx.VsdxShape.getType(b.getShape());if(null!=n&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){n=b.getId();if(b.isVertex()){var C=null,C=b.isGroup()?this.addGroup(f,b,a,d,g):this.addVertex(f,b,a,d,g);(function(a,b,d){null==a.entries&& +(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,n),b);return C}b.setShapeIndex(f.getModel().getChildCount(a));(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&& +a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,n),b);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(d,n),a)}return null};h.prototype.addGroup=function(f,b,a,d,g){var n=b.getDimensions(),C=b.getMaster(),D=b.getStyleFromShape(),y=b.getGeomList();y.isNoFill()&&(D[mxConstants.STYLE_FILLCOLOR]="none",D[mxConstants.STYLE_GRADIENTCOLOR]="none");y.isNoLine()&&(D[mxConstants.STYLE_STROKECOLOR]="none");D.html="1";D[mxConstants.STYLE_WHITE_SPACE]="wrap";var p=c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"="),D=null, +h=b.getChildShapes(),D=null!=h&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(h),y=b.isDisplacedLabel()||b.isRotatedLabel()||D,D=b.getOriginPoint(g,!0);if(y)D=f.insertVertex(a,null,null,Math.floor(Math.round(100*D.x)/100),Math.floor(Math.round(100*D.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),p);else var l=b.getTextLabel(),D=f.insertVertex(a,null,l,Math.floor(Math.round(100*D.x)/100),Math.floor(Math.round(100*D.y)/100),Math.floor(Math.round(100* +n.x)/100),Math.floor(Math.round(100*n.y)/100),p);for(a=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(h));a.hasNext();)p=a.next().getValue(),h=p.getId(),p.isVertex()?(l=c.mxgraph.io.vsdx.VsdxShape.getType(p.getShape()),null!=l&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(l,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b): +a===b}(l,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(l,c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&p.isVertex()&&(p.propagateRotation(b.getRotation()),p.isGroup()?this.addGroup(f,p,D,d,n.y):this.addVertex(f,p,D,d,n.y)),null==C&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b, +value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,h),p)):null==C?(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d, +h),p),function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(d,h),D)):this.addUnconnectedEdge(f,D,p,g);y&&b.createLabelSubShape(f,D);f=b.getRotation();if(0!==f)for(d=D.getGeometry(),b=d.width/2,d=d.height/ +2,g=0;g<D.getChildCount();g++)n=D.getChildAt(g),c.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),f,b,d);return D};h.rotatedEdgePoint=function(c,b,a,d){b=b*Math.PI/180;var g=Math.cos(b);b=Math.sin(b);var n=c.x-a,f=c.y-d;c.x=Math.round(n*g-f*b+a);c.y=Math.round(f*g+n*b+d)};h.prototype.addVertex=function(f,b,a,d,g){var n="",C=b.isDisplacedLabel()||b.isRotatedLabel();C||(n=b.getTextLabel());var D=b.getDimensions(),y=b.getStyleFromShape();y.html="1";var p=y.hasOwnProperty(mxConstants.STYLE_SHAPE)|| +y.hasOwnProperty("stencil");y.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&p||(y[mxConstants.STYLE_FILLCOLOR]="none");p||(y[mxConstants.STYLE_STROKECOLOR]="none");y.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&p||(y[mxConstants.STYLE_GRADIENTCOLOR]="none");y[mxConstants.STYLE_WHITE_SPACE]="wrap";g=b.getOriginPoint(g,!0);return p||null!=n?(y=c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y,"="),p=null,p=C?f.insertVertex(a,null,null,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/ +100),Math.floor(Math.round(100*D.x)/100),Math.floor(Math.round(100*D.y)/100),y):f.insertVertex(a,null,n,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/100),Math.floor(Math.round(100*D.x)/100),Math.floor(Math.round(100*D.y)/100),y),function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key}, +getValue:function(){return this.value}})}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(d,b.getId()),p),b.setLabelOffset(p,y),C&&b.createLabelSubShape(f,p),p):null};h.prototype.addConnectedEdge=function(f,b,a,d){var g=b.getFromSheet(),g=new c.mxgraph.io.vsdx.ShapePageId(a,g),n=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.edgeShapeMap, +g);if(null==n)return null;var C=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(a,n.getId()));if(null!=C){var D=f.getModel().getGeometry(C);null!=D&&(d=D.height)}var y=n.getStartXY(d),p=n.getEndXY(d),D=n.getRoutingPoints(d,y,n.getRotation());this.rotateChildEdge(f.getModel(),C,y,p,D);var h=b.getSourceToSheet(), +h=null!=h?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(a,h)):null;null==h&&(h=f.insertVertex(C,null,null,Math.floor(Math.round(100*y.x)/100),Math.floor(Math.round(100*y.y)/100),0,0));b=b.getTargetToSheet();y=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(a,b)):null;null==y&&(y=f.insertVertex(C,null,null,Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),0,0));a=n.getStyleFromEdgeShape(d);b=n.getRotation();0!==b?(C=f.insertEdge(C,null,null,h,y,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),h=n.createLabelSubShape(f,C),null!=h&&(h.setStyle(h.getStyle()+";rotation="+ +(60<b&&240>b?(b+180)%360:b)),b=h.getGeometry(),b.x=0,b.y=0,b.relative=!0,b.offset=new mxPoint(-b.width/2,-b.height/2))):(C=f.insertEdge(C,null,n.getTextLabel(),h,y,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),b=n.getLblEdgeOffset(f.getView(),D),C.getGeometry().offset=b);b=f.getModel().getGeometry(C);b.points=D;a.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(a,"curved"),"1")&&(b=f.getModel().getGeometry(C),f=n.getControlPoints(d), +b.points=f);return g};h.prototype.addUnconnectedEdge=function(f,b,a,d){if(null!=b){var g=f.getModel().getGeometry(b);null!=g&&(d=g.height)}var n=a.getStartXY(d),C=a.getEndXY(d),D=a.getStyleFromEdgeShape(d),y=a.getRoutingPoints(d,n,a.getRotation()),p=a.getRotation();if(0!==p){0===a.getShapeIndex()?g=f.insertEdge(b,null,null,null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"=")):(g=f.createEdge(b,null,null,null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"=")),g=f.addEdge(g,b,null,null, +a.getShapeIndex()));var h=a.createLabelSubShape(f,g);null!=h&&(h.setStyle(h.getStyle()+";rotation="+(60<p&&240>p?(p+180)%360:p)),p=h.getGeometry(),p.x=0,p.y=0,p.relative=!0,p.offset=new mxPoint(-p.width/2,-p.height/2))}else 0===a.getShapeIndex()?g=f.insertEdge(b,null,a.getTextLabel(),null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"=")):(g=f.createEdge(b,null,a.getTextLabel(),null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"=")),g=f.addEdge(g,b,null,null,a.getShapeIndex())),p=a.getLblEdgeOffset(f.getView(), +y),g.getGeometry().offset=p;this.rotateChildEdge(f.getModel(),b,n,C,y);b=f.getModel().getGeometry(g);b.points=y;b.setTerminalPoint(n,!0);b.setTerminalPoint(C,!1);D.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(D,"curved"),"1")&&(b=f.getModel().getGeometry(g),f=a.getControlPoints(d),b.points=f);return g};h.prototype.rotateChildEdge=function(c,b,a,d,g){if(null!=b){var n=c.getGeometry(b);c=c.getStyle(b);if(null!=n&&null!=c&&(b=c.indexOf("rotation="), +-1<b))for(c=parseFloat(c.substring(b+9,c.indexOf(";",b))),b=n.width/2,n=n.height/2,h.rotatedEdgePoint(a,c,b,n),h.rotatedEdgePoint(d,c,b,n),a=0;a<g.length;a++)h.rotatedEdgePoint(g[a],c,b,n)}};h.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this.sanitiseCell(c,b)};h.prototype.sanitiseCell=function(c,b){for(var a=c.getModel(),d=a.getChildCount(b),g=[],n=0;n<d;n++){var f=a.getChildAt(b,n);this.sanitiseCell(c,f)&&0<g.push(f)}for(n=0;n<g.length;n++)a.remove(g[n]);0<d&&(d=a.getChildCount(b)); +g=(new String(a.getValue(b))).toString();n=a.getStyle(b);return 0!==d||!a.isVertex(b)||null!=a.getValue(b)&&0!==g.length||null==n||-1==n.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==n.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=n.indexOf("image=")?!1:!0};return h}();q.mxVsdxCodec=l;l.__class="com.mxgraph.io.mxVsdxCodec"})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){var l=function(h){function f(){var b=h.call(this)||this;b.RESPONSE_END="";b.RESPONSE_DIAGRAM_START="";b.RESPONSE_DIAGRAM_END="";b.RESPONSE_HEADER="";return b}__extends(f,h);f.prototype.decodeVssx=function(b,a,d){var g=this,n="<mxlibrary>[";this.decodeVsdx(b,function(b){n=n.concat(b);var d=g.vsdxModel.getMasterShapes(),f=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b=[];null== +a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(g.vsdxModel.getPages())).next();if(null!=d){var C={str:"",toString:function(){return this.str}},l=0===b.length?"":",",q=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=q[a];var b=u.createMxGraph(),g=a.getMasterShape().getShape(),n=new c.mxgraph.io.vsdx.VsdxShape(f,g,!f.isEdge(g),d,null,u.vsdxModel),g=null;if(n.isVertex()){u.edgeShapeMap.entries=[];u.parentsMap.entries= +[];for(var g=u.addShape(b,n,b.getDefaultParent(),0,1169),n=function(a){null==a.entries&&(a.entries=[]);return a.entries}(u.edgeShapeMap),D=0;D<n.length;D++){var y=n[D],p=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(u.parentsMap,y.getKey());u.addUnconnectedEdge(b,p,y.getValue(),1169)}}else g=u.addUnconnectedEdge(b,null,n,1169);if(null!=g){C.str= +C.str.concat(l);C.str=C.str.concat('{"xml":"');g=u.normalizeGeo(g);u.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";b=h.prototype.processPage.call(u,b,null);C.str=C.str.concat(b);C.str=C.str.concat('","w":');C.str=C.str.concat(g.width);C.str=C.str.concat(',"h":');C.str=C.str.concat(g.height);C.str=C.str.concat(',"title":"');a=a.getName();null!=a&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(a));C.str=C.str.concat(a);C.str=C.str.concat('"}');l=","}};for(var u= +g,E=0;E<q.length;E++)b(E);n=n.concat(C)}n=n.concat("]</mxlibrary>");a&&a(n)},d)};f.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint,d);this.transPoint(a.offset,d);b=a.points;if(null!=b)for(var g=0;g<b.length;g++)this.transPoint(b[g],d);this.transPoint(d,d)}return a};f.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};f.prototype.processPage=function(b,a){var d=b.getModel(),g="",n="",f;for(f in d.cells){var D= +d.cells[f];if(b.getDefaultParent()===d.getParent(D)){var g=g.concat(n),g=g.concat('{"xml":"'),y=this.createMxGraph();y.addCell(D);this.sanitiseGraph(y);if(0===y.getModel().getChildCount(y.getDefaultParent()))return"continue";n=this.normalizeGeo(D);y=h.prototype.processPage.call(this,y,null);g=g.concat(y);g=g.concat('","w":');g=g.concat(n.width);g=g.concat(',"h":');g=g.concat(n.height);g=g.concat(',"title":"');n=d.getStyle(D);D="";if(null!=n&&(y=n.indexOf(c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID), +0<=y)){y+=c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;f=parseInt(n.substring(y,n.indexOf(";",y)));a:{n=this.vertexShapeMap;y=new c.mxgraph.io.vsdx.ShapePageId(a.getId(),f);null==n.entries&&(n.entries=[]);for(var p=0;p<n.entries.length;p++)if(null!=n.entries[p].key.equals&&n.entries[p].key.equals(y)||n.entries[p].key===y){n=n.entries[p].value;break a}n=null}null!=n&&(D=n.getName())}g=g.concat(D);g=g.concat('"}');n=","}}this.RESPONSE_DIAGRAM_START=0<g.length?",":"";return g};return f}(c.mxgraph.io.mxVsdxCodec); +q.mxVssxCodec=l;l.__class="com.mxgraph.io.mxVssxCodec"})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){(function(c){var f=function(){function b(a,b,g){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=g}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA= +function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();c.Row=f;f.__class="com.mxgraph.io.vsdx.geometry.Row"})(c.geometry||(c.geometry={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length)return parseFloat(a)}catch(d){}return null};b.getRowObj=function(a,d){var g=a.getAttribute("T"),n=b.getIndex(a),f;f=(f=a.getAttribute("Del"))&&f.equals?f.equals("1"):"1"===f;if(!f){var D=null;n<=d.length&&(D=d[n-1]);var y=f=null,p=null,h=null,l=null,q=null,u=null, +A=null;null!=D&&(f=D.x,y=D.y,p=D.getA(),h=D.getB(),l=D.getC(),q=D.getD(),A=D.getFormulaA(),u=D.getFormulaE());for(var D=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),F=0;F<D.length;F++){var B=D[F],Z=B.getAttribute("N"),K=B.getAttribute("V");switch(Z){case "X":f=b.getDoubleVal(K);break;case "Y":y=b.getDoubleVal(K);break;case "A":p=b.getDoubleVal(K);A=B.getAttribute("V");break;case "B":h=b.getDoubleVal(K);break;case "C":l=b.getDoubleVal(K);break;case "D":q=b.getDoubleVal(K);break;case "E":u= +K}}switch(g){case "MoveTo":return new c.mxgraph.io.vsdx.geometry.MoveTo(n,f,y);case "LineTo":return new c.mxgraph.io.vsdx.geometry.LineTo(n,f,y);case "ArcTo":return new c.mxgraph.io.vsdx.geometry.ArcTo(n,f,y,p);case "Ellipse":return new c.mxgraph.io.vsdx.geometry.Ellipse(n,f,y,p,h,l,q);case "EllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.EllipticalArcTo(n,f,y,p,h,l,q);case "InfiniteLine":return new c.mxgraph.io.vsdx.geometry.InfiniteLine(n,f,y,p,h);case "NURBSTo":return new c.mxgraph.io.vsdx.geometry.NURBSTo(n, +f,y,p,h,l,q,u);case "PolylineTo":return new c.mxgraph.io.vsdx.geometry.PolylineTo(n,f,y,A);case "RelCubBezTo":return new c.mxgraph.io.vsdx.geometry.RelCubBezTo(n,f,y,p,h,l,q);case "RelEllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(n,f,y,p,h,l,q);case "RelLineTo":return new c.mxgraph.io.vsdx.geometry.RelLineTo(n,f,y);case "RelMoveTo":return new c.mxgraph.io.vsdx.geometry.RelMoveTo(n,f,y);case "RelQuadBezTo":return new c.mxgraph.io.vsdx.geometry.RelQuadBezTo(n,f,y,p,h);case "SplineKnot":return new c.mxgraph.io.vsdx.geometry.SplineKnot(n, +f,y,p);case "SplineStart":return new c.mxgraph.io.vsdx.geometry.SplineStart(n,f,y,p,h,l,q)}}return new c.mxgraph.io.vsdx.geometry.DelRow(n)};return b}();h.RowFactory=f;f.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(){this.colorElementMap={};this.fontElementMap={}}f.__static_initialize=function(){f.__static_initialized||(f.__static_initialized=!0,f.__static_initializer_0())};f.defaultColors_$LI$=function(){f.__static_initialize();null==f.defaultColors&&(f.defaultColors={});return f.defaultColors};f.__static_initializer_0=function(){f.defaultColors_$LI$()["0"]="#000000";f.defaultColors_$LI$()["1"]="#FFFFFF";f.defaultColors_$LI$()["2"]= +"#FF0000";f.defaultColors_$LI$()["3"]="#00FF00";f.defaultColors_$LI$()["4"]="#0000FF";f.defaultColors_$LI$()["5"]="#FFFF00";f.defaultColors_$LI$()["6"]="#FF00FF";f.defaultColors_$LI$()["7"]="#00FFFF";f.defaultColors_$LI$()["8"]="#800000";f.defaultColors_$LI$()["9"]="#008000";f.defaultColors_$LI$()["10"]="#000080";f.defaultColors_$LI$()["11"]="#808000";f.defaultColors_$LI$()["12"]="#800080";f.defaultColors_$LI$()["13"]="#008080";f.defaultColors_$LI$()["14"]="#C0C0C0";f.defaultColors_$LI$()["15"]="#E6E6E6"; +f.defaultColors_$LI$()["16"]="#CDCDCD";f.defaultColors_$LI$()["17"]="#B3B3B3";f.defaultColors_$LI$()["18"]="#9A9A9A";f.defaultColors_$LI$()["19"]="#808080";f.defaultColors_$LI$()["20"]="#666666";f.defaultColors_$LI$()["21"]="#4D4D4D";f.defaultColors_$LI$()["22"]="#333333";f.defaultColors_$LI$()["23"]="#1A1A1A"};f.prototype.initialise=function(b,a){if(null!=b){var d=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<d.length)for(var g=d.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY), +n=g.length,d=0;d<n;d++){var f=g.item(d),D=f.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.INDEX),f=f.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[D]=f}d=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<d.length)for(g=d.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),n=g.length,d=0;d<n;d++)f=g.item(d),D=f.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID),f=f.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),this.fontElementMap[D]= +f}};f.prototype.getColor=function(b){var a=function(a,b){return a[b]?a[b]:null}(this.colorElementMap,b);return null==a&&(a=function(a,b){return a[b]?a[b]:null}(f.defaultColors_$LI$(),b),null==a)?"":a};f.prototype.getFont=function(b){var a=this.fontElementMap;b=a[b]?a[b]:null;return null==b?"":b};return f}();h.__static_initialized=!1;l.mxPropertiesManager=h;h.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)}f.prototype.addFromCell=function(b,a){var d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET), +g=!0;null!=a&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=d&&0!==d.length?parseFloat(d):-1,g=!0):null!=a&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,c.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=d&&0!==d.length?parseFloat(d):-1,g=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=d&&0!==d.length?parseFloat(d):-1,g=!0):null==this.targetToSheet&&(this.targetToSheet=null!=d&&0!==d.length? +parseFloat(d):-1,g=!1);this.findToPart(b,g)};f.prototype.findToPart=function(b,a){var d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TO_PART),d=null!=d&&0!==d.length?parseFloat(d):-1;a?this.sourceToPart=d:this.targetToPart=d};f.prototype.getFromSheet=function(){return this.fromSheet};f.prototype.getSourceToSheet=function(){return this.sourceToSheet};f.prototype.getTargetToSheet=function(){return this.targetToSheet};f.prototype.getSourceToPart=function(){return this.sourceToPart};f.prototype.getTargetToPart= +function(){return this.targetToPart};f.prototype.addConnect=function(b){this.endShape=b;var a=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)};return f}();l.mxVsdxConnect=h;h.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){var h=function(){function c(){}c.SET_VALUES_$LI$=function(){null==c.SET_VALUES&&(c.SET_VALUES=["a","b"]);return c.SET_VALUES};c.MY_SET_$LI$=function(){null==c.MY_SET&&(c.MY_SET=c.SET_VALUES_$LI$().slice(0).slice(0));return c.MY_SET};return c}();h.ANGLE="Angle";h.ARC_TO="ArcTo";h.BACKGROUND="Background";h.BACK_PAGE="BackPage";h.BEGIN_ARROW="BeginArrow";h.BEGIN_ARROW_SIZE="BeginArrowSize";h.BEGIN_X="BeginX";h.BEGIN_Y="BeginY";h.BOTTOM_MARGIN="BottomMargin"; +h.BULLET="Bullet";h.CASE="Case";h.CHARACTER="Character";h.COLOR="Color";h.COLOR_ENTRY="ColorEntry";h.COLORS="Colors";h.COLOR_TRANS="ColorTrans";h.CONNECT="Connect";h.CONNECTS="Connects";h.CONNECTION="Connection";h.CONTROL="Control";h.DELETED="Del";h.DOCUMENT_SHEET="DocumentSheet";h.ELLIPSE="Ellipse";h.ELLIPTICAL_ARC_TO="EllipticalArcTo";h.END_ARROW="EndArrow";h.END_ARROW_SIZE="EndArrowSize";h.END_X="EndX";h.END_Y="EndY";h.FACE_NAME="FaceName";h.FACE_NAMES="FaceNames";h.FALSE="0";h.FILL="Fill";h.FILL_BKGND= +"FillBkgnd";h.FILL_BKGND_TRANS="FillBkgndTrans";h.FILL_FOREGND="FillForegnd";h.FILL_FOREGND_TRANS="FillForegndTrans";h.FILL_PATTERN="FillPattern";h.FILL_STYLE="FillStyle";h.FILL_GRADIENT_ENABLED="FillGradientEnabled";h.FLAGS="Flags";h.FLIP_X="FlipX";h.FLIP_Y="FlipY";h.FONT="Font";h.FONT_NAME="Name";h.FOREIGN="Foreign";h.FROM_CELL="FromCell";h.FROM_SHEET="FromSheet";h.GEOM="Geom";h.HEIGHT="Height";h.HORIZONTAL_ALIGN="HorzAlign";h.ID="ID";h.INDENT_FIRST="IndFirst";h.INDENT_LEFT="IndLeft";h.INDENT_RIGHT= +"IndRight";h.INDEX="IX";h.LEFT_MARGIN="LeftMargin";h.LETTER_SPACE="Letterspace";h.LINE="Line";h.LINE_COLOR="LineColor";h.LINE_COLOR_TRANS="LineColorTrans";h.LINE_PATTERN="LinePattern";h.LINE_STYLE="LineStyle";h.LINE_TO="LineTo";h.LINE_WEIGHT="LineWeight";h.LOC_PIN_X="LocPinX";h.LOC_PIN_Y="LocPinY";h.MASTER="Master";h.MASTER_SHAPE="MasterShape";h.MASTERS="Masters";h.MOVE_TO="MoveTo";h.NAME="Name";h.NAME_U="NameU";h.NO_LINE="NoLine";h.NURBS_TO="NURBSTo";h.PAGE="Page";h.PAGE_HEIGHT="PageHeight";h.PAGE_WIDTH= +"PageWidth";h.PAGES="Pages";h.PARAGRAPH="Paragraph";h.PIN_X="PinX";h.PIN_Y="PinY";h.POS="Pos";h.RGB="RGB";h.RIGHT_MARGIN="RightMargin";h.ROUNDING="Rounding";h.RTL_TEXT="RTLText";h.SIZE="Size";h.SHAPE="Shape";h.SHAPES="Shapes";h.SHAPE_SHDW_SHOW="ShapeShdwShow";h.SHDW_PATTERN="ShdwPattern";h.SPACE_AFTER="SpAfter";h.SPACE_BEFORE="SpBefore";h.SPACE_LINE="SpLine";h.STRIKETHRU="Strikethru";h.STYLE="Style";h.STYLE_SHEET="StyleSheet";h.STYLE_SHEETS="StyleSheets";h.TEXT="Text";h.TEXT_BKGND="TextBkgnd";h.TEXT_BLOCK= +"TextBlock";h.TEXT_STYLE="TextStyle";h.TO_PART="ToPart";h.TO_SHEET="ToSheet";h.TOP_MARGIN="TopMargin";h.TRUE="1";h.TXT_ANGLE="TxtAngle";h.TXT_HEIGHT="TxtHeight";h.TXT_LOC_PIN_X="TxtLocPinX";h.TXT_LOC_PIN_Y="TxtLocPinY";h.TXT_PIN_X="TxtPinX";h.TXT_PIN_Y="TxtPinY";h.TXT_WIDTH="TxtWidth";h.TYPE="Type";h.TYPE_GROUP="Group";h.TYPE_SHAPE="Shape";h.UNIQUE_ID="UniqueID";h.VERTICAL_ALIGN="VerticalAlign";h.WIDTH="Width";h.X_CON="XCon";h.X_DYN="XDyn";h.X="X";h.Y_CON="YCon";h.Y_DYN="YDyn";h.Y="Y";h.HIDE_TEXT= +"HideText";h.VSDX_ID="vsdxID";h.CONNECT_TO_PART_WHOLE_SHAPE=3;c.mxVsdxConstants=h;h.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=b&&1==b.nodeType||null===b)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]), +this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}f.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))}catch(a){return 0}};f.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType|| +null===b)return this.getIndex$org_w3c_dom_Element(b);if(void 0===b)return this.getIndex$();throw Error("invalid overload");};f.prototype.processGeoElem=function(b){var a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell");b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Row");if(null==this.rows){this.rows=[];for(var d=0;d<b.length;d++)0<this.rows.push(null)}for(d=0;d<a.length;d++){var g=a[d],n=g.getAttribute("N"),g=g.getAttribute("V");switch(n){case "NoFill":this.noFill= +function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoLine":this.noLine=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoShow":this.noShow=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoSnap":this.noSnap=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoQuickDrag":this.noQuickDrag=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g)}}a=this.rows.length;d=!1;for(n=0;n<b.length;n++)g=c.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(b[n], +this.rows),g.getIndex()>a?(0<this.rows.push(g),d=!0):this.rows[g.getIndex()-1]=g;d&&function(a,b){b.compare?a.sort(function(a,d){return b.compare(a,d)}):a.sort(b)}(this.rows,new f.mxVsdxGeometry$0(this))};f.prototype.inheritGeo=function(b){this.noFill=b.noFill;this.noLine=b.noLine;this.noShow=b.noShow;this.noSnap=b.noSnap;this.noQuickDrag=b.noQuickDrag;var a=this.rows=[];a.push.apply(a,b.rows)};f.prototype.getIndex$=function(){return this.index};f.prototype.isNoFill=function(){return this.noFill}; +f.prototype.isNoLine=function(){return this.noLine};f.prototype.isNoShow=function(){return this.noShow};f.prototype.isNoSnap=function(){return this.noSnap};f.prototype.isNoQuickDrag=function(){return this.noQuickDrag};f.prototype.getRows=function(){return this.rows};f.prototype.getPathXML=function(b,a){if(this.noShow)return"";for(var d="",g=0;g<this.rows.length;g++)d=d.concat(this.rows[g].handle(b,a));return d};return f}();l.mxVsdxGeometry=h;h.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(c){var b= +function(){function a(a){this.__parent=a}a.prototype.compare=function(a,b){return a.getIndex()-b.getIndex()};return a}();c.mxVsdxGeometry$0=b;b.__interfaces=["java.util.Comparator"]})(h=l.mxVsdxGeometry||(l.mxVsdxGeometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}f.prototype.addGeometry=function(b){b=new c.mxgraph.io.vsdx.mxVsdxGeometry(b,this.parentGeomList);b.getIndex()<this.geomList.length?this.geomList[b.getIndex()]=b:(0<this.geomList.push(b),this.sortNeeded=!0)};f.prototype.sort=function(){this.sortNeeded&&(function(b,a){a.compare? +b.sort(function(b,g){return a.compare(b,g)}):b.sort(a)}(this.geomList,new f.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};f.prototype.isNoShow=function(){for(var b=0;b<this.geomList.length;b++)if(!this.geomList[b].isNoShow())return!1;return!0};f.prototype.isNoFill=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};f.prototype.isNoLine=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&& +!a.isNoLine())return!1}return!0};f.prototype.hasGeom=function(){return 0!=this.geomList.length};f.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};f.prototype.rotatedPoint=function(b,a,d){var g=b.y*a+b.x*d;b.x=b.x*a-b.y*d;b.y=g};f.prototype.getRoutingPoints=function(b,a,d){this.sort();b=[];0<b.push(a.clone());for(var g=0,n=0,f=0;f<this.geomList.length;f++){var D=this.geomList[f];if(!D.isNoShow())for(var D=D.getRows(),y=0;y<D.length;y++){var p= +D[y];if(0==y&&null!=p&&p instanceof c.mxgraph.io.vsdx.geometry.MoveTo)g=null!=p.x?p.x:0,n=null!=p.y?p.y:0;else if(null!=p&&p instanceof c.mxgraph.io.vsdx.geometry.LineTo){var h=null!=p.x?p.x:0,p=null!=p.y?p.y:0,l=new mxPoint(h,p);0!==d&&(d=(360-d)*Math.PI/180,this.rotatedPoint(l,Math.cos(d),Math.sin(d)));h=(l.x-g)*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();h+=a.x;p=(l.y-n)*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;p+=a.y;h=Math.round(100*h)/100;p=Math.round(100*p)/100;l.x= +h;l.y=p;0<b.push(l)}}}return b};f.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),d={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},g=d.str.length,n;n=this.processGeo(b,a,d,-1,!0);n=this.processGeo(b,a,d,n,!1);if(d.str.length===g)return"";this.closePath(d,n);d.str=d.str.concat("</foreground></shape>");return d.str};f.prototype.processGeo=function(b,a,d,g,n){for(var c=0;c<this.geomList.length;c++){var f=this.geomList[c];if(n!==f.isNoFill()){var y=f.getPathXML(a, +b);0!==y.length&&(f=this.getGeoStyle(f),-1===g?d.str=d.str.concat("<path>"):g!==f&&(this.closePath(d,g),d.str=d.str.concat("<path>")),d.str=d.str.concat(y),g=f)}}return g};f.prototype.getGeoStyle=function(b){var a=0;b.isNoLine()||b.isNoFill()?b.isNoFill()?b.isNoLine()||(a=3):a=2:a=1;return a};f.prototype.closePath=function(b,a){b.str=b.str.concat("</path>");1===a?b.str=b.str.concat("<fillstroke/>"):2===a?b.str=b.str.concat("<fill/>"):3===a&&(b.str=b.str.concat("<stroke/>"))};return f}();l.mxVsdxGeometryList= +h;h.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(c){var b=function(){function a(a){this.__parent=a}a.prototype.compare=function(a,b){return a.getIndex()-b.getIndex()};return a}();c.mxVsdxGeometryList$0=b;b.__interfaces=["java.util.Comparator"]})(h=l.mxVsdxGeometryList||(l.mxVsdxGeometryList={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a){this.masterShape=this.Id=null;this.childShapes={};this.master=b;this.Id=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}f.prototype.processMasterShapes=function(b){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a.nodeName,"Rel")){var d=b.getRelationship(a.getAttribute("r:id"),c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+ +"/masters/_rels/masters.xml.rels"),g=d.getAttribute("Target"),d=d.getAttribute("Type"),n=null;null!=d&&function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(d,"master")&&(n=b.getXmlDoc(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+g));if(null!=n)for(g=n.firstChild;null!=g;){if(null!=g&&1==g.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(g.nodeName,"MasterContents")){this.processMasterShape(g,b);break}g=g.nextSibling}}a=a.nextSibling}};f.prototype.processMasterShape= +function(b,a){for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(d.nodeName,"Shapes")){for(d=d.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(d.nodeName,"Shape")){var g=d,n=g.getAttribute("ID"),f=new c.mxgraph.io.vsdx.Shape(g,a);this.masterShape=null==this.masterShape?f:this.masterShape;this.childShapes[n]=f;this.processMasterShape(g,a)}d=d.nextSibling}break}d=d.nextSibling}};f.prototype.getMasterShape= +function(){return this.masterShape};f.prototype.getSubShape=function(b){var a=this.childShapes;return a[b]?a[b]:null};f.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};f.prototype.getName=function(){return this.master.getAttribute("Name")||""};f.prototype.getUniqueID=function(){var b="";this.master.hasAttribute("UniqueID")&&(b=this.master.getAttribute("UniqueID"));return b};f.prototype.getId=function(){return this.Id};f.prototype.getMasterElement=function(){return this.master}; +return f}();l.mxVsdxMaster=h;h.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a,d){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=d;for(b=b.firstChild;null!=b;){if(a=null!=b&&1==b.nodeType)a=b.tagName.toLowerCase(),d=c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(d):a===d;if(a){this.rootElement=b;break}b=b.nextSibling}this.pm=new c.mxgraph.io.vsdx.mxPropertiesManager; +this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}f.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var b=!0,a=1;b;){var d=function(a,b){return a[b]?a[b]:null}(this.xmlDocs,c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=d){for(d=d.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(d.tagName,"a:theme")){d=new c.mxgraph.io.vsdx.mxVsdxTheme(d);0> +d.getThemeIndex()&&d.processTheme();var g=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.themes,d.getThemeIndex());null!=g&&g.isPure()||function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b, +value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,d.getThemeIndex(),d);break}d=d.nextSibling}a++}else b=!1}};f.prototype.initStylesheets=function(){var b=this.rootElement.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<b.length)for(var b=b.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET),a=b.length,d=0;d<a;d++){var g=b.item(d),n=g.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID),g=new c.mxgraph.io.vsdx.Style(g, +this);this.stylesheets[n]=g}for(b=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){return Object.keys(a).map(function(b){return a[b]})}(this.stylesheets));b.hasNext();)g=b.next(),g.stylesheetRefs(this)};f.prototype.initMasters=function(){if(null!=this.xmlDocs){var b=function(a,b){return a[b]?a[b]:null}(this.xmlDocs,c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!= +b&&1==b.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.tagName,c.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.tagName,"Master")){var a=new c.mxgraph.io.vsdx.mxVsdxMaster(b,this);this.masters[a.getId()]=a}b=b.nextSibling}break}b=b.nextSibling}}};f.prototype.initPages=function(){if(null!=this.xmlDocs){var b=function(a,b){return a[b]?a[b]:null}(this.xmlDocs,c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+ +"/pages/pages.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.tagName,c.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};for(var b={},d=a.length,g=0;g<d;g++){var n=a.item(g),n=this.createPage(n);n.isBackground()&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&& +a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(b,n.getId(),n);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages, +n.getId(),n)}a=function(a){null==a.entries&&(a.entries=[]);return a.entries}(this.pages);for(d=0;d<a.length;d++)n=a[d].getValue(),n.isBackground()||(g=n.getBackPageId(),null!=g&&(g=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(b,g),n.setBackPage(g)))}break}b=b.nextSibling}}};f.prototype.getPages=function(){return this.pages};f.prototype.getThemes= +function(){return this.themes};f.prototype.getRelationship=function(b,a){var d=function(a,b){return a[b]?a[b]:null}(this.xmlDocs,a);if(null==d||null==b||0===b.length)return null;for(var d=d.getElementsByTagName("Relationship"),g=0;g<d.length;g++){var n=d.item(g);if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n.getAttribute("Id"),b))return n}return null};f.prototype.getMaster=function(b){var a=this.masters;return a[b]?a[b]:null};f.prototype.createPage=function(b){return new c.mxgraph.io.vsdx.mxVsdxPage(b, +this)};f.prototype.getPropertiesManager=function(){return this.pm};f.prototype.setPropertiesManager=function(b){this.pm=b};f.prototype.getMasterShapes=function(){return this.masters};f.prototype.setMasterShapes=function(b){this.masters=b};f.prototype.getStylesheet=function(b){var a=this.stylesheets;return a[b]?a[b]:null};f.prototype.getXmlDoc=function(b){var a=this.xmlDocs;return a[b]?a[b]:null};f.prototype.getMedia=function(b){var a=this.media;return a[b]?a[b]:null};return f}();l.mxVsdxModel=h;h.__class= +"com.mxgraph.io.vsdx.mxVsdxModel"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a){this.pageName=this.Id=null;this.__isBackground=!1;this.pageSheet=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.cellElements={};this.model=a;this.pageElement=b;var d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),g;if(g=null!=d)g=c.mxgraph.io.vsdx.mxVsdxConstants.TRUE,g=d&&d.equals?d.equals(g):d===g;this.__isBackground=g?!0:!1;d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE); +!this.__isBackground&&null!=d&&0<d.length&&(this.backPageId=parseFloat(d));this.Id=parseFloat(b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"PageSheet");if(0<d.length)for(d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d[0],"Cell"),g=0;g<d.length;g++){var n=d[g],f=n.getAttribute("N");this.cellElements[f]=n}this.parseNodes(b,a,"pages")}f.prototype.parseNodes= +function(b,a,d){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var g=b,n=g.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Rel"))this.resolveRel(g,a,d);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Shapes"))this.shapes=this.parseShapes(g,null,!1);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Connects"))for(g=g.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),g=null!=g&&0<g.length?g.item(0):null;null!=g;){if(null!=g&&1==g.nodeType){var n= +g,f=new c.mxgraph.io.vsdx.mxVsdxConnect(n),h=f.getFromSheet(),h=null!=h&&-1<h?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.connects,h):null;null!=h?h.addConnect(n):function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value= +d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,f.getFromSheet(),f)}g=g.nextSibling}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(n,"PageSheet")&&(this.pageSheet=g)}b=b.nextSibling}};f.prototype.resolveRel=function(b,a,d){d=a.getRelationship(b.getAttribute("r:id"),c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+d+".xml.rels");b=d.getAttribute("Target");d=d.getAttribute("Type");if(function(a,b){var d= +a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}((new String(d)).toString(),"page")){var g=null;null!=d&&function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(d,"page")&&(g=a.getXmlDoc(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+b));if(null!=g)for(d=g.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(d.tagName,"PageContents")){g=b.indexOf(".");-1!==g&&this.parseNodes(d,a,b.substring(0,g));break}d=d.nextSibling}}}; +f.prototype.parseShapes=function(b,a,d){d={};b=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(b=null!=b&&0<b.length?b.item(0):null;null!=b;){if(null!=b&&1==b.nodeType){var g=b,n=a;if(null==n){var f=g.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER);null==f||function(a,b){return a&&a.equals?a.equals(b):a===b}(f,"")||(n=this.model.getMaster(f))}f=this.isEdge(g);if(!f&&null!=n){var f=g.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),h=n.getMasterElement();null== +f||function(a,b){return a&&a.equals?a.equals(b):a===b}(f,"")||(h=n.getSubShape(f).getShape());f=this.isEdge(h)}g=this.createCell(g,!f,n);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(d,g.getId(),g)}b=b.nextSibling}return d};f.prototype.createCell= +function(b,a,d){return new c.mxgraph.io.vsdx.VsdxShape(this,b,a,this.model.getMasterShapes(),d,this.model)};f.prototype.isEdge=function(b){if(null!=b&&(b=b.childNodes,null!=b))for(b=b.item(0);null!=b;){if(null!=b&&1==b.nodeType){var a=b;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"BeginX")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"BeginY")||function(a,b){return a&&a.equals?a.equals(b): +a===b}(a,"EndY")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"EndX")))return!0}b=b.nextSibling}return!1};f.prototype.getPageDimensions=function(){var b=0,a=0,d=function(a,b){return a[b]?a[b]:null}(this.cellElements,"PageHeight"),g=function(a,b){return a[b]?a[b]:null}(this.cellElements,"PageWidth");null!=d&&(b=parseFloat(d.getAttribute("V"))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),b=Math.round(100*b)/100);null!=g&&(a=parseFloat(g.getAttribute("V"))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +a=Math.round(100*a)/100);return new mxPoint(a,b)};f.prototype.getDrawingScale=function(){var b;b=this.cellElements;b=b.DrawingScale?b.DrawingScale:null;return null!=b?parseFloat(b.getAttribute("V"))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};f.prototype.getPageScale=function(){var b;b=this.cellElements;b=b.PageScale?b.PageScale:null;return null!=b?parseFloat(b.getAttribute("V"))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};f.prototype.getCellValue=function(b){var a=this.cellElements; +b=a[b]?a[b]:null;return null!=b?b.getAttribute("V")||"":null};f.prototype.getCellIntValue=function(b,a){var d=this.getCellValue(b);return null!=d?parseInt(d):a};f.prototype.getId=function(){return this.Id};f.prototype.getPageName=function(){return this.pageName};f.prototype.getShapes=function(){return this.shapes};f.prototype.getConnects=function(){return this.connects};f.prototype.isBackground=function(){return this.__isBackground};f.prototype.getBackPageId=function(){return this.backPageId};f.prototype.setBackPage= +function(b){this.backPage=b};f.prototype.getBackPage=function(){return this.backPage};return f}();l.mxVsdxPage=h;h.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var b=function(a){if(0!=a.length){for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1)));return d}};return b(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new c.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new c.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new c.mxgraph.io.vsdx.theme.LineStyle; +this.fillStyles=[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var b=function(a){if(0==a.length)return 0;for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1)));return d};return b(a)}([4,4]);this.variantLineIdx=function(a){var b=function(a){if(0==a.length)return 0;for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1))); +return d};return b(a)}([4,4]);this.variantEffectIdx=function(a){var b=function(a){if(0==a.length)return 0;for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1)));return d};return b(a)}([4,4]);this.variantFontIdx=function(a){var b=function(a){if(0==a.length)return 0;for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1)));return d};return b(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=b;this.name=b.getAttribute("name")||"";b=function(a,b){return a[b]?a[b]: +null}(f.themesIds_$LI$(),this.name);null!=b&&(this.themeIndex=b)}f.__static_initialize=function(){f.__static_initialized||(f.__static_initialized=!0,f.__static_initializer_0(),f.__static_initializer_1())};f.themesIds_$LI$=function(){f.__static_initialize();null==f.themesIds&&(f.themesIds={});return f.themesIds};f.__static_initializer_0=function(){f.themesIds_$LI$().Office=33;f.themesIds_$LI$().Linear=34;f.themesIds_$LI$().Zephyr=35;f.themesIds_$LI$().Integral=36;f.themesIds_$LI$().Simple=37;f.themesIds_$LI$().Whisp= +38;f.themesIds_$LI$().Daybreak=39;f.themesIds_$LI$().Parallel=40;f.themesIds_$LI$().Sequence=41;f.themesIds_$LI$().Slice=42;f.themesIds_$LI$().Ion=43;f.themesIds_$LI$().Retrospect=44;f.themesIds_$LI$().Organic=45;f.themesIds_$LI$().Bubble=46;f.themesIds_$LI$().Clouds=47;f.themesIds_$LI$().Gemstone=48;f.themesIds_$LI$().Lines=49;f.themesIds_$LI$().Facet=50;f.themesIds_$LI$().Prominence=51;f.themesIds_$LI$().Smoke=52;f.themesIds_$LI$().Radiance=53;f.themesIds_$LI$().Shade=54;f.themesIds_$LI$().Pencil= +55;f.themesIds_$LI$().Pen=56;f.themesIds_$LI$().Marker=57;f.themesIds_$LI$().Whiteboard=58};f.colorIds_$LI$=function(){f.__static_initialize();null==f.colorIds&&(f.colorIds={});return f.colorIds};f.__static_initializer_1=function(){(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(), +0,"dk1");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),1,"lt1");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key=== +a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),2,"accent1");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),3,"accent2"); +(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),4,"accent3");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value= +d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),5,"accent4");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),6,"accent5");(function(b,a,d){null== +b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),7,"accent6")};f.prototype.getThemeIndex=function(){return this.themeIndex};f.prototype.setVariant=function(b){this.themeVariant=b};f.prototype.isPure=function(){return this.__isPure};f.prototype.processTheme= +function(){if(!this.isProcessed){try{for(var b=this.theme.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.nodeName,"a:themeElements"))for(var a=b.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var d=a,g=d.nodeName;(function(a,b){return a&&a.equals?a.equals(b):a===b})(g,"a:clrScheme")?(function(a,b){return a&&a.equals?a.equals(b):a===b}(this.name,d.getAttribute("name"))||(this.__isPure=!1),this.processColors(d)):function(a,b){return a&&a.equals? +a.equals(b):a===b}(g,"a:fontScheme")?(function(a,b){return a&&a.equals?a.equals(b):a===b}(this.name,d.getAttribute("name"))||(this.__isPure=!1),this.processFonts(d)):function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"a:fmtScheme")?(function(a,b){return a&&a.equals?a.equals(b):a===b}(this.name,d.getAttribute("name"))||(this.__isPure=!1),this.processFormats(d)):function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"a:extLst")&&this.processExtras(d)}a=a.nextSibling}b=b.nextSibling}}catch(n){console.error(n.message, +n)}this.isProcessed=!0}};f.prototype.processExtras=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b[a]);switch(d.nodeName){case "vt:fmtConnectorScheme":var g;g=this.name;var n=d.getAttribute("name");g=g&&g.equals?g.equals(n):g===n;g||(this.__isPure=!1);d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d);for(g=0;g<d.length;g++)switch(n=d[g],n.nodeName){case "a:fillStyleLst":for(var n= +c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(n),f=0;f<n.length;f++)0<this.connFillStyles.push(c.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(n[f]));break;case "a:lnStyleLst":for(n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(n),f=0;f<n.length;f++)0<this.connLineStyles.push(new c.mxgraph.io.vsdx.theme.LineStyle(n[f]))}break;case "vt:lineStyles":d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d);for(g=0;g<d.length;g++)switch(n=d[g],n.nodeName){case "vt:fmtConnectorSchemeLineStyles":n= +c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(n);for(f=0;f<n.length;f++)0<this.connLineStylesExt.push(new c.mxgraph.io.vsdx.theme.LineStyleExt(n[f]));break;case "vt:fmtSchemeLineStyles":for(n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(n),f=0;f<n.length;f++)0<this.lineStylesExt.push(new c.mxgraph.io.vsdx.theme.LineStyleExt(n[f]))}break;case "vt:fontStylesGroup":d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d);for(g=0;g<d.length;g++)switch(n=d[g],n.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(n, +this.connFontColors,this.connFontStyles);break;case "vt:fontStyles":this.fillFontStyles(n,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),n=g=0;n<d.length;n++){f=d[n];this.variantEmbellishment[g]=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"embellishment");for(var f=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),h=0,y=0;y<f.length;y++){var p=f[y];this.variantFillIdx[g][h]= +c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"fillIdx");this.variantLineIdx[g][h]=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"lineIdx");this.variantEffectIdx[g][h]=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"effectIdx");this.variantFontIdx[g][h]=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"fontIdx");h++}g++}}}};f.prototype.fillFontStyles=function(b,a,d){b= +c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var g=0;g<b.length;g++){var n=b[g];0<d.push(c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"style"));n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n);null!=n&&0<a.push(c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n)))}};f.prototype.processFormats=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a= +0;a<b.length;a++){var d=b[a];switch(d.nodeName){case "a:fillStyleLst":for(var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),g=0;g<d.length;g++)0<this.fillStyles.push(c.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(d[g]));break;case "a:lnStyleLst":for(d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),g=0;g<d.length;g++)0<this.lineStyles.push(new c.mxgraph.io.vsdx.theme.LineStyle(d[g]))}}};f.prototype.processFonts=function(b){};f.prototype.processColors=function(b){for(b=b.firstChild;null!= +b;){if(null!=b&&1==b.nodeType){var a=b,d=a.nodeName,a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),g;g=(g=d)&&g.equals?g.equals("a:extLst"):"a:extLst"===g;g?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(d=d.substring(2),0<a.length&&this.addBasicColor(d,a[0]))}b=b.nextSibling}};f.prototype.addVariantColors=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);if(null!=b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b); +for(var a=0,d=0;d<b.length;d++){var g=b[d];this.addVariantColorsSet(a++,g)}}};f.prototype.addVariantColorsSet=function(b,a){var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[b]=a.hasAttribute("monotone");for(var g=0;g<d.length;g++){var n=d[g];switch(n.nodeName){case "vt:varColor1":this.variantsColors[b][0]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor2":this.variantsColors[b][1]= +c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor3":this.variantsColors[b][2]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor4":this.variantsColors[b][3]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor5":this.variantsColors[b][4]= +c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor6":this.variantsColors[b][5]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor7":this.variantsColors[b][6]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n))}}};f.prototype.addBkgndColor=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b); +null!=b&&(this.bkgndColor=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b)))};f.prototype.extractThemeIndex=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.themeIndex=parseInt(b.getAttribute("schemeEnum")))};f.prototype.addBasicColor=function(b,a){this.baseColors[b]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};f.prototype.getSchemeColor=function(b){this.processTheme();var a=this.baseColors; +b=a[b]?a[b]:null;return null!=b?b.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};f.prototype.getStyleColor=function(b){this.processTheme();if(8>b){var a=function(a,b){return a[b]?a[b]:null}(this.baseColors,function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(f.colorIds_$LI$(),b));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8=== +b){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{var a=null,d=0;200<=b?d=b-200:100<=b&&(d=b-100);0<=d&&6>=d&&(a=this.variantsColors[this.themeVariant][d]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};f.prototype.getFillGraientColor=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!0)};f.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b, +!1)};f.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=function(b,a){this.processTheme();var d=b.getQuickStyleFillColor(),g=null;switch(b.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:g=this.fillStyles[b.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(d=100),g=b.getQuickStyleFillMatrix()-100,g=this.fillStyles[this.variantFillIdx[this.themeVariant][g]-1]}d=null!=g?a?null!=g&&g instanceof +c.mxgraph.io.vsdx.theme.GradFill?g.applyStyle(d,this).getGradientClr():null:g.applyStyle(d,this):a?null:this.getStyleColor(d);g=b.getQuickStyleVariation();null!=d&&0<(g&8)&&(d=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b));return d};f.prototype.getFillColor=function(b,a){if(!(null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)||"boolean"!==typeof a&&null!==a){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b); +throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,a)};f.prototype.getLineStyle=function(b,a){this.processTheme();var d=null;switch(b){case 1:case 2:case 3:case 4:case 5:case 6:d=a[b-1];break;case 100:case 101:case 102:case 103:d=a===this.lineStyles?this.lineStyles[this.variantLineIdx[this.themeVariant][b-100]-1]:this.defaultLineStyle}return d};f.prototype.getLineStyleExt=function(b,a){this.processTheme();var d=null;switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:d= +a[b]}return d};f.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var d=b.getQuickStyleLineColor(),g=this.getLineStyle(b.getQuickStyleLineMatrix(),a);switch(b.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(d=100)}d=null!=g?g.getLineColor(d,this):this.getStyleColor(d);0<(b.getQuickStyleVariation()&4)&&(d=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b));return d}; +f.prototype.getLineColor=function(b,a){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};f.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals= +function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};f.prototype.getConnLineColor=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};f.prototype.getDefaultLineClr=function(){return this.defaultLineClr};f.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(b,a,d){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(), +a);if(null!=a)return a.isDashed();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?b.isDashed():!1};f.prototype.isLineDashed=function(b,a,d){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=d&&d instanceof Array||null===d))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,a,d);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null=== +b)&&void 0===a&&void 0===d)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};f.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};f.prototype.isConnLineDashed=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b, +this.connLineStylesExt,this.connLineStyles)};f.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(b,a,d){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?b.getLineDashPattern():null};f.prototype.getLineDashPattern=function(b,a,d){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof +Array||null===a)&&(null!=d&&d instanceof Array||null===d))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,a,d);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===d)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};f.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b, +this.lineStylesExt,this.lineStyles)};f.prototype.getConnLineDashPattern=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.connLineStylesExt,this.connLineStyles)};f.prototype.getArrowSize=function(b,a,d,g){d=this.getLineStyleExt(b.getQuickStyleLineMatrix(),d);if(null!=d)return a?d.getStartSize():d.getEndSize();b=this.getLineStyle(b.getQuickStyleLineMatrix(),g);return null!=b?a?b.getStartSize():b.getEndSize():4};f.prototype.getStartSize= +function(b){return this.getArrowSize(b,!0,this.lineStylesExt,this.lineStyles)};f.prototype.getConnStartSize=function(b){return this.getArrowSize(b,!0,this.connLineStylesExt,this.connLineStyles)};f.prototype.getEndSize=function(b){return this.getArrowSize(b,!1,this.lineStylesExt,this.lineStyles)};f.prototype.getConnEndSize=function(b){return this.getArrowSize(b,!1,this.connLineStylesExt,this.connLineStyles)};f.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b, +a){this.processTheme();var d=b.getQuickStyleFontColor(),g=null;switch(b.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:g=a[b.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(d=100),g=b.getQuickStyleFontMatrix()-100,a!==this.fontColors?(g=this.baseColors,g=g.dk1?g.dk1:null):g=a[this.variantFontIdx[this.themeVariant][g]-1]}d=null!=g?g.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(d,this):this.getStyleColor(d);if(0< +(b.getQuickStyleVariation()&2))var d=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b),g=d.toHsl(),n=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b),c=n.toHsl(),d=g.getLum()<c.getLum()?d:n;return d};f.prototype.getFontColor=function(b,a){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals|| +null===b)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};f.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.fontColors)};f.prototype.getConnFontColor=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connFontColors)};f.prototype.getArrowType=function(b,a,d,g){d= +this.getLineStyleExt(b.getQuickStyleLineMatrix(),d);if(null!=d)return a?d.getStart():d.getEnd();b=this.getLineStyle(b.getQuickStyleLineMatrix(),g);return null!=b?a?b.getStart():b.getEnd():0};f.prototype.getEdgeMarker=function(b,a){return this.getArrowType(a,b,this.lineStylesExt,this.lineStyles)};f.prototype.getConnEdgeMarker=function(b,a){return this.getArrowType(a,b,this.connLineStylesExt,this.connLineStyles)};f.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList= +function(b,a){var d=this.getLineStyle(b.getQuickStyleLineMatrix(),a);return null!=d?d.getLineWidth():0};f.prototype.getLineWidth=function(b,a){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(b); +throw Error("invalid overload");};f.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};f.prototype.getConnLineWidth=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};return f}();h.__static_initialized=!1;l.mxVsdxTheme=h;h.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io= +{}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(){}f.conversionFactor_$LI$=function(){null==f.conversionFactor&&(f.conversionFactor=f.screenCoordinatesPerCm*f.CENTIMETERS_PER_INCHES);return f.conversionFactor};f.getDirectChildNamedElements=function(b,a){for(var d=[],g=b.firstChild;null!=g;g=g.nextSibling){var n;if(n=null!=g&&1==g.nodeType){n=a;var c=g.nodeName;n=n&&n.equals?n.equals(c):n===c}n&&0<d.push(g)}return d};f.getDirectChildElements=function(b){var a=[];for(b= +b.firstChild;null!=b;b=b.nextSibling)null!=b&&1==b.nodeType&&0<a.push(b);return a};f.getDirectFirstChildElement=function(b){for(b=b.firstChild;null!=b;b=b.nextSibling)if(null!=b&&1==b.nodeType)return b;return null};f.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(b,a,d){try{var g=b.getAttribute(a);if(null!=g)return parseInt(g)}catch(n){}return d};f.getIntAttr=function(b,a,d){if((null==b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||"number"!==typeof d&&null!==d){if((null== +b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||void 0!==d)throw Error("invalid overload");return c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(b,a)}return c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,d)};f.getIntAttr$org_w3c_dom_Element$java_lang_String=function(b,a){return f.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,0)};f.getStyleString=function(b,a){for(var d="",g=function(a){var b=0;return{next:function(){return b< +a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){return Object.keys(a).map(function(b){return a[b]})}(b)),n=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(Object.keys(b));n.hasNext();){var c=n.next(),f=g.next();if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(c,mxConstants.STYLE_SHAPE)||!function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(b[c]?b[c]:null,"image")&&!function(a,b,d){void 0=== +d&&(d=0);return a.substr(d,b.length)===b}(b[c]?b[c]:null,"rounded="))try{d=d+c+a}catch(y){console.error("mxVsdxUtils.getStyleString,"+y+",style.length="+d.length+",key.length="+c.length+",asig.length="+a.length)}d=d+f+";"}return d};f.surroundByTags=function(b,a){return"<"+a+">"+b+"</"+a+">"};f.htmlEntities=function(b){return b.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};f.toInitialCapital= +function(b){b=b.split(" ");for(var a="",d=0;d<b.length;d++)var g=b[d],n=g.substring(0,1),g=g.substring(1),n=n.toUpperCase(),a=a+(n+g);return a.substring(0,a.length)};f.toSmallCaps=function(b,a){var d="",g=d;if(a&&a.equals?a.equals(g):a===g)d=b;else for(var g=b.split(""),n=0;n<g.length;n++){var c=g[n];(null==c.charCodeAt?c:c.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==c.charCodeAt?c:c.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(c=(new String(c)).toString(),c=c.toUpperCase(),d+='<font style="font-size:'+ +parseFloat(a)/1.28+'px">'+c+"</font>"):d+=c}return d};f.getStyleMap=function(b,a){for(var d={},g=b.split(";"),n=0;n<g.length;n++){var c=g[n],f=c.indexOf(a),h=c.substring(0,f),c=c.substring(f+1);d[h]=c}return d};f.isInsideTriangle=function(b,a,d,g,n,c,f,h){n-=d;c-=g;f-=d;h-=g;g=n*h-f*c;d=(b*(c-h)+a*(f-n)+n*h-f*c)/g;f=(b*h-a*f)/g;b=(a*n-b*c)/g;return 0<d&&1>d&&0<f&&1>f&&0<b&&1>b?!0:!1};return f}();h.screenCoordinatesPerCm=40;h.CENTIMETERS_PER_INCHES=2.54;l.mxVsdxUtils=h;h.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(q.vsdx|| +(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){var h=function(){function c(b,a,d,g){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];0<this.values.push(b);this.charIndices=[];0<this.charIndices.push(a);this.fields=[];0<this.fields.push(g);this.paraIndex=d}c.prototype.addText=function(b,a,d){0<this.values.push(b);0<this.charIndices.push(a);0<this.fields.push(d)};c.prototype.getParagraphIndex=function(){return this.paraIndex};c.prototype.getValue=function(b){return this.values[b]}; +c.prototype.numValues=function(){return this.values.length};c.prototype.getChar=function(b){return this.charIndices[b]};c.prototype.getField=function(b){return this.fields[b]};return c}();c.Paragraph=h;h.__class="com.mxgraph.io.vsdx.Paragraph"})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b){this.elem=b}f.prototype.getIndexedCell=function(b,a){for(var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),g=0;g<d.length;g++){var n=d[g],f=n.getAttribute("IX");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(f,b)||null==b)for(var n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n,"Cell"),h=0;h<n.length;h++){var y=n[h],f=y.getAttribute("N");if(function(a,b){return a&& +a.equals?a.equals(b):a===b}(f,a))return y}}return null};return f}();l.Section=h;h.__class="com.mxgraph.io.vsdx.Section"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){var h=function(){function c(b,a){this.pageNumber=0;this.pageNumber=b;this.Id=a}c.prototype.getId=function(){return this.Id};c.prototype.getPageNumber=function(){return this.pageNumber};c.prototype.equals=function(b){return null==b||this.constructor!==b.constructor||this.pageNumber!==b.pageNumber||this.Id!==b.Id?!1:!0};c.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return c}();c.ShapePageId=h;h.__class="com.mxgraph.io.vsdx.ShapePageId"})(c.vsdx|| +(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a,b,g){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=g}b.NONE_$LI$=function(){null==b.NONE&&(b.NONE=new b(-1,-1,-1));return b.NONE};b.prototype.getRed=function(){return this.red};b.prototype.setRed=function(a){this.red=a};b.prototype.getGreen=function(){return this.green};b.prototype.setGreen=function(a){this.green=a};b.prototype.getBlue=function(){return this.blue}; +b.prototype.setBlue=function(a){this.blue=a};b.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,g=this.getBlue()/255,n=Math.max(a,Math.max(b,g)),f=Math.min(a,Math.min(b,g)),h=(n+f)/2;if(n===f)a=f=0;else var y=n-f,f=.5<h?y/(2-n-f):y/(n+f),a=(n===a?(b-g)/y+(b<g?6:0):n===b?(g-a)/y+2:(a-b)/y+4)/6;return new c.mxgraph.io.vsdx.theme.HSLColor(a,f,h)};b.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,g=this.getBlue()/255,n=Math.max(a,Math.max(b,g)),f=Math.min(a, +Math.min(b,g)),h=n-f,a=n===f?0:(n===a?(b-g)/h+(b<g?6:0):n===b?(g-a)/h+2:(a-b)/h+4)/6;return new c.mxgraph.io.vsdx.theme.HSVColor(a,0===n?0:h/n,n)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16),a=1==a.length?"0"+a:a,b=this.green.toString(16),b=1==b.length?"0"+b:b,g=this.blue.toString(16),g=1==g.length?"0"+g:g;return"#"+a+b+g};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr= +function(a){this.gradientClr=a};return b}();h.Color=f;f.__class="com.mxgraph.io.vsdx.theme.Color"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){}b.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new c.mxgraph.io.vsdx.theme.SolidFillStyle(c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new c.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new c.mxgraph.io.vsdx.theme.GradFill(a)}return b};return b}();h.FillStyleFactory= +f;f.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a){this.color2=this.color1=null;a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length- +1]))));null==this.color1&&(this.color1=this.color2=new c.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}b.prototype.applyStyle=function(a,b){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b));return d};return b}();h.GradFill=f;f.__class="com.mxgraph.io.vsdx.theme.GradFill";f.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph= +{}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a,b,g){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=g}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,b,g){0>g&&(g+=1);1<g&&--g;return g<1/6? +a+6*(b-a)*g:.5>g?b:g<2/3?a+(b-a)*(2/3-g)*6:a};b.prototype.toRgb=function(){var a,b,g;g=this.hue;b=this.sat;a=this.lum;if(0===b)a=b=g=a;else{var n=.5>a?a*(1+b):a+b-a*b,f=2*a-n;a=this.hue2rgb(f,n,g+1/3);b=this.hue2rgb(f,n,g);g=this.hue2rgb(f,n,g-1/3)}return new c.mxgraph.io.vsdx.theme.Color(255*a|0,255*b|0,255*g|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*= +a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();h.HSLColor=f;f.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a,b,g){this.h=a;this.s=b;this.v=g}b.prototype.toRgb=function(){var a=6*this.h,b=this.s,g=Math.floor(a),n=a-g,a=this.v*(1-b),f=this.v*(1-n*b),b=this.v*(1-(1-n)*b),g=(g|0)%6;return new c.mxgraph.io.vsdx.theme.Color(255*[this.v,f,a,a,b,this.v][g]|0,255*[b,this.v,this.v,f,a,a][g]|0,255*[a,a,b,this.v,this.v,f][g]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*= +1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();h.HSVColor=f;f.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx= +{}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin= +this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var d=a.getAttribute("cap");if(null!=d)switch(d){case "rnd":this.lineCap=b.LineCapType.ROUND;break;case "sq":this.lineCap=b.LineCapType.SQUARE;break;case "flat":this.lineCap=b.LineCapType.FLAT}d= +a.getAttribute("cmpd");if(null!=d)switch(d){case "sng":this.lineComp=b.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=b.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=b.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=b.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=b.CompoundLineType.THIN_THICK_THIN_TRIPLE}for(var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),g=0;g<d.length;g++){var n=d[g];switch(n.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle= +c.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(n);break;case "a:prstDash":n=n.getAttribute("val");this.isLineDashed=!0;switch(n){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);break;case "lgDash":0<this.lineDashPattern.push(12);0<this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":0<this.lineDashPattern.push(8);0<this.lineDashPattern.push(4);0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4); +break;case "lgDashDot":0<this.lineDashPattern.push(12);0<this.lineDashPattern.push(4);0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":0<this.lineDashPattern.push(12),0<this.lineDashPattern.push(4),0<this.lineDashPattern.push(1),0<this.lineDashPattern.push(4),0<this.lineDashPattern.push(1),0<this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;for(var n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n,"a:ds"), +f=0;f<n.length;f++){var h=n[f],y=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(h,"d"),h=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(h,"sp");0<this.lineDashPattern.push(y/1E4);0<this.lineDashPattern.push(h/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType= +this.getLineEndType(n);this.headEndWidth=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"w");this.headEndLen=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(n),this.tailEndWidth=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"w"),this.tailEndLen=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"len")}}}else if(void 0=== +a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload"); +}b.prototype.getLineEndType=function(a){var d=null;switch(a.getAttribute("type")){case "none":d=b.LineEndType.NONE;break;case "triangle":d=b.LineEndType.TRIANGLE;break;case "stealth":d=b.LineEndType.STEALTH;break;case "diamond":d=b.LineEndType.DIAMOND;break;case "oval":d=b.LineEndType.OVAL;break;case "arrow":d=b.LineEndType.ARROW}return d};b.prototype.getLineColor=function(a,b){return null!=this.fillStyle?this.fillStyle.applyStyle(a,b):b.getDefaultLineClr()};b.prototype.isDashed=function(){return this.isLineDashed}; +b.prototype.getLineDashPattern=function(){return this.lineDashPattern};b.prototype.getStartSize=function(){return 4};b.prototype.getEndSize=function(){return 4};b.prototype.getStart=function(){return 0};b.prototype.getEnd=function(){return 0};b.prototype.getLineWidth=function(){return this.lineWidth};return b}();h.LineStyle=f;f.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(b){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(b.LineCapType||(b.LineCapType={})); +(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(b.CompoundLineType||(b.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(b.LineEndType||(b.LineEndType={}))})(f=h.LineStyle||(h.LineStyle={}))})(l.theme||(l.theme={}))})(q.vsdx|| +(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a, +"startSize");this.end=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=c.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}b.prototype.getRndg=function(){return this.rndg};b.prototype.getStart=function(){return this.start};b.prototype.getStartSize= +function(){return this.startSize};b.prototype.getEnd=function(){return this.end};b.prototype.getEndSize=function(){return this.endSize};b.prototype.isDashed=function(){return 1<this.pattern};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};return b}();h.LineStyleExt=f;f.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){}b.prototype.applyStyle=function(a,b){return c.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return b}();h.NoFillStyle=f;f.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";f.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}b.prototype.calcColor= +function(a,b){if(this.hasEffects){var d=this.color.toHsv();0!==this.tint&&d.tint(this.tint);0!==this.shade&&d.shade(this.shade);0!==this.satMod&&d.satMod(this.satMod);0!==this.lumMod&&d.lumMod(this.lumMod);0!==this.hueMod&&d.hueMod(this.hueMod);this.color=d.toRgb()}};b.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,b){if(this.isDynamic||!this.isInitialized)this.calcColor(a,b),this.isInitialized=!0;return this.color};b.prototype.getColor=function(a,b){if("number"!==typeof a&&null!== +a||!(null!=b&&b instanceof c.mxgraph.io.vsdx.mxVsdxTheme||null===b)){if((null!=a&&a instanceof c.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===b)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};b.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};b.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};b.prototype.setShade= +function(a){this.shade=a;this.hasEffects=!0};b.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};b.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};b.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};b.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};b.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};b.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};b.prototype.setHue=function(a){this.hue=a;this.hasEffects= +!0};b.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};b.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};b.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};b.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};b.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};b.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};b.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};b.prototype.setLumMod=function(a){this.lumMod= +a;this.hasEffects=!0};b.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};b.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};b.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};b.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};b.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};b.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};b.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};b.prototype.setBlueOff= +function(a){this.blueOff=a;this.hasEffects=!0};b.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};b.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};b.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return b}();h.OoxmlColor=f;f.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){}b.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new c.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new c.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new c.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")), +parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new c.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new c.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new c.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var g=0;g<a.length;g++){var n=a[g],f=parseInt(n.getAttribute("val"))/1E3|0;switch(n.nodeName){case "a:tint":b.setTint(f);break; +case "a:shade":b.setShade(f);break;case "a:satMod":b.setSatMod(f);break;case "a:lumMod":b.setLumMod(f);break;case "a:hueMod":b.setHueMod(f)}}return b};return b}();h.OoxmlColorFactory=f;f.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){(function(c){var f=function(){function b(a,b,g,c,f,h,y,p,l,q){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=g;this.quickStyleFontColor=c;this.quickStyleFontMatrix=f;this.quickStyleLineColor= +h;this.quickStyleLineMatrix=y;this.quickStyleShadowColor=p;this.quickStyleType=l;this.quickStyleVariation=q}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix}; +b.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};b.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};b.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};b.prototype.getQuickStyleType=function(){return this.quickStyleType};b.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};b.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};b.prototype.setQuickStyleFillColor= +function(a){this.quickStyleFillColor=a};b.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};b.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};b.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};b.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};b.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};b.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};b.prototype.setQuickStyleType= +function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();c.QuickStyleVals=f;f.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(c.theme||(c.theme={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){(function(c){var f=function(){function b(a){this.color=null;this.color=a}b.prototype.applyStyle=function(a,b){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};return b}();c.SolidFillStyle=f;f.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";f.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(c.theme||(c.theme={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){var l=function(){function c(){}c.MAX_AREA_$LI$=function(){null==c.MAX_AREA&&(c.MAX_AREA=1E8);return c.MAX_AREA};return c}();l.MAX_REQUEST_SIZE=52428800;l.IMAGE_DOMAIN="http://img.diagramly.com/";c.Constants=l;l.__class="com.mxgraph.online.Constants"})(c.online||(c.online={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){var l=function(){function c(){}c.getRotatedPoint=function(c,b,a,d){var g=c.x-d.x;c=c.y-d.y;return new mxPoint(g*b-c*a+d.x,c*b+g*a+d.y)};c.rotatedGeometry=function(c,b,a,d){b=b*Math.PI/180;var g=Math.cos(b);b=Math.sin(b);var n=c.getCenterX()-a,f=c.getCenterY()-d;c.x=Math.round(n*g-f*b+a-c.width/2);c.y=Math.round(f*g+n*b+d-c.height/2)};return c}();l.CHARSET_FOR_URL_ENCODING="ISO-8859-1";c.Utils=l;l.__class="com.mxgraph.online.Utils"})(c.online||(c.online={}))})(c.mxgraph|| +(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f){a=b.call(this,a,g,c)||this;a.a=f;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=b.getHeight(),g=b.getWidth(),f=Math.floor(Math.round(b.getLastX()*g)/100),h=Math.floor(Math.round(b.getLastY()*d)/100),p=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.a* +c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=Math.abs(p-f),h=Math.abs(l-h),f=h=.5*q+(f*f+h*h)/(8*q),u=Math.abs(h),h=Math.round(100*h/g*100)/100,f=Math.round(100*f/d*100)/100,p=Math.round(100*p/g*100)/100,l=Math.round(100*l/d*100)/100,q=Math.round(100*q)/100,h=Math.abs(h),f=Math.abs(f),d=0>q?"1":"0",q=u<Math.abs(q)?"1":"0";b.setLastX(p);b.setLastY(l);return'<arc rx="'+(new String(h)).toString()+'" ry="'+(new String(f)).toString()+'" x="'+(new String(p)).toString()+'" y="'+(new String(l)).toString()+ +'" x-axis-rotation="0" large-arc-flag="'+q+'" sweep-flag="'+d+'"/>'}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.ArcTo=f;f.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a){return b.call(this,a,null,null)||this}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.DelRow=f;f.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,y,p){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=y;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),g=b.getWidth(),f=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=d-h,p=this.a*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +l=this.b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.c*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),u=this.d*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=Math.abs(p-f),l=Math.abs(l-h),l=Math.sqrt(p*p+l*l),q=Math.abs(q-f),u=Math.abs(d-u-h),f=100*f/g,u=Math.round(100*Math.sqrt(q*q+u*u)/d/2*100)/100,g=Math.round(100*l/g/2*100)/100,q=Math.round(100*(f-2*g))/100,f=Math.round(100*(f+2*g))/100,d=Math.round(100*h/d*100)/100;return'<move x="'+(new String(q)).toString()+ +'" y="'+(new String(d)).toString()+'"/><arc rx="'+(new String(g)).toString()+'" ry="'+(new String(u)).toString()+'" x="'+(new String(f)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(g)).toString()+'" ry="'+(new String(u)).toString()+'" x="'+(new String(q)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.Ellipse= +f;f.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),g=b.getWidth(),f=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=d-h,p=this.a*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +l=this.b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.c,u=this.d,f=100*f/g,h=100*h/d,E=b.getLastX()*g/100,A=b.getLastY()*d/100,F=f*g/100,B=h*d/100,Z=d-l,K=-q,q=Math.sqrt(E*E+A*A)*Math.cos(Math.atan2(A,E)-K),l=Math.sqrt(E*E+A*A)*Math.sin(Math.atan2(A,E)-K),Y=Math.sqrt(F*F+B*B)*Math.cos(Math.atan2(B,F)-K),L=Math.sqrt(F*F+B*B)*Math.sin(Math.atan2(B,F)-K),fa=Math.sqrt(p*p+Z*Z)*Math.cos(Math.atan2(Z,p)-K),ka=Math.sqrt(p*p+Z*Z)*Math.sin(Math.atan2(Z,p)-K),ea=((q-Y)*(q+Y)*(L-ka)-(Y-fa)*(Y+ +fa)*(l-L)+u*u*(l-L)*(L-ka)*(l-ka))/(2*((q-Y)*(L-ka)-(Y-fa)*(l-L))),na=((q-Y)*(Y-fa)*(q-fa)/(u*u)+(Y-fa)*(l-L)*(l+L)-(q-Y)*(L-ka)*(L+ka))/(2*((Y-fa)*(l-L)-(q-Y)*(L-ka))),Ga=q-ea,Ia=l-na,Ga=Math.sqrt(Ga*Ga+Ia*Ia*u*u),u=Ga/u,K=180*K/Math.PI,f=Math.round(100*f)/100,h=Math.round(100*h)/100,Ga=Math.round(100*Ga/g*100)/100,u=Math.round(100*u/d*100)/100,K=Math.round(100*K)/100,d=0<(F-E)*(Z-A)-(B-A)*(p-E)?"0":"1",g="0";c.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ea,na,q,l,Y,L,fa,ka)&&this.isReflexAngle(ea, +na,q,l,Y,L,fa,ka)&&(g="1");b.setLastX(f);b.setLastY(h);return'<arc rx="'+(new String(Ga)).toString()+'" ry="'+(new String(u)).toString()+'" x="'+(new String(f)).toString()+'" y="'+(new String(h)).toString()+'" x-axis-rotation="'+(new String(K)).toString()+'" large-arc-flag="'+g+'" sweep-flag="'+d+'"/>'}return""};a.prototype.isReflexAngle=function(a,b,c,f,h,l,p,q){c-=a;f-=b;l-=b;h=p-a;q-=b;b=a=0;c=180*(Math.atan2(f,c)-Math.atan2(b,a))/Math.PI;h=180*(Math.atan2(l,h)-Math.atan2(b,a))/Math.PI;a=180*(Math.atan2(q, +p)-Math.atan2(b,a))/Math.PI;c=(c-a)%360;h=(h-a)%360;180<c?c-=360:-180>c&&(c+=360);180<h?h-=360:-180>h&&(h+=360);return(0<c&&0>h||0>c&&0<h)&&180<Math.abs(c-h)?!0:!1};return a}(c.mxgraph.io.vsdx.geometry.Row);h.EllipticalArcTo=f;f.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;return a}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.InfiniteLine=f;f.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c){return b.call(this,a,g,c)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,g=a.y,f=b.getHeight(),h=b.getWidth();null!=this.x&&null!=this.y&&(d=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());d=Math.round(100*d/h*100)/100;g=Math.round(100*(100-100*g/f))/100;a.x=d;a.y=g;b.setLastX(d);b.setLastY(g);return'<line x="'+ +(new String(d)).toString()+'" y="'+(new String(g)).toString()+'"/>'};return a}(c.mxgraph.io.vsdx.geometry.Row);h.LineTo=f;f.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c){return b.call(this,a,g,c)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,g=a.y,f=b.getHeight(),h=b.getWidth();null!=this.x&&null!=this.y&&(d=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());d=Math.round(100*d/h*100)/100;g=Math.round(100*(100-100*g/f))/100;a.x=d;a.y=g;b.setLastX(d);b.setLastY(g);b.setLastMoveX(d); +b.setLastMoveY(g);return'<move x="'+(new String(d)).toString()+'" y="'+(new String(g)).toString()+'"/>'};return a}(c.mxgraph.io.vsdx.geometry.Row);h.MoveTo=f;f.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p,q){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=l;a.d=p;a.formulaE=q;return a}__extends(a,b);a.prototype.handle=function(b,g){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var d=g.getHeight(),f=g.getWidth(),h=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.formulaE.split("NURBS(").join(""),p=p.split(")").join(""), +p=new a.Nurbs(this,p,f,d);if(2<=p.getSize()){var q=p.getX(0),u=p.getY(0),P=p.getX(1),E=p.getY(1),h=Math.round(100*h/f*100)/100,l=Math.round(100*(100-100*l/d))/100,q=Math.round(100*q)/100,u=Math.round(100*u)/100,P=Math.round(100*P)/100,E=Math.round(100*E)/100;g.setLastX(h);g.setLastY(l);if(3===p.getDegree()&&p.isOrderedByThree(this.getA())){d=[];f=[];q=[];P=p.getSize();for(u=0;u<P-1;u+=3)0<d.push(new mxPoint(p.getX(u),p.getY(u))),0<f.push(new mxPoint(p.getX(u+1),p.getY(u+1))),u<P-2?0<q.push(new mxPoint(p.getX(u+ +2),p.getY(u+2))):0<q.push(new mxPoint(h,l));h="";for(u=0;u<d.length;u++)h+='<curve x1="'+d[u].x+'" y1="'+d[u].y+'" x2="'+f[u].x+'" y2="'+f[u].y+'" x3="'+q[u].x+'" y3="'+q[u].y+'"/>\n';return h}return'<curve x1="'+(new String(q)).toString()+'" y1="'+(new String(u)).toString()+'" x2="'+(new String(P)).toString()+'" y2="'+(new String(E)).toString()+'" x3="'+(new String(h)).toString()+'" y3="'+(new String(l)).toString()+'"/>'}}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.NURBSTo=f;f.__class= +"com.mxgraph.io.vsdx.geometry.NURBSTo";(function(b){var a=function(){function a(a,b,d,c){this.__parent=a;this.nurbsValues=[];a=b.split(/\s*,\s*/).slice(0);for(b=0;b<a.length;b++)3<b&&0===b%4?0<this.nurbsValues.push(100*parseFloat(a[b])):3<b&&1===b%4?0<this.nurbsValues.push(100-100*parseFloat(a[b])):0<this.nurbsValues.push(parseFloat(a[b]))}a.prototype.isOrderedByThree=function(a){for(var b=0;b+2<this.getSize();b+=3){var d=Math.round(100*this.getKnot(b))/100,g=Math.round(100*this.getKnot(b+1))/100, +c=Math.round(100*this.getKnot(b+2))/100;if(d!==g||d!==c||g!==c)return!1}b=Math.round(10*this.getKnot(this.getSize()-2))/10;d=Math.round(10*this.getKnot(this.getSize()-1))/10;a=Math.round(10*a)/10;return b!==d||b!==a||d!==a?!1:!0};a.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};a.prototype.getKnotLast=function(){return this.nurbsValues[0]};a.prototype.getDegree=function(){return this.nurbsValues[1]};a.prototype.getXType=function(){return this.nurbsValues[2]};a.prototype.getYType= +function(){return this.nurbsValues[3]};a.prototype.getX=function(a){return this.nurbsValues[4*(a+1)]};a.prototype.getY=function(a){return this.nurbsValues[4*(a+1)+1]};a.prototype.getKnot=function(a){return this.nurbsValues[4*(a+1)+2]};a.prototype.getWeight=function(a){return this.nurbsValues[4*(a+1)+3]};return a}();b.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(f=h.NURBSTo||(h.NURBSTo={}))})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph= +{}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f){a=b.call(this,a,g,c)||this;a.formulaA=f;return a}__extends(a,b);a.prototype.handle=function(a,b){var d="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var g=b.getHeight(),f=b.getWidth(),h=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=Math.round(100*h/f*100)/100,p=Math.round(100*(100-100*p/g))/100,l=this.formulaA.replace(RegExp("\\s", +"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),""),q;q=l&&l.equals?l.equals("inh"):"inh"===l;if(q)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});l=l.split(",").slice(0).slice(0);q=parseFloat(l.splice(0,1));parseFloat(l.splice(0,1));for(var u,E;0<l.length;)u=parseFloat(l.splice(0,1))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +E=parseFloat(l.splice(0,1))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===q&&(u=100*u/f),1===q&&(E=100*E/g),E=100-E,u=Math.round(100*u)/100,E=Math.round(100*E)/100,b.setLastX(u),b.setLastY(E),d+='<line x="'+(new String(u)).toString()+'" y="'+(new String(E)).toString()+'"/>';d+='<line x="'+(new String(h)).toString()+'" y="'+(new String(p)).toString()+'"/>';b.getLastMoveX()===h&&b.getLastMoveY()===p&&(d+="<close/>")}return d};return a}(c.mxgraph.io.vsdx.geometry.Row);h.PolylineTo=f;f.__class= +"com.mxgraph.io.vsdx.geometry.PolylineTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=100*this.x,g=100-100*this.y,c=100*this.a,f=100-100*this.b,h=100*this.c,l=100-100*this.d,d=Math.round(100*d)/100,g=Math.round(100*g)/100,c=Math.round(100*c)/100,f=Math.round(100*f)/100,h=Math.round(100* +h)/100,l=Math.round(100*l)/100;b.setLastX(d);b.setLastY(g);return'<curve x1="'+(new String(c)).toString()+'" y1="'+(new String(f)).toString()+'" x2="'+(new String(h)).toString()+'" y2="'+(new String(l)).toString()+'" x3="'+(new String(d)).toString()+'" y3="'+(new String(g)).toString()+'"/>'}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.RelCubBezTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph= +{}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c){return b.call(this,a,g,c)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,g=a.y;null!=this.x&&null!=this.y&&(d=100*this.x,g=100-100*this.y);d=Math.round(100*d)/100;g=Math.round(100*g)/100;a.x=d;a.y=g;b.setLastX(d);b.setLastY(g);return'<line x="'+(new String(d)).toString()+'" y="'+(new String(g)).toString()+'"/>'};return a}(c.mxgraph.io.vsdx.geometry.Row);h.RelLineTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(l.geometry|| +(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c){return b.call(this,a,g,c)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,g=a.y;null!=this.x&&null!=this.y&&(d=100*this.x,g=100-100*this.y);d=Math.round(100*d)/100;g=Math.round(100*g)/100;a.x=d;a.y=g;b.setLastX(d);b.setLastY(g);b.setLastMoveX(d);b.setLastMoveY(g);return'<move x="'+(new String(d)).toString()+'" y="'+(new String(g)).toString()+'"/>'};return a}(c.mxgraph.io.vsdx.geometry.Row); +h.RelMoveTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){var d=100*this.x,g=100-100*this.y,c=100*this.a,f=100-100*this.b,d=Math.round(100*d)/100,g=Math.round(100*g)/100,c=Math.round(100*c)/100,f=Math.round(100*f)/100;b.setLastX(d);b.setLastY(g);return'<quad x1="'+(new String(c)).toString()+'" y1="'+ +(new String(f)).toString()+'" x2="'+(new String(d)).toString()+'" y2="'+(new String(g)).toString()+'"/>'}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.RelQuadBezTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f){a=b.call(this,a,g,c)||this;a.a=f;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),d=Math.round(100*d)/100,g=Math.round(100*(100-g))/100;b.setLastX(d);b.setLastY(g)}return""};return a}(c.mxgraph.io.vsdx.geometry.Row); +h.SplineKnot=f;f.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b.getHeight();b.getWidth();var d=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b.setLastKnot(this.c);d=Math.round(100*d)/ +100;g=Math.round(100*(100-g))/100;b.getLastX();b.getLastY();b.setLastX(d);b.setLastY(g);return"<curve "}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.SplineStart=f;f.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=b;this.pm=a.getPropertiesManager();var d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=d&&0!==d.length?parseFloat(d):-1}catch(g){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}f.__static_initialize=function(){f.__static_initialized||(f.__static_initialized=!0,f.__static_initializer_0(), +f.__static_initializer_1())};f.styleTypes_$LI$=function(){f.__static_initialize();null==f.styleTypes&&(f.styleTypes={});return f.styleTypes};f.__static_initializer_0=function(){f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE; +f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]= +c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$().QuickStyleFillColor=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$().QuickStyleFillMatrix=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN]= +c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$().QuickStyleLineColor=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$().QuickStyleLineMatrix= +c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE; +f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER]= +c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$().QuickStyleFontColor=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$().QuickStyleFontMatrix=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};f.prototype.getTheme=function(){return null};f.prototype.getQuickStyleVals=function(){return null};f.prototype.isVertex=function(){return!1};f.prototype.styleDebug=function(b){f.vsdxStyleDebug&&console.info(b)};f.prototype.stylesheetRefs=function(b){this.styleParents[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]= +b.getStylesheet(this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=b.getStylesheet(this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=b.getStylesheet(this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=b.getStylesheet("0")};f.prototype.cacheCells=function(b){if(null!=this.shape){var a=this.shape.childNodes; +if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,b),a=a.nextSibling}};f.prototype.parseShapeElem=function(b,a){var d=b.nodeName;(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"Cell")?this.cellElements[b.getAttribute("N")]=b:function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Section")&&this.parseSection(b)};f.prototype.parseSection=function(b){var a=new c.mxgraph.io.vsdx.Section(b);this.sections[b.getAttribute("N")]=a};f.prototype.hasProperty=function(b, +a){return this.cellElements.hasOwnProperty(a)};f.prototype.getValue=function(b,a){return null!=b?b.getAttribute("V")||"":a};f.prototype.getValueAsDouble=function(b,a){if(null!=b){var d=b.getAttribute("V");if(null!=d){if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Themed"))return 0;try{var g=parseFloat(d);(function(a,b){return a&&a.equals?a.equals(b):a===b})(b.getAttribute("U"),"PT")&&(g*=c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*g)/100}catch(n){console.error(n.message, +n)}}}return a};f.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=function(b,a){if(null!=b){var d=b.getAttribute("V");if(null!=d)try{var g=parseFloat(d);return this.getScreenNumericalValue$double(g)}catch(n){console.error(n.message,n)}}return a};f.prototype.getScreenNumericalValue=function(b,a){if((null==b||1!=b.nodeType)&&null!==b||"number"!==typeof a&&null!==a){if("number"!==typeof b&&null!==b||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(b)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(b, +a)};f.prototype.getScreenNumericalValue$double=function(b){return b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};f.prototype.getAttribute=function(b,a,d){var g=this.cellElements;b=g[b]?g[b]:null;null!=b&&(d=b.getAttribute(a)||"");return d};f.prototype.getChildValues=function(b,a){for(var d={},g=b.firstChild;null!=g;){if(null!=g&&1==g.nodeType){var c=g,f,h;((f=c.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f)?(f=c.getAttribute("N")||"",h=c.getAttribute("V")||""):(f=c.nodeName,h=c.textContent); +if(null!=a){var l=a[f]?a[f]:null;null!=l&&(h=c.getAttribute(l)||"")}d[f]=h}g=g.nextSibling}return d};f.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(b,a,d){var g=function(a,b){return a[b]?a[b]:null}(this.sections,d),n=null,h=!1;null!=g&&(n=g.getIndexedCell(a,b));if(null!=n){var g=n.getAttribute("F"),l=n.getAttribute("V");if(null!=g&&null!=l)if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"Inh")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(l, +"Themed"))h=!0;else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"THEMEVAL()")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(l,"Themed")&&null!=this.style){if(function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR,b))return n;g=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,d);if(null!=g)return g}}if(null==n||h)if(h=function(a,b){return a[b]?a[b]:null}(f.styleTypes_$LI$(),d),h=function(a,b){return a[b]?a[b]: +null}(this.styleParents,h),null!=h&&(b=h.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,d),null!=b))return b;return n};f.prototype.getCellElement=function(b,a,d){if("string"!==typeof b&&null!==b||"string"!==typeof a&&null!==a||"string"!==typeof d&&null!==d){if("string"!==typeof b&&null!==b||void 0!==a||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(b)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,d)}; +f.prototype.getCellElement$java_lang_String=function(b){var a=function(a,b){return a[b]?a[b]:null}(this.cellElements,b),d=!1;if(null!=a){var g=a.getAttribute("F"),n=a.getAttribute("V");if(null!=g&&null!=n)if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"Inh")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Themed"))d=!0;else if(-1!=g.indexOf("THEMEVAL()")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Themed")&&null!=this.style){if(function(a,b){return a&&a.equals?a.equals(b): +a===b}("FillForegnd",b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW, +b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,b))return a;g=this.style.getCellElement$java_lang_String(b);if(null!=g)return g}}if(null==a||d)if(d=function(a,b){return a[b]?a[b]:null}(f.styleTypes_$LI$(),b),d=function(a,b){return a[b]?a[b]:null}(this.styleParents,d),null!=d&&(b=d.getCellElement$java_lang_String(b),null!=b))return b;return a};f.prototype.getStrokeColor= +function(){var b="";(function(a,b){return a&&a.equals?a.equals(b):a===b})(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"1"),"0")?b="none":(b=this.getColor(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,b){return a&&a.equals?a.equals(b):a===b}("Themed",b)&&(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineColor(this.getQuickStyleVals())).toHexStr(): +""));return b};f.prototype.getFillColor=function(){if(function(a,b){return a&&a.equals?a.equals(b):a===b}("1",this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var b=function(a,b){return a[b]?a[b]:null}(this.sections,"FillGradient");if(null!=b&&(b=this.getColor(b.getIndexedCell("0","GradientStopColor")),null!=b&&0!==b.length))return b}b=this.getColor(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND)); +(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",b)&&(b=this.getTheme(),null!=b?(b=b.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),b=b.toHexStr()):b="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");return null!=a&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")?"none":b};f.prototype.getColor=function(b){b=this.getValue(b,"");(function(a,b){return a&&a.equals?a.equals(b): +a===b})("Themed",b)||function(a,b,g){void 0===g&&(g=0);return a.substr(g,b.length)===b}(b,"#")||(b=this.pm.getColor(b));return b};f.prototype.getTextBkgndColor=function(b){b=this.getValue(b,"");return function(a,b,g){void 0===g&&(g=0);return a.substr(g,b.length)===b}(b,"#")?b:function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"255")||0===b.length?"none":this.pm.getColor((new String(parseInt(b)-1)).toString())};f.prototype.getLineWeight= +function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};f.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),0)};f.prototype.getNameU=function(){return this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};f.prototype.getName=function(){return this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME)|| +""};f.prototype.getUniqueID=function(){return this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};f.prototype.getId=function(){return this.Id};f.prototype.getTextColor=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=this.getValue(b,"#000000");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",b)?(b=this.getTheme(),b=null!=b?(this.isVertex()? +b.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,b,g){void 0===g&&(g=0);return a.substr(g,b.length)===b}(b,"#")||(b=this.pm.getColor(b));return b};f.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),0)};f.prototype.getTextBottomMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN), +0)};f.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};f.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),0)};f.prototype.getTextStyle=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.STYLE, +b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};f.prototype.getTextFont=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FONT,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};f.prototype.getTextPos=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.POS,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b, +"")};f.prototype.getTextStrike=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=(b=this.getValue(b,""))&&b.equals?b.equals("1"):"1"===b;return b};f.prototype.getTextCase=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.CASE,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};f.prototype.getHorizontalAlign= +function(b,a){var d;d=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(d,"")){case "0":d=a?"left":mxConstants.ALIGN_LEFT;break;case "2":d=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":d=a?"justify":mxConstants.ALIGN_CENTER;break;default:d=a?"center":mxConstants.ALIGN_CENTER}return d};f.prototype.getIndentFirst=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST, +b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};f.prototype.getIndentLeft=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};f.prototype.getIndentRight=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT, +b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};f.prototype.getSpBefore=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};f.prototype.getSpAfter=function(b){b= +this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};f.prototype.getSpLine=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);b=this.getValue(b,"");var a;a=b&& +b.equals?b.equals(""):""===b;return a?0:parseFloat(b)};f.prototype.getFlags=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};f.prototype.getLetterSpace=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b, +0))).toString()};f.prototype.getBullet=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BULLET,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};f.prototype.getShape=function(){return this.shape};f.prototype.setShape=function(b){this.shape=b};f.lineDashPatterns_$LI$=function(){f.__static_initialize();null==f.lineDashPatterns&&(f.lineDashPatterns=[]);return f.lineDashPatterns};f.__static_initializer_1=function(){0< +f.lineDashPatterns_$LI$().push([]);0<f.lineDashPatterns_$LI$().push([]);0<f.lineDashPatterns_$LI$().push([]);var b=[];0<b.push(f.DOT);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DASH);0<b.push(f.SPACE);0<b.push(f.DOT);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DASH);0<b.push(f.SPACE);0<b.push(f.DOT);0<b.push(f.SPACE);0<b.push(f.DOT);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DASH);0<b.push(f.SPACE);0<b.push(f.DASH);0< +b.push(f.SPACE);0<b.push(f.DOT);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DOT);0<b.push(f.SHORT_SPACE); +0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.DOT);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.DOT);0<b.push(f.SHORT_SPACE);0<b.push(f.DOT);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.DOT);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b); +b=[];0<b.push(f.DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE); +0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.XLONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DASH);0<b.push(f.LONG_SPACE);0< +f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.XLONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DASH);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.XSHORT_DASH);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b)};f.getLineDashPattern=function(b){return 0<=b&&23>=b?f.lineDashPatterns_$LI$()[b]:f.lineDashPatterns_$LI$()[0]};return f}();h.__static_initialized=!1;h.vsdxStyleDebug=!1;h.SPACE=4;h.SHORT_SPACE=2;h.LONG_SPACE=6; +h.DOT=1;h.DASH=8;h.LONG_DASH=12;h.SHORT_DASH=4;h.XLONG_DASH=20;h.XSHORT_DASH=2;l.Style=h;h.__class="com.mxgraph.io.vsdx.Style"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,f){var d=b.call(this)||this;d.__com_mxgraph_io_vsdx_theme_HslClr_hue=a/360;d.__com_mxgraph_io_vsdx_theme_HslClr_sat=g/100;d.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;d.color=(new c.mxgraph.io.vsdx.theme.HSLColor(a,g,f)).toRgb();return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.HslClr=f;f.__class="com.mxgraph.io.vsdx.theme.HslClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io|| +(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a){var d=b.call(this)||this;d.val=a;d.color=new c.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.PrstClr=f;f.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a){var d=b.call(this)||this;d.isDynamic=!0;d.val=a;return d}__extends(a,b);a.prototype.calcColor=function(a,g){var d;d=this.val;d="phClr".equals?"phClr".equals(d):"phClr"===d;d?this.color=g.getStyleColor(a):(this.color=g.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,a,g)};return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.SchemeClr=f;f.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(l.theme|| +(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,f){var d=b.call(this)||this;d.r=0;d.g=0;d.b=0;d.r=a;d.g=g;d.b=f;d.color=new c.mxgraph.io.vsdx.theme.Color(a,g,f);return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.ScrgbClr=f;f.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a){var d=b.call(this)||this;d.hexVal=null;d.hexVal=a;d.color=c.mxgraph.io.vsdx.theme.Color.decodeColorHex(a);return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.SrgbClr=f;f.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g){var d=b.call(this)||this;d.lastClr=null;d.val=a;var f=d.lastClr=g;if(null==f)switch(a){case "windowText":f="000000";break;case "window":f="FFFFFF";break;default:f="FFFFFF"}d.color=c.mxgraph.io.vsdx.theme.Color.decodeColorHex(f);return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.SysClr=f;f.__class="com.mxgraph.io.vsdx.theme.SysClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io|| +(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p){return b.call(this,a,g,c,f,h,l,p)||this}__extends(a,b);a.prototype.handle=function(a,g){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=g.getHeight()/c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=g.getWidth()/c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=f;this.y*=d;this.a*=f;this.b*=d}return b.prototype.handle.call(this, +a,g)};return a}(c.mxgraph.io.vsdx.geometry.EllipticalArcTo);h.RelEllipticalArcTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(f){function b(a,b){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=f.call(this,a,b)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(a, +b){return a[b]?a[b]:null}(d.cellElements,c.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(a,b){return a[b]?a[b]:null}(d.cellElements,c.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(b,f);b.UNICODE_LINE_SEP_$LI$=function(){null==b.UNICODE_LINE_SEP&&(b.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==", +b.UNICODE_LINE_SEP=String.fromCharCode(8232));return b.UNICODE_LINE_SEP};b.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};b.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};b.prototype.getQuickStyleVals=function(){return this.quickStyleVals};b.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new c.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]); +this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){f.prototype.parseShapeElem.call(this,a,d);var g=a.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"ForeignData")){var n=a.ownerDocument.vsdxFileName,h=a.getAttribute("ForeignType"),g=a.getAttribute("CompressionType")||"";if(function(a,b){return a&&a.equals?a.equals(b):a===b}(h,"Bitmap"))g=g.toLowerCase();else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(h,"MetaFile"))g="x-wmf";else if(function(a,b){return a&& +a.equals?a.equals(b):a===b}(h,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(h,"EnhMetaFile"))g="x-emf";else return;h=a.firstChild;if(null!=h){if(null!=h&&1==h.nodeType){var l=h;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(l.nodeName.toLowerCase(),"rel")&&(l=l.getAttribute("r:id"),null!=l&&0!==l.length)){var h=n.lastIndexOf("/"),y="",p="";try{y=n.substring(0,h),p=n.substring(h,n.length)}catch(z){return}h=d.getRelationship(l,y+"/_rels"+p+".rels");if(null!=h){n= +h.getAttribute("Target")||"";l=h.getAttribute("Type");h=n.lastIndexOf("/");try{n=n.substring(h+1,n.length)}catch(z){return}null!=l&&function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(l,"image")&&(this.imageData={},(h=d.getMedia(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+n))?(this.imageData.iData=h,function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(n.toLowerCase(),".bmp")?g="jpg":function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!== +c&&c===d}(n.toLowerCase(),".emf")&&(g=function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(h,"iVBORw0K")?"png":function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(h,"/9j/")?"jpg":g),this.imageData.iType=g):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}return}}h=h.nextSibling}}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(g,c.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=a)};b.prototype.parseSection=function(a){var d=a.getAttribute("N"); +if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Geometry"))null==this.geom&&(this.geom=[]),0<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var g=0;g<a.length;g++){var d=a[g],n=d.getAttribute("IX")||"";if(0!==n.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[n]="";else{for(var h=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d, +"Cell"),l="",y="",p=0;p<h.length;p++){var q=h[p],d=q.getAttribute("N"),q=q.getAttribute("V");switch(d){case "Value":l=q;break;case "Format":y=q}}if(0!==l.length){try{(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(y,"{{")&&(l=(new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(l)))).toString())}catch(W){}this.fields[n]=l}}}}else f.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText= +function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)}; +b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.textToList=function(a,b){if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"")){var d=this.getBullet(b);if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"0")){var f=a.split("\n");f[f.length-1]||f.pop();for(var h="",l=0;l<f.length;l++)h+=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(f[l],"li");h=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(h,"ul");f={};(function(a,b){return a&&a.equals? +a.equals(b):a===b})(d,"4")?f["list-style-type"]="square":f["list-style-type"]="disc";return h=this.insertAttributes(h,f)}}return a};b.prototype.getTextParagraphFormated=function(a){var b="",c={};c.align=this.getHorizontalAlign(this.pp,!0);c["margin-left"]=this.getIndentLeft(this.pp);c["margin-right"]=this.getIndentRight(this.pp);c["margin-top"]=this.getSpBefore(this.pp)+"px";c["margin-bottom"]=this.getSpAfter(this.pp)+"px";c["text-indent"]=this.getIndentFirst(this.pp);c.valign=this.getAlignVertical(); +c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",g="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",h="direction:"+this.getRtlText(this.cp)+";",l="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",y="line-height:"+this.getSpcLine(this.pp),p=";opacity:"+this.getTextOpacity(this.cp),q=this.getTextPos(this.cp), +u=this.getTextCase(this.cp);(function(a,b){return a&&a.equals?a.equals(b):a===b})(u,"1")?a=a.toUpperCase():function(a,b){return a&&a.equals?a.equals(b):a===b}(u,"2")&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(a,b){return a&&a.equals?a.equals(b):a===b})(q,"1")?a=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(a,b){return a&&a.equals?a.equals(b):a===b}(q,"2")&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a, +"b"):a;a=this.isItalic(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"i"):a;a=this.isUnderline(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return""+('<font style="'+g+f+b+h+l+y+p+'">'+a+"</font>")};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(a,b){return a&&a.equals? +a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d),d=a.substring(0, +d),h=' style="'+c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return d+h+f}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var b= +!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};b.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};b.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a); +(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};b.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS, +a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.floor(Math.round(100*a)/100)};b.prototype.getAlignVertical=function(){var a= +mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot= +function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};return b}(c.mxgraph.io.vsdx.Style);h.VSDX_START_TIME=-22091688E5;l.Shape=h;h.__class="com.mxgraph.io.vsdx.Shape"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(f){function b(a,b,g,n,h,l){var d=this;d.masterShape=null;d.master=null;d.parentHeight=0;d=f.call(this,b,l)||this;d.htmlLabels=!0;d.rootShape=d;d.shapeName=null;d.shapeIndex=0;d.vertex=!0;d.childShapes={};var p=d.getMasterId(),C=d.getShapeMasterId();d.master=null!=p?n[p]?n[p]:null:h;null!=d.master&&(d.masterShape=null==p&&null!=C?d.master.getSubShape(C):d.master.getMasterShape());n=d.getNameU();h=n.lastIndexOf(".");-1!==h&&(n=n.substring(0, +h));d.shapeName=n;b=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),d.childShapes=a.parseShapes(b,d.master,!1));b=d.calcRotation();d.rotation=100*b/100;d.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(d.getValue(d.getCellElement$java_lang_String("ThemeIndex"),"0")));l=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key=== +b)return a.entries[d].value;return null}(l.getThemes(),b);a=a.getCellIntValue("VariationColorIndex",0);d.setThemeAndVariant(l,a);b=function(a){null==a.entries&&(a.entries=[]);return a.entries}(d.childShapes);for(n=0;n<b.length;n++)h=b[n].getValue(),h.setRootShape(d),null==h.theme&&h.setThemeAndVariant(l,a);d.quickStyleVals=new c.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillColor"), +"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleShadowColor"), +"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=d.masterShape?(d.masterShape.processGeomList(null),d.processGeomList(d.masterShape.getGeomList()),0===d.width&&(d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===d.height&&(d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT), +0))):d.processGeomList(null);d.vertex=g||null!=d.childShapes&&!function(a){null==a.entries&&(a.entries=[]);return 0==a.entries.length}(d.childShapes)||null!=d.geomList&&(!d.geomList.isNoFill()||1<d.geomList.getGeoCount());return d}__extends(b,f);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())};b.OFFSET_ARRAY_$LI$=function(){b.__static_initialize();null==b.OFFSET_ARRAY&&(b.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0)); +return b.OFFSET_ARRAY};b.arrowSizes_$LI$=function(){b.__static_initialize();null==b.arrowSizes&&(b.arrowSizes=[2,3,5,7,9,22,45]);return b.arrowSizes};b.arrowTypes_$LI$=function(){b.__static_initialize();return b.arrowTypes};b.__static_initializer_0=function(){b.arrowTypes={};(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c, +getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&& +(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),2,"blockThin");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,c){null== +a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value= +c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK); +(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),14,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)|| +a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),17,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(), +20,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),22,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),23,"dash");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),24,"ERone");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),25,"ERmandOne");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),27,"ERmany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d< +a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),9,"openAsync");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),11,"diamond");(function(a,b,c){null==a.entries&&(a.entries= +[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),15,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),16,b.ARROW_NO_FILL_MARKER+ +mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),18,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&& +a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),19,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),21,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d< +a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),31,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),32,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),33,b.ARROW_NO_FILL_MARKER+ +mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),34,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&& +a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(), +36,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)|| +a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(), +39,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),40,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&& +a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),41,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d< +a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){b.__static_initialize();null==b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};b.prototype.getShapeNode=function(a){var b;b=this.cellElements;b=b[a]?b[a]:null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a): +b};b.prototype.getTextLabel=function(){var a;a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");a="1".equals?"1".equals(a):"1"===a;if(a)return null;a=this.getTextChildren();null==a&&null!=this.masterShape&&(a=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=a)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),this.getHtmlTextContent(a)}else return a= +this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};b.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};b.prototype.initLabels=function(a){this.paragraphs={};for(var b=null,g=null,f=null,h=0;h<a.length;h++){var l;l=a.item(h);switch(l.nodeName){case "cp":b=this.getIndex(l);break;case "tp":this.getIndex(l);break;case "pp":g=this.getIndex(l);break;case "fld":f=this.getIndex(l);break;case "#text":l=l.textContent;var q;q=this.paragraphs; +q=q[g]?q[g]:null;null==q?(q=new c.mxgraph.io.vsdx.Paragraph(l,b,g,f),this.paragraphs[g]=q):q.addText(l,b,f)}}};b.prototype.createHybridLabel=function(a){var b=function(a,b){return a[b]?a[b]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]= +this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);this.styleMap.fontFamily=this.getTextFont(a);var c=this.isBold(a)?mxConstants.FONT_BOLD:0,c=c|(this.isItalic(a)?mxConstants.FONT_ITALIC:0),c=c|(this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0);this.styleMap.fontStyle=(new String(c)).toString();a=b.numValues();for(var c=null,f=0;f<a;f++){var h=b.getValue(f);if(0===h.length&& +null!=this.fields){var l=b.getField(f);null!=l&&(h=function(a,b){return a[b]?a[b]:null}(this.fields,l),null==h&&null!=this.masterShape&&null!=this.masterShape.fields&&(h=function(a,b){return a[b]?a[b]:null}(this.masterShape.fields,l)))}null!=h&&(c=null==c?h:c+h)}return c};b.prototype.getHtmlTextContent=function(a){var b="",f=!0;if(null!=a&&0<a.length)for(var n=0;n<a.length;n++){var h=a.item(n);(function(a,b){return a&&a.equals?a.equals(b):a===b})(h.nodeName,"cp")?this.cp=this.getIndex(h):function(a, +b){return a&&a.equals?a.equals(b):a===b}(h.nodeName,"tp")?this.tp=this.getIndex(h):function(a,b){return a&&a.equals?a.equals(b):a===b}(h.nodeName,"pp")?(this.pp=this.getIndex(h),f?f=!1:b+="</p>",b+=this.getTextParagraphFormated("<p>")):function(a,b){return a&&a.equals?a.equals(b):a===b}(h.nodeName,"fld")?(this.fld=this.getIndex(h),h=null,null!=this.fields&&(h=function(a,b){return a[b]?a[b]:null}(this.fields,this.fld)),null==h&&null!=this.masterShape&&null!=this.masterShape.fields&&(h=function(a,b){return a[b]? +a[b]:null}(this.masterShape.fields,this.fld)),null!=h&&(b+=this.processLblTxt(h))):function(a,b){return a&&a.equals?a.equals(b):a===b}(h.nodeName,"#text")&&(h=h.textContent,b+=this.processLblTxt(h))}b+=f?"":"</p>";c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(b,"div");return b};b.prototype.processLblTxt=function(a){a=c.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(a);a=this.textToList(a,this.pp);a=a.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(c.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$(),"g"), +"<br/>");return this.getTextCharFormated(a)};b.prototype.isConnectorBigNameU=function(a){return function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree single")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"45 degree single")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"45 degree double")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree double")||function(a,b,c){void 0===c&&(c=0);return a.substr(c, +b.length)===b}(a,"45 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"45 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Flexi-arrow 2")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Flexi-arrow 1")||function(a,b,c){void 0=== +c&&(c=0);return a.substr(c,b.length)===b}(a,"Flexi-arrow 3")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Double flexi-arrow")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Fancy arrow")};b.prototype.isVertex=function(){return this.vertex};b.prototype.getOriginPoint=function(a,b){var d=this.getPinX(),f=this.getPinY(),h=this.getLocPinY(),l=this.getLocPinX(),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.WIDTH), +0),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0),d=d-l,f=a-(f+(p-h));return!b||h===p/2&&l===q/2||0===this.rotation?new mxPoint(d,f):(l=q/2-l,h-=p/2,p=Math.cos((360-this.rotation)*Math.PI/180),q=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(d+l-(l*p-h*q),l*q+h*p+f-h))};b.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.WIDTH), +0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};b.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),0)};b.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};b.prototype.getLocPinX= +function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};b.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};b.prototype.getOpacity=function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};b.prototype.getGradient=function(){if(function(a, +b){return a&&a.equals?a.equals(b):a===b}("1",this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(a,b){return a[b]?a[b]:null}(this.sections,"FillGradient");if(null!=a){var b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,"Row"),a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN), +"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};b.prototype.getGradientDirection=function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(b,"25")?a=mxConstants.DIRECTION_EAST:function(a,b){return a&& +a.equals?a.equals(b):a===b}(b,"27")?a=mxConstants.DIRECTION_WEST:function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};b.prototype.calcRotation=function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0")),a=180*a/Math.PI;return 360-a%360*100/100};b.prototype.propagateRotation=function(a){this.rotation+= +a;this.rotation%=360;this.rotation=100*this.rotation/100};b.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};b.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};b.prototype.getLeftSpacing=function(){return 100*(this.getTextLeftMargin()/2-2.8)/100};b.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};b.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),f=parseFloat(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE), +"0")),f=180*f/Math.PI,f=f-b;45>Math.abs(f)||270<Math.abs(f)||(a=!1);return a};b.prototype.getStyleFromShape=function(){this.styleMap[c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]="none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a; +var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=a));a=this.getOpacity(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS); +100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(function(a,b){return a[b]?a[b]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]="wrap");for(var f in a)this.styleMap[f]=a[f];this.isDashed()&& +(this.styleMap[mxConstants.STYLE_DASHED]="1",f=this.getDashPattern(),null!=f&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=f));f=this.getStrokeColor();var h=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+f+" , stroke transparency = "+h);(function(a,b){return a&&a.equals?a.equals(b):a===b})(f,"")||1===h||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=f);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]= +c.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]= +a);a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(a,b){return a&&a.equals?a.equals(b):a===b})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(a,b){return a&&a.equals?a.equals(b):a===b})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]="1");this.resolveCommonStyles();return this.styleMap};b.prototype.getDashPattern=function(){var a= +null,b=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineDashPattern(this.getQuickStyleVals()))):a=l.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){for(var b="",f=0;f<a.length;f++)b=b.concat(a[f].toFixed(2)+" ");return b.trim()}return null}; +b.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")&&!function(a,b){return a&&a.equals?a.equals(b): +a===b}(a,"1"))return!0;return!1};b.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),b=1;try{var f;f=a&&a.equals?a.equals("Themed"):"Themed"===a;if(f){var h=this.getTheme();null!=h&&(b=(this.isVertex()?h.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):h.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(C){}1> +b&&(b*=2);return b};b.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var d=4,f;f=a&&a.equals?a.equals("Themed"):"Themed"===a;if(f){var h=this.getTheme();null!=h&&(d=this.isVertex()?h.getStartSize(this.getQuickStyleVals()):h.getConnStartSize(this.getQuickStyleVals()))}else d=parseFloat(a);return b.arrowSizes_$LI$()[d]}catch(C){}return 4};b.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE), +"4");try{var d=4,f;f=a&&a.equals?a.equals("Themed"):"Themed"===a;if(f){var h=this.getTheme();null!=h&&(d=this.isVertex()?h.getEndSize(this.getQuickStyleVals()):h.getConnEndSize(this.getQuickStyleVals()))}else d=parseFloat(a);return b.arrowSizes_$LI$()[d]}catch(C){}return 4};b.prototype.isRounded=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0"),b;b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return 0<parseFloat(a)}; +b.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Themed")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")?!1:!0};b.prototype.getEdgeStyle$java_util_Map=function(a){var b={};(function(a,b){return a&&a.equals?a.equals(b):a===b})(function(a,b){return a[b]?a[b]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")? +b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};b.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};b.prototype.getMasterId=function(){return this.shape.hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};b.prototype.getShapeMasterId= +function(){return this.shape.hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};b.prototype.isGroup=function(){var a;a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};b.getType=function(a){return a.getAttribute("Type")};b.prototype.getMaster=function(){return this.master};b.prototype.getNameU=function(){var a=this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)|| +"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};b.prototype.getName=function(){var a=this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&& +(d=this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,"Organizational unit")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f,"Organizational unit")){var h= +this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0),d=null,d="0.0",f=null,f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(a,b){return a&& +a.equals?a.equals(b):a===b})(d,"Inh")&&(d="0.0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");for(var l=b.split(";"),q="",p=0;p<l.length;p++){var u=l[p],u=u.trim();(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(u,"tabHeight=")&&(q=u.split("tabHeight=").join(""))}(function(a,b){return a&&a.equals?a.equals(b):a===b})(q,"")&&(q="20");l=parseFloat(q);d=parseFloat(d);f=parseFloat(f);q=h.height;d=.1*h.width+100*d; +d=new mxPoint(d,q-q*f-l/2);a.getGeometry().offset=d}else if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,"Domain 3D")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f,"Domain 3D")){h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F"),f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0), +f=f.getAttribute("F"));h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(d,""))d="0.0";if(function(a,b){return a&&a.equals?a.equals(b):a===b}(f,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);q=h.height;d=.1*h.width+100*d;d=new mxPoint(d, +q-q*f);a.getGeometry().offset=d}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var d=b.getType(this.getShape());this.styleDebug("shape type = "+d);if(null!=this.imageData||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,d)&&null!=this.masterShape&&null!=this.masterShape.imageData){var f=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var h=function(a,b){return a[b]?a[b]:null}(f,"iType"), +l=function(a,b){return a[b]?a[b]:null}(f,"iData");a.image="data:image/"+h+","+l;return a}var q=this.parseGeom();if(function(a,b){return a&&a.equals?a.equals(b):a===b}(q,""))return this.styleDebug("No geom found"),a;var u=Graph.prototype.compress(q);a[mxConstants.STYLE_SHAPE]="stencil("+u+")"}catch(p){console.error(p.message,p)}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Off-page reference")|| +function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a;a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+this.shapeName);if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")){if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1"))return mxConstants.DIRECTION_SOUTH; +if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};b.prototype.isSubproces=function(){var a;a=(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes= +function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),f=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F",""),h=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X, +"F","");if(""===b||function(a,b){return a&&a.equals?a.equals(b):a===b}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===f||function(a,b){return a&&a.equals?a.equals(b):a===b}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===h||function(a,b){return a&&a.equals?a.equals(b):a===b}(h.toLowerCase(),"inh"))h=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT, +"F","")}return function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"width*0.5")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.toLowerCase(),"height*0.5")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(f.toLowerCase(),"width*1")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(h.toLowerCase(),"height*1")||!(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(a.toLowerCase(),"width*")&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)=== +b}(b.toLowerCase(),"height*")&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f.toLowerCase(),"width*")&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(h.toLowerCase(),"height*")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(a.toLowerCase(),"controls.row_")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(b.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isRotatedLabel=function(){var a=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE, +"V","");null!=this.masterShape&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")&&(a=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0.0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY= +function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_X), +0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getRoutingPoints=function(a,b,c){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,c):null};b.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var f=[];if(null!=this.shape){var h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.GEOM); +if(0<h.length&&(h=h.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=h)){for(var h=h.getAttribute("F"),h=h.replace(RegExp("NURBS\\(","g"),""),h=h.replace(RegExp("\\)","g"),""),h=h.replace(RegExp(",","g")," "),h=h.replace(RegExp("\\s\\s","g")," "),h=h.split(" "),l=h.length,q=[];0<l--;)q.push(0);for(l=0;l<h.length;l++)q[l]=parseFloat(h[l]);for(l=2;l+4<h.length;l+=4){var u=new mxPoint,p=q[l+3];u.x=Math.floor(Math.round(100*(b.x+ +Math.min(100,Math.abs(a.x-b.x))*q[l+2]))/100);u.y=Math.floor(Math.round(100*(b.y-100*p))/100);0<f.push(u)}return f}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,""))for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]= +d));d=this.getEdgeMarker(!0);null!=d&&(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,b.ARROW_NO_FILL_MARKER)&&(d=d.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=d);d=this.getEdgeMarker(!1);null!=d&&(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,b.ARROW_NO_FILL_MARKER)&&(d=d.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]= +d);d=Math.round(this.getStartArrowSize())|0;6!==d&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+d);d=Math.round(this.getFinalArrowSize())|0;6!==d&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+d);d=Math.round(this.getLineWidth())|0;1!==d&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+d);d=this.getStrokeColor();(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=c.mxgraph.io.vsdx.mxVsdxConstants.TRUE); +this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,d=this.getFillColor(),function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=d));d=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+d;d=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+d;d=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+ +d;d=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+d;d=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=d;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};b.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND)),b;b=a&&a.equals?a.equals(""):""===a;b||(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]= +this.isRounded()?c.mxgraph.io.vsdx.mxVsdxConstants.TRUE:c.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};b.prototype.getEdgeMarker=function(a){var d=this.getValue(this.getCellElement$java_lang_String(a?c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),f=0;try{if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Themed")){var h=this.getTheme();null!=h&&(f=this.isVertex()?h.getEdgeMarker(a,this.getQuickStyleVals()):h.getConnEdgeMarker(a, +this.getQuickStyleVals()))}else f=parseInt(d)}catch(C){}a=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(b.arrowTypes_$LI$(),f);0<f&&null==a&&(a=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(b.arrowTypes_$LI$(), +1));return a};b.prototype.getCellElement$java_lang_String=function(a){var b=f.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,c){var d=f.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,a,b,c);return null==d&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a, +b,c):d};b.prototype.getCellElement=function(a,b,c){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof c&&null!==c){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,c)};b.prototype.createLabelSubShape=function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH), +this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),h=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),f/2),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X), +h),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),l),u=this.getValueAsDouble(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),W=this.getTextLabel();if(null!=W&&0!==W.length){var P=mxUtils.clone(this.getStyleMap())||{};P[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;P[mxConstants.STYLE_STROKECOLOR]=mxConstants.NONE;P[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;P.hasOwnProperty("align")||(P.align="center"); +P.hasOwnProperty("verticalAlign")||(P.verticalAlign="middle");P.hasOwnProperty("whiteSpace")||(P.whiteSpace="wrap");delete P.shape;delete P.image;var E=this.getRotation();0!==u&&(u=360-180*u/Math.PI,u=Math.round((u+E)%360*100)/100,0!==u&&(P.rotation=""+u));P="text;"+c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(P,"=");l=b.getGeometry().height-(p+f-l);h=q-h;0<E&&(q=new mxGeometry(h,l,d,f),h=b.getGeometry(),c.mxgraph.online.Utils.rotatedGeometry(q,E,h.width/2,h.height/2),h=q.x,l=q.y);return a.insertVertex(b, +null,W,Math.round(100*h)/100,Math.round(100*l)/100,Math.round(100*d)/100,Math.round(100*f)/100,P+";html=1;")}return null};b.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);var d=a.getPoint(d),f=b[0],h=b[b.length-1],l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT), +this.getHeight()),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),u=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),W=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),0),P=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y), +0),h=(this.getHeight()-(f.y-h.y))/2+f.y-d.y-(P-u+q/2),d=W-p+l/2+(f.x-d.x);return 1E11<Math.abs(d)?null:new mxPoint(Math.floor(Math.round(100*d)/100),Math.floor(Math.round(100*h)/100))}return null};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(c.mxgraph.io.vsdx.Shape);h.__static_initialized=!1;h.ARROW_NO_FILL_MARKER="0";h.maxDp=2;h.USE_SHAPE_MATCH=!1;h.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>'; +l.VsdxShape=h;h.__class="com.mxgraph.io.vsdx.VsdxShape"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){var l=function(){function h(){}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0())};h.CA_$LI$=function(){h.__static_initialize();null==h.CA&&(h.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return h.CA};h.IA_$LI$=function(){h.__static_initialize();if(null==h.IA){for(var c=256,b=[];0<c--;)b.push(0);h.IA=b}return h.IA};h.__static_initializer_0=function(){for(var c=h.IA_$LI$(), +b=0;b<c.length;b++)c[b]=-1;c=0;for(b=h.CA_$LI$().length;c<b;c++)h.IA_$LI$()[h.CA_$LI$()[c].charCodeAt(0)]=c;h.IA_$LI$()[61]=0};h.encodeToChar=function(c,b,a){var d=null!=c?c.length-b:0;if(0===d)return[];for(var f=3*(d/3|0),l=((d-1)/3|0)+1<<2,l=l+(a?((l-1)/76|0)<<1:0),q=Array(l),u=b,y=0,p=0;u<f+b;){var z=(c[u++]&255)<<16|(c[u++]&255)<<8|c[u++]&255;q[y++]=h.CA_$LI$()[z>>>18&63];q[y++]=h.CA_$LI$()[z>>>12&63];q[y++]=h.CA_$LI$()[z>>>6&63];q[y++]=h.CA_$LI$()[z&63];a&&19===++p&&y<l-2&&(q[y++]="\r",q[y++]= +"\n",p=0)}a=d-f;0<a&&(z=(c[f+b]&255)<<10|(2===a?(c[d+b-1]&255)<<2:0),q[l-4]=h.CA_$LI$()[z>>12],q[l-3]=h.CA_$LI$()[z>>>6&63],q[l-2]=2===a?h.CA_$LI$()[z&63]:"=",q[l-1]="=");return q};h.decode$char_A=function(c){var b=null!=c?c.length:0;if(0===b)return[];for(var a=0,d=0;d<b;d++)0>h.IA_$LI$()[c[d].charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=h.IA_$LI$()[c[--d].charCodeAt(0)];)61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d])&&f++;for(var b=(6*(b-a)>>3)-f,a=function(a){for(var b= +[];0<a--;)b.push(0);return b}(b),l=f=0;l<b;){for(var q=d=0;4>q;q++){var u=h.IA_$LI$()[c[f++].charCodeAt(0)];0<=u?d|=u<<18-6*q:q--}a[l++]=d>>16|0;l<b&&(a[l++]=d>>8|0,l<b&&(a[l++]=d|0))}return a};h.decode=function(f){if(null!=f&&f instanceof Array&&(0==f.length||null==f[0]||"string"===typeof f[0])||null===f)return c.mxgraph.online.mxBase64.decode$char_A(f);if(null!=f&&f instanceof Array&&(0==f.length||null==f[0]||"number"===typeof f[0])||null===f)return c.mxgraph.online.mxBase64.decode$byte_A(f);if("string"=== +typeof f||null===f)return c.mxgraph.online.mxBase64.decode$java_lang_String(f);throw Error("invalid overload");};h.decodeFast$char_A=function(c){var b=c.length;if(0===b)return[];for(var a=0,d=b-1;a<d&&0>h.IA_$LI$()[c[a].charCodeAt(0)];)a++;for(;0<d&&0>h.IA_$LI$()[c[d].charCodeAt(0)];)d--;for(var f=61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d])?61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d-1])?2:1:0,l=d-a+1,q=76<b?(13==function(a){return null==a.charCodeAt?a: +a.charCodeAt(0)}(c[76])?l/78|0:0)<<1:0,l=(6*(l-q)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(l),u=0,y=0,p=3*(l/3|0);u<p;){var z=h.IA_$LI$()[c[a++].charCodeAt(0)]<<18|h.IA_$LI$()[c[a++].charCodeAt(0)]<<12|h.IA_$LI$()[c[a++].charCodeAt(0)]<<6|h.IA_$LI$()[c[a++].charCodeAt(0)];b[u++]=z>>16|0;b[u++]=z>>8|0;b[u++]=z|0;0<q&&19===++y&&(a+=2,y=0)}if(u<l){for(q=z=0;a<=d-f;q++)z|=h.IA_$LI$()[c[a++].charCodeAt(0)]<<18-6*q;for(c=16;u<l;c-=8)b[u++]=z>>c|0}return b};h.decodeFast=function(f){if(null!= +f&&f instanceof Array&&(0==f.length||null==f[0]||"string"===typeof f[0])||null===f)return c.mxgraph.online.mxBase64.decodeFast$char_A(f);if(null!=f&&f instanceof Array&&(0==f.length||null==f[0]||"number"===typeof f[0])||null===f)return c.mxgraph.online.mxBase64.decodeFast$byte_A(f);if("string"===typeof f||null===f)return c.mxgraph.online.mxBase64.decodeFast$java_lang_String(f);throw Error("invalid overload");};h.encodeToByte=function(c,b){var a=null!=c?c.length:0;if(0===a)return[];for(var d=3*(a/ +3|0),f=((a-1)/3|0)+1<<2,l=f+=b?((f-1)/76|0)<<1:0,q=[];0<l--;)q.push(0);for(var u=0,y=0,p=0;u<d;)l=(c[u++]&255)<<16|(c[u++]&255)<<8|c[u++]&255,q[y++]=h.CA_$LI$()[l>>>18&63].charCodeAt(0),q[y++]=h.CA_$LI$()[l>>>12&63].charCodeAt(0),q[y++]=h.CA_$LI$()[l>>>6&63].charCodeAt(0),q[y++]=h.CA_$LI$()[l&63].charCodeAt(0),b&&19===++p&&y<f-2&&(q[y++]=13,q[y++]=10,p=0);u=a-d;0<u&&(l=(c[d]&255)<<10|(2===u?(c[a-1]&255)<<2:0),q[f-4]=h.CA_$LI$()[l>>12].charCodeAt(0),q[f-3]=h.CA_$LI$()[l>>>6&63].charCodeAt(0),q[f-2]= +2===u?h.CA_$LI$()[l&63].charCodeAt(0):61,q[f-1]=61);return q};h.decode$byte_A=function(c){for(var b=c.length,a=0,d=0;d<b;d++)0>h.IA_$LI$()[c[d]&255]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=h.IA_$LI$()[c[--d]&255];)61==c[d]&&f++;d=b=(6*(b-a)>>3)-f;for(a=[];0<d--;)a.push(0);for(var l=f=0;l<b;){for(var q=d=0;4>q;q++){var u=h.IA_$LI$()[c[f++]&255];0<=u?d|=u<<18-6*q:q--}a[l++]=d>>16|0;l<b&&(a[l++]=d>>8|0,l<b&&(a[l++]=d|0))}return a};h.decodeFast$byte_A=function(c){var b=c.length;if(0=== +b)return[];for(var a=0,d=b-1;a<d&&0>h.IA_$LI$()[c[a]&255];)a++;for(;0<d&&0>h.IA_$LI$()[c[d]&255];)d--;for(var f=61==c[d]?61==c[d-1]?2:1:0,l=d-a+1,q=76<b?(13==c[76]?l/78|0:0)<<1:0,u=l=(6*(l-q)>>3)-f,b=[];0<u--;)b.push(0);for(var y=u=0,p=3*(l/3|0);u<p;){var z=h.IA_$LI$()[c[a++]]<<18|h.IA_$LI$()[c[a++]]<<12|h.IA_$LI$()[c[a++]]<<6|h.IA_$LI$()[c[a++]];b[u++]=z>>16|0;b[u++]=z>>8|0;b[u++]=z|0;0<q&&19===++y&&(a+=2,y=0)}if(u<l){for(q=z=0;a<=d-f;q++)z|=h.IA_$LI$()[c[a++]]<<18-6*q;for(c=16;u<l;c-=8)b[u++]=z>> +c|0}return b};h.encodeToString=function(c,b,a){return h.encodeToChar(c,b,a).join("")};h.decode$java_lang_String=function(c){var b=null!=c?c.length:0;if(0===b)return[];for(var a=0,d=0;d<b;d++)0>h.IA_$LI$()[c.charAt(d).charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=h.IA_$LI$()[c.charAt(--d).charCodeAt(0)];)61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))&&f++;for(var b=(6*(b-a)>>3)-f,a=function(a){for(var b=[];0<a--;)b.push(0);return b}(b),l=f=0;l<b;){for(var q= +d=0;4>q;q++){var u=h.IA_$LI$()[c.charAt(f++).charCodeAt(0)];0<=u?d|=u<<18-6*q:q--}a[l++]=d>>16|0;l<b&&(a[l++]=d>>8|0,l<b&&(a[l++]=d|0))}return a};h.decodeFast$java_lang_String=function(c){var b=c.length;if(0===b)return[];for(var a=0,d=b-1;a<d&&0>h.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(a))&255];)a++;for(;0<d&&0>h.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))&255];)d--;for(var f=61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))? +61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d-1))?2:1:0,l=d-a+1,q=76<b?(13==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(76))?l/78|0:0)<<1:0,l=(6*(l-q)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(l),u=0,y=0,p=3*(l/3|0);u<p;){var z=h.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18|h.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<12|h.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<6|h.IA_$LI$()[c.charAt(a++).charCodeAt(0)];b[u++]=z>>16|0;b[u++]=z>>8|0;b[u++]= +z|0;0<q&&19===++y&&(a+=2,y=0)}if(u<l){for(q=z=0;a<=d-f;q++)z|=h.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18-6*q;for(c=16;u<l;c-=8)b[u++]=z>>c|0}return b};return h}();l.__static_initialized=!1;q.mxBase64=l;l.__class="com.mxgraph.online.mxBase64"})(u.online||(u.online={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$(); +com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowSizes_$LI$();com.mxgraph.io.vsdx.VsdxShape.OFFSET_ARRAY_$LI$();com.mxgraph.io.vsdx.VsdxShape.__static_initialize();com.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$();com.mxgraph.io.vsdx.Style.lineDashPatterns_$LI$();com.mxgraph.io.vsdx.Style.styleTypes_$LI$();com.mxgraph.io.vsdx.Style.__static_initialize();com.mxgraph.online.Constants.MAX_AREA_$LI$();com.mxgraph.io.vsdx.theme.Color.NONE_$LI$();com.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(); +com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$(); +EditorUi.prototype.doImportVisio=function(c,u,q){null!=c.name&&/(\.vssx)($|\?)/i.test(c.name)?(new com.mxgraph.io.mxVssxCodec).decodeVssx(c,u):(new com.mxgraph.io.mxVsdxCodec).decodeVsdx(c,u,null,q)};/*! JSZip v3.1.3 - A Javascript class for generating and reading zip files <http://stuartk.com/jszip> diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js index 3ae689881eca0b5d03a3f219edbd171c37468f06..6b800ddede875a25a3a2903bbea0bd56c73c077d 100644 --- a/src/main/webapp/js/diagramly/App.js +++ b/src/main/webapp/js/diagramly/App.js @@ -445,9 +445,11 @@ App.main = function(callback, createUi) /** * Injects offline dependencies */ - if (urlParams['offline'] == '1') + if (urlParams['offline'] == '1' || urlParams['appcache'] == '1') { mxscript('js/shapes.min.js'); + mxscript('js/stencils.min.js'); + mxscript('js/extensions.min.js'); var frame = document.createElement('iframe'); frame.setAttribute('width', '0'); @@ -2992,7 +2994,14 @@ EditorUi.prototype.loadTemplate = function(url, onload, onerror) this.loadUrl(realUrl, mxUtils.bind(this, function(data) { - if (!this.isOffline() && new XMLHttpRequest().upload && this.isRemoteFileFormat(data, url)) + if (/(\.vsdx)($|\?)/i.test(url)) + { + this.importVisio(this.base64ToBlob(data.substring(data.indexOf(',') + 1)), function(xml) + { + onload(xml); + }); + } + else if (!this.isOffline() && new XMLHttpRequest().upload && this.isRemoteFileFormat(data, url)) { // Asynchronous parsing via server this.parseFile(new Blob([data], {type: 'application/octet-stream'}), mxUtils.bind(this, function(xhr) @@ -3013,7 +3022,7 @@ EditorUi.prototype.loadTemplate = function(url, onload, onerror) onload(data); } - }), onerror, /(\.png)($|\?)/i.test(url)); + }), onerror, /(\.png)($|\?)/i.test(url) || /(\.vsdx)($|\?)/i.test(url)); }; /** @@ -4264,21 +4273,11 @@ App.prototype.convertFile = function(url, filename, mimeType, extension, success { blob = new Blob([req.response], {type: 'application/octet-stream'}); } - - this.parseFile(blob, mxUtils.bind(this, function(xhr) + + this.importVisio(blob, mxUtils.bind(this, function(xml) { - if (xhr.readyState == 4) - { - if (xhr.status >= 200 && xhr.status <= 299) - { - success(new LocalFile(this, xhr.responseText, name, true)); - } - else if (error != null) - { - error({message: mxResources.get('errorLoadingFile')}); - } - } - }), filename); + success(new LocalFile(this, xml, name, true)); + }), error) }); req.send(); diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js index 6569a780aa88c1aa238f85afe3107ff5a3641595..28ad669424b2b7160f40ae0c5b6dad98b7bb7f20 100644 --- a/src/main/webapp/js/diagramly/Devel.js +++ b/src/main/webapp/js/diagramly/Devel.js @@ -106,9 +106,11 @@ mxscript(drawDevUrl + 'js/diagramly/Pages.js'); mxscript(drawDevUrl + 'js/diagramly/Trees.js'); mxscript(drawDevUrl + 'js/diagramly/DevTools.js'); -// Vsdx Export +// Vsdx/vssx support mxscript(drawDevUrl + 'js/diagramly/vsdx/VsdxExport.js'); mxscript(drawDevUrl + 'js/diagramly/vsdx/mxVsdxCanvas2D.js'); +mxscript(drawDevUrl + 'js/diagramly/vsdx/bmpDecoder.js'); +mxscript(drawDevUrl + 'js/diagramly/vsdx/importer.js'); mxscript(drawDevUrl + 'js/jszip/jszip.min.js'); // mxRuler @@ -120,10 +122,5 @@ if (urlParams['distanceGuides'] == '1') mxscript(drawDevUrl + 'js/diagramly/DistanceGuides.js'); } -//Vsdx Import -//mxscript(drawDevUrl + 'js/jszip/jszip.min.js'); -mxscript(drawDevUrl + 'js/vsdx/bmpDecoder.js'); -mxscript(drawDevUrl + 'js/vsdx/importer.js'); - //GraphMl Import mxscript(drawDevUrl + 'js/diagramly/graphml/mxGraphMlCodec.js'); \ No newline at end of file diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js index 11bb13730d30f29f19889b0007639057b77f6dd5..1b6dadf58b23653d7618b83947fdd109df4e002c 100644 --- a/src/main/webapp/js/diagramly/Dialogs.js +++ b/src/main/webapp/js/diagramly/Dialogs.js @@ -7853,7 +7853,16 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode) { return function(data, mimeType, x, y, w, h, img, doneFn, file) { - if (file != null && !editorUi.isOffline() && new XMLHttpRequest().upload && editorUi.isRemoteFileFormat(data, file.name)) + if (file != null && (/(\.vsdx)($|\?)/i.test(file.name) || /(\.vssx)($|\?)/i.test(file.name))) + { + editorUi.importVisio(file, mxUtils.bind(this, function(xml) + { + editorUi.spinner.stop(); + addButton(xml, mimeType, x, y, w, h, img, 'fixed', (mxEvent.isAltDown(evt)) ? + null : img.substring(0, img.lastIndexOf('.')).replace(/_/g, ' ')); + })); + } + else if (file != null && !editorUi.isOffline() && new XMLHttpRequest().upload && editorUi.isRemoteFileFormat(data, file.name)) { editorUi.parseFile(file, mxUtils.bind(this, function(xhr) { @@ -7861,13 +7870,13 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode) { editorUi.spinner.stop(); - if (xhr.status >= 200 && xhr.status <= 299) + if (xhr.status >= 200 && xhr.status <= 299) { var xml = xhr.responseText; - addButton(xml, mimeType, x, y, w, h, img, 'fixed', (mxEvent.isAltDown(evt)) ? - null : img.substring(0, img.lastIndexOf('.')).replace(/_/g, ' ')); - div.scrollTop = div.scrollHeight; + addButton(xml, mimeType, x, y, w, h, img, 'fixed', (mxEvent.isAltDown(evt)) ? + null : img.substring(0, img.lastIndexOf('.')).replace(/_/g, ' ')); + div.scrollTop = div.scrollHeight; } } })); @@ -7982,15 +7991,15 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode) { mxEvent.addListener(fileInput, 'change', function(evt) { - errorShowed = false; - - editorUi.importFiles(fileInput.files, 0, 0, editorUi.maxImageSize, function(data, mimeType, x, y, w, h, img, doneFn, file) - { - createImportHandler(evt)(data, mimeType, x, y, w, h, img, doneFn, file); - - // Resets input to force change event for same file - fileInput.value = ''; - }); + errorShowed = false; + + editorUi.importFiles(fileInput.files, 0, 0, editorUi.maxImageSize, function(data, mimeType, x, y, w, h, img, doneFn, file) + { + createImportHandler(evt)(data, mimeType, x, y, w, h, img, doneFn, file); + + // Resets input to force change event for same file + fileInput.value = ''; + }); div.scrollTop = div.scrollHeight; }); @@ -8021,7 +8030,7 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode) editorUi.showImageDialog(mxResources.get('addImageUrl'), '', function(url, w, h) { - errorShowed = false; + errorShowed = false; if (url != null) { diff --git a/src/main/webapp/js/diagramly/DropboxClient.js b/src/main/webapp/js/diagramly/DropboxClient.js index 5526a21aa3e0d35bb1f1690aa18fb7ac478d0609..607aa18e45ee05ded5621c11b2a4a3059a29610c 100644 --- a/src/main/webapp/js/diagramly/DropboxClient.js +++ b/src/main/webapp/js/diagramly/DropboxClient.js @@ -216,39 +216,39 @@ DropboxClient.prototype.executePromise = function(promise, success, error) // Workaround for IE8/9 support with catch function promise['catch'](mxUtils.bind(this, function(err) { - window.clearTimeout(timeoutThread); - - if (acceptResponse) - { - if (err != null && (err.status == 500 || err.status == 400 || - err.status == 401)) + window.clearTimeout(timeoutThread); + + if (acceptResponse) { - this.setUser(null); - this.client.setAccessToken(null); - - if (!failOnAuth) - { - this.authenticate(function() - { - doExecute(true); - }, error); - } - else - { - error({message: mxResources.get('accessDenied'), retry: mxUtils.bind(this, function() + if (err != null && (err.status == 500 || err.status == 400 || + err.status == 401)) + { + this.setUser(null); + this.client.setAccessToken(null); + + if (!failOnAuth) { this.authenticate(function() { - fn(true); + doExecute(true); }, error); - })}); - } + } + else + { + error({message: mxResources.get('accessDenied'), retry: mxUtils.bind(this, function() + { + this.authenticate(function() + { + fn(true); + }, error); + })}); + } + } + else + { + error({message: mxResources.get('error') + ' ' + err.status}); + } } - else - { - error({message: mxResources.get('error') + ' ' + err.status}); - } - } })); }); @@ -299,17 +299,21 @@ DropboxClient.prototype.getFile = function(path, success, error, asLibrary) if (/^https:\/\//i.test(path) || /\.vsdx$/i.test(path) || /\.gliffy$/i.test(path) || (!this.ui.useCanvasForExport && binary)) { - // Should never be null - if (this.token != null) + var fn = mxUtils.bind(this, function() { var tokens = path.split('/'); var name = (tokens.length > 0) ? tokens[tokens.length - 1] : path; this.ui.convertFile(path, name, null, this.extension, success, error); + }); + + if (this.token != null) + { + fn(); } else { - error({message: mxResources.get('accessDenied')}); + this.authenticate(fn, error); } } else diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js index 2096273437be75e0587252bce8578107f6a2ae44..7a9726fdd54cb5d5bb05d5adfb4a8cf566254a45 100644 --- a/src/main/webapp/js/diagramly/EditorUi.js +++ b/src/main/webapp/js/diagramly/EditorUi.js @@ -61,6 +61,11 @@ */ EditorUi.prototype.defaultCustomShapeStyle = 'shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;'; + /** + * Broken image symbol for offline SVG. + */ + EditorUi.prototype.svgBrokenImage = Graph.createSvgImage(10, 10, '<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');svrc = + /** * Defines the maximum size for images. */ @@ -2137,7 +2142,14 @@ } }); - if (!this.isOffline() && new XMLHttpRequest().upload && this.isRemoteFileFormat(data, img) && file != null) + if (file != null && img != null && ((/(\.vsdx)($|\?)/i.test(img)) || /(\.vssx)($|\?)/i.test(img))) + { + this.importVisio(file, function(xml) + { + doImport(xml, 'text/xml'); + }); + } + else if (!this.isOffline() && new XMLHttpRequest().upload && this.isRemoteFileFormat(data, img) && file != null) { this.parseFile(file, mxUtils.bind(this, function(xhr) { @@ -5016,13 +5028,19 @@ // Extends convert to avoid CORS using an image proxy server // LATER: Use img.crossOrigin="anonymous" to avoid proxy var convert = converter.convert; + var self = this; converter.convert = function(src) { if (src != null) { - if ((src.substring(0, 7) == 'http://' || src.substring(0, 8) == 'https://') && - src.substring(0, converter.baseUrl.length) != converter.baseUrl) + var remote = src.substring(0, 7) == 'http://' || src.substring(0, 8) == 'https://'; + + if (remote && !navigator.onLine) + { + src = self.svgBrokenImage.src; + } + else if (remote && src.substring(0, converter.baseUrl.length) != converter.baseUrl) { src = PROXY_URL + '?url=' + encodeURIComponent(src); } @@ -5078,7 +5096,7 @@ (mxUtils.bind(this, function(img) { var src = converter.convert(img.getAttribute(srcAttr)); - + // Data URIs are pass-through if (src != null && src.substring(0, 5) != 'data:') { @@ -5104,6 +5122,10 @@ img.setAttribute(srcAttr, tmp); } } + else if (src != null) + { + img.setAttribute(srcAttr, src); + } }))(images[i]); } }); @@ -5142,28 +5164,28 @@ var data = req.getText(); // Returns PNG as base64 encoded data URI - if (binary) + if (binary) + { + // NOTE: This requires BinaryToArray VB script in the page + if ((document.documentMode == 9 || document.documentMode == 10) && + typeof window.mxUtilsBinaryToArray !== 'undefined') { - // NOTE: This requires BinaryToArray VB script in the page - if ((document.documentMode == 9 || document.documentMode == 10) && - typeof window.mxUtilsBinaryToArray !== 'undefined') + var bin = mxUtilsBinaryToArray(req.request.responseBody).toArray(); + var tmp = new Array(bin.length); + + for (var i = 0; i < bin.length; i++) { - var bin = mxUtilsBinaryToArray(req.request.responseBody).toArray(); - var tmp = new Array(bin.length); - - for (var i = 0; i < bin.length; i++) - { - tmp[i] = String.fromCharCode(bin[i]); - } - - data = tmp.join(''); + tmp[i] = String.fromCharCode(bin[i]); } - // LATER: Could be JPG but modern browsers - // ignore the mime type in the data URI - dataUriPrefix = (dataUriPrefix != null) ? dataUriPrefix : 'data:image/png;base64,'; - data = dataUriPrefix + this.base64Encode(data); + data = tmp.join(''); } + + // LATER: Could be JPG but modern browsers + // ignore the mime type in the data URI + dataUriPrefix = (dataUriPrefix != null) ? dataUriPrefix : 'data:image/png;base64,'; + data = dataUriPrefix + this.base64Encode(data); + } success(data); } @@ -5209,9 +5231,10 @@ } return (this.corsRegExp != null && this.corsRegExp.test(url)) || - url.substring(0, 34) === 'https?://raw.githubusercontent.com/' || - /^https?:\/\/.*\.github\.io\//.test(url) || - /^https?:\/\/(.*\.)?rawgit\.com\//.test(url); + url.substring(0, 34) === 'https://raw.githubusercontent.com/' || + url.substring(0, 23) === 'https://cdn.rawgit.com/' || + url.substring(0, 19) === 'https://rawgit.com/' || + /^https?:\/\/[^\/]*\.github\.io\//.test(url); }; /** @@ -5230,12 +5253,13 @@ }), function() { - callback(); + callback(this.svgBrokenImage.src); }); } else { var img = new Image(); + var self = this; img.onload = function() { @@ -5244,12 +5268,20 @@ canvas.height = img.height; canvas.width = img.width; ctx.drawImage(img, 0, 0); - callback(canvas.toDataURL()); + + try + { + callback(canvas.toDataURL()); + } + catch (e) + { + callback(self.svgBrokenImage.src); + } }; img.onerror = function() { - callback(); + callback(self.svgBrokenImage.src); }; img.src = url; @@ -5334,6 +5366,77 @@ return cells; }; + /** + * Imports the given Visio file + */ + EditorUi.prototype.importVisio = function(file, done, onerror) + { + onerror = (onerror != null) ? onerror : mxUtils.bind(this, function(e) + { + this.handleError(e); + }); + + var delayed = mxUtils.bind(this, function() + { + this.loadingExtensions = false; + + if (this.doImportVisio) + { + try + { + this.doImportVisio(file, done, onerror); + } + catch (e) + { + onerror(e); + } + } + }); + + if (!this.doImportVisio && !this.loadingExtensions && !this.isOffline()) + { + this.loadingExtensions = true; + mxscript('js/extensions.min.js', delayed); + } + else + { + delayed(); + } + }; + + /** + * Export the diagram to VSDX + */ + EditorUi.prototype.exportVisio = function() + { + var delayed = mxUtils.bind(this, function() + { + this.loadingExtensions = false; + + if (typeof VsdxExport !== 'undefined') + { + try + { + new VsdxExport(this).exportCurrentDiagrams(); + } + catch (e) + { + this.handleError(e); + } + } + }); + + if (typeof VsdxExport !== 'undefined' && !this.loadingExtensions && !this.isOffline()) + { + this.loadingExtensions = true; + mxscript('js/extensions.min.js', delayed); + } + else + { + delayed(); + } + }; + /** * Imports the given Lucidchart data. */ @@ -5341,6 +5444,8 @@ { var delayed = mxUtils.bind(this, function() { + this.loadingExtensions = false; + // Checks for signature method if (this.pasteLucidChart) { @@ -5529,11 +5634,11 @@ if (text.substring(0, 5) == 'data:') { this.resizeImage(img, text, mxUtils.bind(this, function(data2, w2, h2) - { - graph.setSelectionCell(graph.insertVertex(null, null, '', graph.snap(dx), graph.snap(dy), - w2, h2, 'shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;' + - 'verticalAlign=top;aspect=fixed;imageAspect=0;image=' + this.convertDataUri(data2) + ';')); - }), resizeImages, this.maxImageSize); + { + graph.setSelectionCell(graph.insertVertex(null, null, '', graph.snap(dx), graph.snap(dy), + w2, h2, 'shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;' + + 'verticalAlign=top;aspect=fixed;imageAspect=0;image=' + this.convertDataUri(data2) + ';')); + }), resizeImages, this.maxImageSize); } else { @@ -5550,18 +5655,18 @@ var cell = null; // Inserts invalid data URIs as text - graph.getModel().beginUpdate(); - try - { + graph.getModel().beginUpdate(); + try + { cell = graph.insertVertex(graph.getDefaultParent(), null, text, graph.snap(dx), graph.snap(dy), 1, 1, 'text;' + ((html) ? 'html=1;' : '')); graph.updateCellSize(cell); graph.fireEvent(new mxEventObject('textInserted', 'cells', [cell])); - } - finally - { - graph.getModel().endUpdate(); - } + } + finally + { + graph.getModel().endUpdate(); + } graph.setSelectionCell(cell); })); @@ -5633,9 +5738,10 @@ { var units = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB']; var i = -1; + do { - size = size / 1024; + size = size / 1024; i++; } while (size > 1024); @@ -5667,9 +5773,7 @@ */ EditorUi.prototype.isRemoteFileFormat = function(data, filename) { - return /(\"contentType\":\s*\"application\/gliffy\+json\")/.test(data) || - (filename != null && /(\.vsdx)($|\?)/i.test(filename)) || - (filename != null && /(\.vssx)($|\?)/i.test(filename)); + return /(\"contentType\":\s*\"application\/gliffy\+json\")/.test(data); }; /** @@ -5681,6 +5785,25 @@ var async = false; var cells = null; + var handleResult = mxUtils.bind(this, function(xml) + { + var importedCells = null; + + if (xml != null && xml.substring(0, 10) == '<mxlibrary') + { + this.loadLibrary(new LocalLibrary(this, xml, filename)); + } + else + { + importedCells = this.importXml(xml, dx, dy, crop); + } + + if (done != null) + { + done(importedCells); + } + }); + if (mimeType.substring(0, 5) == 'image') { var containsModel = false; @@ -5731,6 +5854,13 @@ } })); } + else if (file != null && filename != null && ((/(\.vsdx)($|\?)/i.test(filename)) || /(\.vssx)($|\?)/i.test(filename))) + { + // LATER: done and async are a hack before making this asynchronous + async = true; + + this.importVisio(file, handleResult); + } else if (!this.isOffline() && new XMLHttpRequest().upload && this.isRemoteFileFormat(data, filename)) { // LATER: done and async are a hack before making this asynchronous @@ -5741,30 +5871,13 @@ { if (xhr.readyState == 4) { - var importedCells = null; - if (xhr.status >= 200 && xhr.status <= 299) { - var xml = xhr.responseText; - - if (xml != null && xml.substring(0, 10) == '<mxlibrary') - { - if (filename != null && filename.toLowerCase().substring(filename.length - 5) == '.vssx') - { - filename = filename.substring(0, filename.length - 5) + '.xml'; - } - - this.loadLibrary(new LocalLibrary(this, xml, filename)); - } - else - { - importedCells = this.importXml(xml, dx, dy, crop); - } + handleResult(xhr.responseText); } - - if (done != null) + else if (done != null) { - done(importedCells); + done(null); } } }), filename); @@ -5906,15 +6019,15 @@ graph.getModel().beginUpdate(); try { - for (var j = 0; j < queue.length; j++) - { - var tmp = queue[j](); - - if (tmp != null) - { - cells = cells.concat(tmp); - } - } + for (var j = 0; j < queue.length; j++) + { + var tmp = queue[j](); + + if (tmp != null) + { + cells = cells.concat(tmp); + } + } } finally { @@ -5937,257 +6050,226 @@ { if (filterFn == null || filterFn(file)) { - if (file.type.substring(0, 6) == 'image/') - { - if (file.type.substring(0, 9) == 'image/svg') - { - // Checks if SVG contains content attribute - var data = e.target.result; - var comma = data.indexOf(','); - var svgText = decodeURIComponent(escape(atob(data.substring(comma + 1)))); - var root = mxUtils.parseXml(svgText); - var svgs = root.getElementsByTagName('svg'); - - if (svgs.length > 0) - { - var svgRoot = svgs[0]; - var cont = (ignoreEmbeddedXml) ? null : svgRoot.getAttribute('content'); - - if (cont != null && cont.charAt(0) != '<' && cont.charAt(0) != '%') - { - cont = unescape((window.atob) ? atob(cont) : Base64.decode(cont, true)); - } - - if (cont != null && cont.charAt(0) == '%') - { - cont = decodeURIComponent(cont); - } - - if (cont != null && (cont.substring(0, 8) === '<mxfile ' || - cont.substring(0, 14) === '<mxGraphModel ')) - { - barrier(index, mxUtils.bind(this, function() - { - return fn(cont, 'text/xml', x + index * gs, y + index * gs, 0, 0, file.name); - })); - } - else - { - // SVG needs special handling to add viewbox if missing and - // find initial size from SVG attributes (only for IE11) - barrier(index, mxUtils.bind(this, function() - { - try - { - var prefix = data.substring(0, comma + 1); - - // Parses SVG and find width and height - if (root != null) - { - var svgs = root.getElementsByTagName('svg'); - - if (svgs.length > 0) - { - var svgRoot = svgs[0]; - var w = parseFloat(svgRoot.getAttribute('width')); - var h = parseFloat(svgRoot.getAttribute('height')); - - // Check if viewBox attribute already exists - var vb = svgRoot.getAttribute('viewBox'); - - if (vb == null || vb.length == 0) - { - svgRoot.setAttribute('viewBox', '0 0 ' + w + ' ' + h); - } - // Uses width and height from viewbox for - // missing width and height attributes - else if (isNaN(w) || isNaN(h)) - { - var tokens = vb.split(' '); - - if (tokens.length > 3) - { - w = parseFloat(tokens[2]); - h = parseFloat(tokens[3]); - } - } - - data = this.createSvgDataUri(mxUtils.getXml(svgRoot)); - var s = Math.min(1, Math.min(maxSize / Math.max(1, w)), maxSize / Math.max(1, h)); - - var cells = fn(data, file.type, x + index * gs, y + index * gs, - Math.max(1, Math.round(w * s)), Math.max(1, Math.round(h * s)), file.name); - - // Hack to fix width and height asynchronously - if (isNaN(w) || isNaN(h)) - { - var img = new Image(); - - img.onload = mxUtils.bind(this, function() - { - w = Math.max(1, img.width); - h = Math.max(1, img.height); - - cells[0].geometry.width = w; - cells[0].geometry.height = h; - - svgRoot.setAttribute('viewBox', '0 0 ' + w + ' ' + h); - data = this.createSvgDataUri(mxUtils.getXml(svgRoot)); - - var semi = data.indexOf(';'); - - if (semi > 0) - { - data = data.substring(0, semi) + data.substring(data.indexOf(',', semi + 1)); - } - - graph.setCellStyles('image', data, [cells[0]]); - }); - - img.src = this.createSvgDataUri(mxUtils.getXml(svgRoot)); - } - - return cells; - } - } - } - catch (e) - { - // ignores any SVG parsing errors - } - - return null; - })); - } - } - } - else - { - // Checks if PNG+XML is available to bypass code below - var containsModel = false; - - if (file.type == 'image/png') - { - var xml = (ignoreEmbeddedXml) ? null : this.extractGraphModelFromPng(e.target.result); - - if (xml != null && xml.length > 0) - { - var img = new Image(); - img.src = e.target.result; - - barrier(index, mxUtils.bind(this, function() - { - return fn(xml, 'text/xml', x + index * gs, y + index * gs, - img.width, img.height, file.name); - })); - - containsModel = true; - } - } - - // Additional asynchronous step for finding image size - if (!containsModel) - { - // Cannot load local files in Chrome App - if (mxClient.IS_CHROMEAPP) - { - this.spinner.stop(); - this.showError(mxResources.get('error'), mxResources.get('dragAndDropNotSupported'), - mxResources.get('cancel'), mxUtils.bind(this, function() - { - // Hides the dialog - }), null, mxResources.get('ok'), mxUtils.bind(this, function() - { - // Redirects to import function - this.actions.get('import').funct(); - }) - ); - } - else + if (file.type.substring(0, 6) == 'image/') + { + if (file.type.substring(0, 9) == 'image/svg') + { + // Checks if SVG contains content attribute + var data = e.target.result; + var comma = data.indexOf(','); + var svgText = decodeURIComponent(escape(atob(data.substring(comma + 1)))); + var root = mxUtils.parseXml(svgText); + var svgs = root.getElementsByTagName('svg'); + + if (svgs.length > 0) { - this.loadImage(e.target.result, mxUtils.bind(this, function(img) - { - this.resizeImage(img, e.target.result, mxUtils.bind(this, function(data2, w2, h2) + var svgRoot = svgs[0]; + var cont = (ignoreEmbeddedXml) ? null : svgRoot.getAttribute('content'); + + if (cont != null && cont.charAt(0) != '<' && cont.charAt(0) != '%') + { + cont = unescape((window.atob) ? atob(cont) : Base64.decode(cont, true)); + } + + if (cont != null && cont.charAt(0) == '%') + { + cont = decodeURIComponent(cont); + } + + if (cont != null && (cont.substring(0, 8) === '<mxfile ' || + cont.substring(0, 14) === '<mxGraphModel ')) + { + barrier(index, mxUtils.bind(this, function() { - barrier(index, mxUtils.bind(this, function() - { - // Refuses to insert images above a certain size as they kill the app - if (data2 != null && data2.length < maxBytes) - { - var s = (!resizeImages || !this.isResampleImage(e.target.result, resampleThreshold)) ? 1 : Math.min(1, Math.min(maxSize / w2, maxSize / h2)); - - return fn(data2, file.type, x + index * gs, y + index * gs, Math.round(w2 * s), Math.round(h2 * s), file.name); - } - else + return fn(cont, 'text/xml', x + index * gs, y + index * gs, 0, 0, file.name); + })); + } + else + { + // SVG needs special handling to add viewbox if missing and + // find initial size from SVG attributes (only for IE11) + barrier(index, mxUtils.bind(this, function() + { + try + { + var prefix = data.substring(0, comma + 1); + + // Parses SVG and find width and height + if (root != null) { - this.handleError({message: mxResources.get('imageTooBig')}); + var svgs = root.getElementsByTagName('svg'); - return null; + if (svgs.length > 0) + { + var svgRoot = svgs[0]; + var w = parseFloat(svgRoot.getAttribute('width')); + var h = parseFloat(svgRoot.getAttribute('height')); + + // Check if viewBox attribute already exists + var vb = svgRoot.getAttribute('viewBox'); + + if (vb == null || vb.length == 0) + { + svgRoot.setAttribute('viewBox', '0 0 ' + w + ' ' + h); + } + // Uses width and height from viewbox for + // missing width and height attributes + else if (isNaN(w) || isNaN(h)) + { + var tokens = vb.split(' '); + + if (tokens.length > 3) + { + w = parseFloat(tokens[2]); + h = parseFloat(tokens[3]); + } + } + + data = this.createSvgDataUri(mxUtils.getXml(svgRoot)); + var s = Math.min(1, Math.min(maxSize / Math.max(1, w)), maxSize / Math.max(1, h)); + + var cells = fn(data, file.type, x + index * gs, y + index * gs, + Math.max(1, Math.round(w * s)), Math.max(1, Math.round(h * s)), file.name); + + // Hack to fix width and height asynchronously + if (isNaN(w) || isNaN(h)) + { + var img = new Image(); + + img.onload = mxUtils.bind(this, function() + { + w = Math.max(1, img.width); + h = Math.max(1, img.height); + + cells[0].geometry.width = w; + cells[0].geometry.height = h; + + svgRoot.setAttribute('viewBox', '0 0 ' + w + ' ' + h); + data = this.createSvgDataUri(mxUtils.getXml(svgRoot)); + + var semi = data.indexOf(';'); + + if (semi > 0) + { + data = data.substring(0, semi) + data.substring(data.indexOf(',', semi + 1)); + } + + graph.setCellStyles('image', data, [cells[0]]); + }); + + img.src = this.createSvgDataUri(mxUtils.getXml(svgRoot)); + } + + return cells; + } } - })); - }), resizeImages, maxSize, resampleThreshold); - }), mxUtils.bind(this, function() - { - this.handleError({message: mxResources.get('invalidOrMissingFile')}); - })); + } + catch (e) + { + // ignores any SVG parsing errors + } + + return null; + })); + } } - } - } - } - else - { + } + else + { + // Checks if PNG+XML is available to bypass code below + var containsModel = false; + + if (file.type == 'image/png') + { + var xml = (ignoreEmbeddedXml) ? null : this.extractGraphModelFromPng(e.target.result); + + if (xml != null && xml.length > 0) + { + var img = new Image(); + img.src = e.target.result; + + barrier(index, mxUtils.bind(this, function() + { + return fn(xml, 'text/xml', x + index * gs, y + index * gs, + img.width, img.height, file.name); + })); + + containsModel = true; + } + } + + // Additional asynchronous step for finding image size + if (!containsModel) + { + // Cannot load local files in Chrome App + if (mxClient.IS_CHROMEAPP) + { + this.spinner.stop(); + this.showError(mxResources.get('error'), mxResources.get('dragAndDropNotSupported'), + mxResources.get('cancel'), mxUtils.bind(this, function() + { + // Hides the dialog + }), null, mxResources.get('ok'), mxUtils.bind(this, function() + { + // Redirects to import function + this.actions.get('import').funct(); + }) + ); + } + else + { + this.loadImage(e.target.result, mxUtils.bind(this, function(img) + { + this.resizeImage(img, e.target.result, mxUtils.bind(this, function(data2, w2, h2) + { + barrier(index, mxUtils.bind(this, function() + { + // Refuses to insert images above a certain size as they kill the app + if (data2 != null && data2.length < maxBytes) + { + var s = (!resizeImages || !this.isResampleImage(e.target.result, resampleThreshold)) ? 1 : Math.min(1, Math.min(maxSize / w2, maxSize / h2)); + + return fn(data2, file.type, x + index * gs, y + index * gs, Math.round(w2 * s), Math.round(h2 * s), file.name); + } + else + { + this.handleError({message: mxResources.get('imageTooBig')}); + + return null; + } + })); + }), resizeImages, maxSize, resampleThreshold); + }), mxUtils.bind(this, function() + { + this.handleError({message: mxResources.get('invalidOrMissingFile')}); + })); + } + } + } + } + else + { fn(e.target.result, file.type, x + index * gs, y + index * gs, 240, 160, file.name, function(cells) { barrier(index, function() - { - return cells; - }); + { + return cells; + }); }); - } + } } }); - // Handles special case of binary file where the reader should not be used + // Handles special cases if (/(\.vsdx)($|\?)/i.test(file.name) || /(\.vssx)($|\?)/i.test(file.name)) { - //For testing JS Vsdx importer! - if (urlParams['dev'] == '1') + fn(null, file.type, x + index * gs, y + index * gs, 240, 160, file.name, function(cells) { - if (/(\.vssx)($|\?)/i.test(file.name)) - { - new com.mxgraph.io.mxVssxCodec().decodeVssx(file, mxUtils.bind(this, function(mxFileXML) { - barrier(index, mxUtils.bind(this, function() - { - var filename = file.name; - if (filename != null && filename.toLowerCase().substring(filename.length - 5) == '.vssx') - { - filename = filename.substring(0, filename.length - 5) + '.xml'; - } - - this.loadLibrary(new LocalLibrary(this, mxFileXML, filename)); - })); - })); - } - else - { - new com.mxgraph.io.mxVsdxCodec().decodeVsdx(file, mxUtils.bind(this, function(mxFileXML) { - barrier(index, mxUtils.bind(this, function() - { - return this.importXml(mxFileXML, x + index * gs, y + index * gs); - })); - })); - } - } - else - { - fn(null, file.type, x + index * gs, y + index * gs, 240, 160, file.name, function(cells) - { - barrier(index, function() - { - return cells; - }); - }, file); - } + barrier(index, function() + { + return cells; + }); + }, file); } else if (file.type.substring(0, 5) == 'image') { @@ -6843,25 +6925,25 @@ { if (graph.isEditing()) { - this.importFiles([item.getAsFile()], 0, 0, this.maxImageSize, function(data, mimeType, x, y, w, h) - { - // Inserts image into current text box - graph.insertImage(data, w, h); - }, function() - { - // No post processing - }, function(file) - { - // Handles only images - return file.type.substring(0, 6) == 'image/'; - }, function(queue) - { - // Invokes elements of queue in order - for (var i = 0; i < queue.length; i++) - { - queue[i](); - } - }); + this.importFiles([item.getAsFile()], 0, 0, this.maxImageSize, function(data, mimeType, x, y, w, h) + { + // Inserts image into current text box + graph.insertImage(data, w, h); + }, function() + { + // No post processing + }, function(file) + { + // Handles only images + return file.type.substring(0, 6) == 'image/'; + }, function(queue) + { + // Invokes elements of queue in order + for (var i = 0; i < queue.length; i++) + { + queue[i](); + } + }); } else { @@ -7718,8 +7800,8 @@ { if (dropElt != null) { - dropElt.parentNode.removeChild(dropElt); - dropElt = null; + dropElt.parentNode.removeChild(dropElt); + dropElt = null; } if (this.editor.graph.isEnabled() || urlParams['embed'] != '1') @@ -7757,29 +7839,29 @@ } else { - var data = null; - - if (mxUtils.indexOf(provider.types, 'text/uri-list') >= 0) - { - var data = evt.dataTransfer.getData('text/uri-list'); - } - else - { - data = (mxUtils.indexOf(provider.types, 'text/html') >= 0) ? provider.getData('text/html') : null; - } + var data = null; + + if (mxUtils.indexOf(provider.types, 'text/uri-list') >= 0) + { + var data = evt.dataTransfer.getData('text/uri-list'); + } + else + { + data = (mxUtils.indexOf(provider.types, 'text/html') >= 0) ? provider.getData('text/html') : null; + } if (data != null && data.length > 0) { var div = document.createElement('div'); - div.innerHTML = data; - - // Extracts single image - var imgs = div.getElementsByTagName('img'); - - if (imgs.length > 0) - { - data = imgs[0].getAttribute('src'); - } + div.innerHTML = data; + + // Extracts single image + var imgs = div.getElementsByTagName('img'); + + if (imgs.length > 0) + { + data = imgs[0].getAttribute('src'); + } } else if (mxUtils.indexOf(provider.types, 'text/plain') >= 0) { @@ -7801,12 +7883,12 @@ } else if (!this.isOffline() && this.isRemoteFileFormat(data)) { - new mxXmlRequest(OPEN_URL, 'format=xml&data=' + encodeURIComponent(data)).send(mxUtils.bind(this, function(req) + new mxXmlRequest(OPEN_URL, 'format=xml&data=' + encodeURIComponent(data)).send(mxUtils.bind(this, function(req) { - if (req.getStatus() >= 200 && req.getStatus() <= 299) - { - this.openLocalFile(req.getText(), null, true); - } + if (req.getStatus() >= 200 && req.getStatus() <= 299) + { + this.openLocalFile(req.getText(), null, true); + } })); } else if (/^https?:\/\//.test(data)) @@ -7937,9 +8019,8 @@ { name = name.substring(0, name.length - 4) + '.xml'; } - - if (Graph.fileSupport && !this.isOffline() && new XMLHttpRequest().upload && - this.isRemoteFileFormat(data, name)) + + var handleResult = mxUtils.bind(this, function(xml) { var dot = name.lastIndexOf('.'); @@ -7952,6 +8033,40 @@ name = name + '.xml'; } + if (xml.substring(0, 10) == '<mxlibrary') + { + // Creates new temporary file if library is dropped in splash screen + if (this.getCurrentFile() == null && urlParams['embed'] != '1') + { + this.openLocalFile(this.emptyDiagramXml, this.defaultFilename, temp); + } + + try + { + this.loadLibrary(new LocalLibrary(this, xml, name)); + } + catch (e) + { + this.handleError(e, mxResources.get('errorLoadingFile')); + } + } + else + { + this.openLocalFile(xml, name, temp); + } + }); + + if (/(\.vsdx)($|\?)/i.test(name) || /(\.vssx)($|\?)/i.test(name)) + { + this.importVisio(file, mxUtils.bind(this, function(xml) + { + this.spinner.stop(); + handleResult(xml); + })); + } + else if (Graph.fileSupport && !this.isOffline() && new XMLHttpRequest().upload && + this.isRemoteFileFormat(data, name)) + { this.parseFile(file, mxUtils.bind(this, function(xhr) { if (xhr.readyState == 4) @@ -7960,34 +8075,7 @@ if (xhr.status >= 200 && xhr.status <= 299) { - var xml = xhr.responseText; - - if (xml.substring(0, 10) == '<mxlibrary') - { - // Creates new temporary file if library is dropped in splash screen - if (this.getCurrentFile() == null && urlParams['embed'] != '1') - { - this.openLocalFile(this.emptyDiagramXml, this.defaultFilename, temp); - } - - if (name != null && name.toLowerCase().substring(name.length - 5) == '.vssx') - { - name = name.substring(0, filename.length - 5) + '.xml'; - } - - try - { - this.loadLibrary(new LocalLibrary(this, xml, name)); - } - catch (e) - { - this.handleError(e, mxResources.get('errorLoadingFile')); - } - } - else - { - this.openLocalFile(xml, name, temp); - } + handleResult(xhr.responseText); } else { diff --git a/src/main/webapp/js/diagramly/ElectronApp.js b/src/main/webapp/js/diagramly/ElectronApp.js index 57e7d45db36187fe7ae19f1c996c0b203616c3d3..122942dbdef8227948dba93cc861a6799a1a183b 100644 --- a/src/main/webapp/js/diagramly/ElectronApp.js +++ b/src/main/webapp/js/diagramly/ElectronApp.js @@ -169,24 +169,24 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email'; if (paths !== undefined && paths[0] != null) { - var path = paths[0]; - var asImage = /\.png$/i.test(path) || /\.gif$/i.test(path) || /\.jpe?g$/i.test(path); - var encoding = (asImage || /\.vsdx$/i.test(path) || /\.vssx$/i.test(path)) ? - 'base64' : 'utf-8'; + var path = paths[0]; + var asImage = /\.png$/i.test(path) || /\.gif$/i.test(path) || /\.jpe?g$/i.test(path); + var encoding = (asImage || /\.vsdx$/i.test(path) || /\.vssx$/i.test(path)) ? + 'base64' : 'utf-8'; if (editorUi.spinner.spin(document.body, mxResources.get('loading'))) { - var fs = require('fs'); + var fs = require('fs'); fs.readFile(path, encoding, mxUtils.bind(this, function (e, data) - { - if (e) - { - editorUi.spinner.stop(); - editorUi.handleError(e); - } - else - { + { + if (e) + { + editorUi.spinner.stop(); + editorUi.handleError(e); + } + else + { try { if (data.substring(0, 26) == '{"state":"{\\"Properties\\":') @@ -196,6 +196,30 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email'; editorUi.spinner.stop(); }); } + else if (/(\.vsdx)($|\?)/i.test(path)) + { + editorUi.importVisio(editorUi.base64ToBlob(data, 'application/octet-stream'), function(xml) + { + editorUi.spinner.stop(); + editorUi.editor.graph.setSelectionCells(editorUi.insertTextAt(xml, 0, 0, true)); + }); + } + else if (!editorUi.isOffline() && new XMLHttpRequest().upload && editorUi.isRemoteFileFormat(data, path)) + { + // Asynchronous parsing via server + editorUi.parseFile(new Blob([data], {type : 'application/octet-stream'}), mxUtils.bind(this, function(xhr) + { + if (xhr.readyState == 4) + { + editorUi.spinner.stop(); + + if (xhr.status >= 200 && xhr.status <= 299) + { + editorUi.editor.graph.setSelectionCells(editorUi.insertTextAt(xhr.responseText, 0, 0, true)); + } + } + }), path); + } else { if (/\.png$/i.test(path)) @@ -209,57 +233,40 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email'; } } else if (/\.svg$/i.test(path)) - { - // LATER: Use importXml without throwing exception if no data - // Checks if SVG contains content attribute - var root = mxUtils.parseXml(data); - var svgs = root.getElementsByTagName('svg'); - - if (svgs.length > 0) - { - var svgRoot = svgs[0]; - var cont = svgRoot.getAttribute('content'); - - if (cont != null && cont.charAt(0) != '<' && cont.charAt(0) != '%') - { - cont = unescape((window.atob) ? atob(cont) : Base64.decode(cont, true)); - } - - if (cont != null && cont.charAt(0) == '%') - { - cont = decodeURIComponent(cont); - } - - if (cont != null && (cont.substring(0, 8) === '<mxfile ' || - cont.substring(0, 14) === '<mxGraphModel ')) - { - asImage = false; - data = cont; - } - else + { + // LATER: Use importXml without throwing exception if no data + // Checks if SVG contains content attribute + var root = mxUtils.parseXml(data); + var svgs = root.getElementsByTagName('svg'); + + if (svgs.length > 0) { - asImage = true; - data = btoa(data); + var svgRoot = svgs[0]; + var cont = svgRoot.getAttribute('content'); + + if (cont != null && cont.charAt(0) != '<' && cont.charAt(0) != '%') + { + cont = unescape((window.atob) ? atob(cont) : Base64.decode(cont, true)); + } + + if (cont != null && cont.charAt(0) == '%') + { + cont = decodeURIComponent(cont); + } + + if (cont != null && (cont.substring(0, 8) === '<mxfile ' || + cont.substring(0, 14) === '<mxGraphModel ')) + { + asImage = false; + data = cont; + } + else + { + asImage = true; + data = btoa(data); + } } - } - } - else if (!editorUi.isOffline() && new XMLHttpRequest().upload && editorUi.isRemoteFileFormat(data, path)) - { - // Asynchronous parsing via server - editorUi.parseFile(editorUi.base64ToBlob(data, 'application/octet-stream'), mxUtils.bind(this, function(xhr) - { - if (xhr.readyState == 4) - { - editorUi.spinner.stop(); - - if (xhr.status >= 200 && xhr.status <= 299) - { - - editorUi.editor.graph.setSelectionCells(editorUi.insertTextAt(xhr.responseText, 0, 0, true)); - } - } - }), path); - } + } if (asImage) { @@ -306,8 +313,8 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email'; editorUi.spinner.stop(); editorUi.handleError(e); } - } - })); + } + })); } } } @@ -873,27 +880,5 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email'; }), 0); }; - EditorUi.prototype.createImageUrlConverter = function() - { - var converter = new mxUrlConverter(); - converter.updateBaseUrl(); - - return converter; - }; - - // Adds file: protocol as absolute URL for images - var mxUrlConverterIsRelativeUrl = mxUrlConverter.prototype.isRelativeUrl; - - mxUrlConverter.prototype.isRelativeUrl = function(url) - { - return url.substring(0, 7) !== 'file://' && mxUrlConverterIsRelativeUrl.apply(this, arguments); - }; - - // Disables proxy for all images - EditorUi.prototype.isCorsEnabledForUrl = function() - { - return true; - } - EditorUi.prototype.addBeforeUnloadListener = function() {}; })(); diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js index bb3e1cded9abaee03542c4bfb0f47fbcf3cdb522..661cc74a1c752929d164026d15d5fdbb53fe7546 100644 --- a/src/main/webapp/js/diagramly/Menus.js +++ b/src/main/webapp/js/diagramly/Menus.js @@ -704,31 +704,7 @@ editorUi.actions.put('exportVsdx', new Action(mxResources.get('formatVsdx') + ' (beta)...', function() { - var delayed = mxUtils.bind(this, function() - { - // Checks for signature method - if (typeof(VsdxExport) !== 'undefined') - { - try - { - new VsdxExport(editorUi).exportCurrentDiagrams(); - } - catch (e) - { - // ignore - } - } - }); - - if (typeof(VsdxExport) === 'undefined' && !this.loadingVsdx && !editorUi.isOffline()) - { - this.loadingVsdx = true; - mxscript('js/vsdx.min.js', delayed); - } - else - { - window.setTimeout(delayed, 0); - } + editorUi.exportVisio(); })); // Adds language menu to options only if localStorage is available for diff --git a/src/main/webapp/js/vsdx/bmpDecoder.js b/src/main/webapp/js/diagramly/vsdx/bmpDecoder.js similarity index 100% rename from src/main/webapp/js/vsdx/bmpDecoder.js rename to src/main/webapp/js/diagramly/vsdx/bmpDecoder.js diff --git a/src/main/webapp/js/vsdx/importer.js b/src/main/webapp/js/diagramly/vsdx/importer.js similarity index 99% rename from src/main/webapp/js/vsdx/importer.js rename to src/main/webapp/js/diagramly/vsdx/importer.js index 0b95e10f23a0c93744e943f9f74b8ffda9b0414d..eaccb9b5da4332f23da9376a5380ca6b83087a34 100644 --- a/src/main/webapp/js/vsdx/importer.js +++ b/src/main/webapp/js/diagramly/vsdx/importer.js @@ -67,7 +67,7 @@ var com; * @return {string} */ //FIXME TODO add charset support - mxVsdxCodec.prototype.decodeVsdx = function (file, callback, charset) { + mxVsdxCodec.prototype.decodeVsdx = function (file, callback, charset, onerror) { var _this = this; var docData = ({}); var mediaData = ({}); @@ -152,11 +152,11 @@ var com; } /* append */ (function (sb) { return sb.str = sb.str.concat(_this.RESPONSE_END); })(xmlBuilder); var dateAfter = new Date(); - console.log("File processed in " + (dateAfter - dateBefore) + "ms"); + //console.log("File processed in " + (dateAfter - dateBefore) + "ms"); //console.log(xmlBuilder.str); if (callback) { - callback(xmlBuilder.str); + callback(xmlBuilder.str); } }; @@ -166,19 +166,19 @@ var com; var doneCheck = function() { - if (processedFiles == filesCount) - { - var dateAfter = new Date(); - console.log(processedFiles + " File extracted in " + (dateAfter - dateBefore) + "ms"); - allDone(); - } + if (processedFiles == filesCount) + { + var dateAfter = new Date(); + //console.log(processedFiles + " File extracted in " + (dateAfter - dateBefore) + "ms"); + allDone(); + } }; JSZip.loadAsync(file) .then(function(zip) { var dateAfter = new Date(); - console.log(" (loaded in " + (dateAfter - dateBefore) + "ms)"); + //console.log(" (loaded in " + (dateAfter - dateBefore) + "ms)"); zip.forEach(function (relativePath, zipEntry) { @@ -190,7 +190,7 @@ var com; filesCount++; zipEntry.async("string").then(function (str) { - if (!(str.length === 0)) { + if (!(str.length === 0)) { //UTF-8 BOM causes exception while parsing, so remove it //TODO is the text encoding will be correct or string must be re-read as UTF-8? if ((function (str, searchString, position) { @@ -210,9 +210,9 @@ var com; doc.vsdxFileName = filename; /* put */ (docData[filename] = doc); } - processedFiles++; - - doneCheck(); + processedFiles++; + + doneCheck(); }); } else if (name.indexOf(mxVsdxCodec.vsdxPlaceholder + "/media") === 0)//binary files @@ -303,7 +303,12 @@ var com; } }); }, function (e) { - console.log("Error!" + e.message); + //console.log("Error!" + e.message); + + if (onerror != null) + { + onerror(e); + } }); }; mxVsdxCodec.prototype.createMxGraph = function () { @@ -11547,3 +11552,15 @@ com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$(); com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$(); com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize(); com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$(); + +EditorUi.prototype.doImportVisio = function(file, done, onerror) +{ + if (file.name != null && /(\.vssx)($|\?)/i.test(file.name)) + { + new com.mxgraph.io.mxVssxCodec().decodeVssx(file, done); + } + else + { + new com.mxgraph.io.mxVsdxCodec().decodeVsdx(file, done, null, onerror); + } +}; diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js index 61ab9304f6f91de80571f8f61e09801100f3315c..97e9b3885240d61f87c03ffb8cdd9c923edc9c07 100644 --- a/src/main/webapp/js/embed-static.min.js +++ b/src/main/webapp/js/embed-static.min.js @@ -184,7 +184,7 @@ f)+"\n"+u+"}":"{"+z.join(",")+"}";f=u;return l}}"function"!==typeof Date.prototy e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})}); "function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.0.9",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& +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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.1.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -322,7 +322,7 @@ function mxUndoableEdit(a,b){this.source=a;this.changes=[];this.significant=null mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){};mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var b=this.changes[a];null!=b.execute?b.execute():null!=b.undo&&b.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",b))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()}; mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,b=0;b<a;b++){var c=this.changes[b];null!=c.execute?c.execute():null!=c.redo&&c.redo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",c))}this.undone=!1;this.redone=!0;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0; mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null;mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl}; -mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)}; +mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&"file://"!=a.substring(0,7)}; mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a}; function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.stop()});mxEvent.addListener(document,"mouseup",this.mouseUpListener);var b=mxUtils.bind(this, function(){this.scrollbars=mxUtils.hasScrollbars(a.container);this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;this.scrollbars?(a.panGraph(-a.container.scrollLeft-Math.ceil(this.dx),-a.container.scrollTop-Math.ceil(this.dy)),a.panDx=this.scrollLeft-a.container.scrollLeft,a.panDy=this.scrollTop-a.container.scrollTop,a.fireEvent(new mxEventObject(mxEvent.PAN))):a.panGraph(this.getDx(), @@ -1685,7 +1685,7 @@ return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform", "translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,v){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/ 2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline"); -mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas= +r.innerHTML=f;return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas= function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b= window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)}; Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b; diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js index 544db67c7a8232f32d0fcd9b35a73f96052da92e..10d6c41c87e78e0b90e1cd0120499cd8b2f6a48d 100644 --- a/src/main/webapp/js/extensions.min.js +++ b/src/main/webapp/js/extensions.min.js @@ -1,223 +1,224 @@ -(function(){function k(n){var g=null!=n.Text?n.Text:null!=n.Value?n.Value:n.Lane_0;null==g&&null!=n.State?null!=n.State.t&&(g=n.State):null==g&&null!=n.Note?null!=n.Note.t&&(g=n.Note):null==g&&null!=n.Title?null!=n.Title.t&&(g=n.Title):null!=n.t&&(g=n);null==g&&null!=n.TextAreas&&null!=n.TextAreas.Text&&null!=n.TextAreas.Text.Value&&null!=n.TextAreas.Text.Value.t&&(g=n.TextAreas.Text.Value);if(null!=g){if(null!=g.t)return g.t=g.t.replace(/</g,"<"),g.t=g.t.replace(/>/g,">"),g.t;if(null!=g.Value&& -null!=g.Value.t)return g.Value.t=g.Value.t.replace(/</g,"<"),g.Value.t=g.Value.t.replace(/>/g,">"),g.Value.t}return""}function cb(n){return null!=n.Action?n.Action:n}function za(n){if(null!=n.Text){if(null!=n.Text.m)return n.Text.m}else if(null!=n.TextAreas){if(null!=n.TextAreas.Text&&null!=n.TextAreas.Text.Value&&null!=n.TextAreas.Text.Value.m)return n.TextAreas.Text.Value.m}else if(null!=n.m)return n.m;return null}function m(n){return N(n)+I(n)+M(n)+ha(n)+ta(n)+ua(n)+Va(n)+va(n)+wa(n)+Za(n)} -function N(n){n=za(n);if(null!=n)for(var g=0;g<n.length;){var k=n[g];if("s"==k.n&&null!=k.v)return"fontSize="+Math.round(.6*k.v)+";";g++}return"fontSize=10;"}function I(n){n=za(n);if(null!=n)for(var g=0;g<n.length;){var k=n[g];if("c"==k.n&&null!=k.v)return n=k.v,"#"!=n.charAt(0)&&(n="#"+n),n=n.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+n+";";g++}return""}function M(n){n=za(n);if(null!=n){var g=0,k=!1;if(null!=n)for(var c=0;!k&&c<n.length;){var a=n[c];"b"==a.n&&null!=a.v&&a.v&&(k=!0,g+=1);c++}k= -!1;if(null!=n)for(c=0;!k&&c<n.length;)a=n[c],"i"==a.n&&null!=a.v&&a.v&&(k=!0,g+=2),c++;k=!1;if(null!=n)for(c=0;!k&&c<n.length;)a=n[c],"u"==a.n&&null!=a.v&&a.v&&(k=!0,g+=4),c++;if(0<g)return"fontStyle="+g+";"}return""}function ha(n){n=za(n);if(null!=n)for(var g=0;g<n.length;){var k=n[g];if("a"==k.n&&null!=k.v)return"align="+k.v+";";g++}return""}function ta(n){var g=za(n);if(null!=g)for(var k=0;k<g.length;){var c=g[k];if("il"==c.n){if(null!=c.v)return"spacingLeft="+.6*c.v+";"}else if("s"==c.n&&"align=center;"!= -ha(n)&&null!=c.v)return"spacingLeft="+.6*c.v+";";k++}return""}function ua(n){n=za(n);if(null!=n)for(var g=0;g<n.length;){var k=n[g];if("ir"==k.n&&null!=k.v)return"spacingRight="+k.v+";";g++}return""}function Va(g){g=za(g);if(null!=g)for(var n=0;n<g.length;){var k=g[n];if("mt"==k.n&&null!=k.v)return"spacingTop="+k.v+";";n++}return""}function va(g){g=za(g);if(null!=g)for(var n=0;n<g.length;){var k=g[n];if("mb"==k.n&&null!=k.v)return"spacingBottom="+k.v+";";n++}return""}function wa(g){return"number"=== -typeof g.InsetMargin?"spacing="+parseInt(g.InsetMargin)+";":""}function Za(g){return null!=g.Text_VAlign&&"string"===typeof g.Text_VAlign?"verticalAlign="+g.Text_VAlign+";":xa(mxConstants.STYLE_VERTICAL_ALIGN,g.TextVAlign,"middle")}function g(g,k){return cc.includes(k.Class)?"Venn"==k.Class.substring(0,4)?xa(mxConstants.STYLE_STROKECOLOR,g.FillColor.substring(0,7),"#FFFFFF"):"":0==g.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":xa(mxConstants.STYLE_STROKECOLOR,g.LineColor.substring(0,7),"#000000")} -function p(g,k){var n="";gb.includes(k.Class)||(n+=xa(mxConstants.STYLE_OPACITY,g.Opacity,"100"));if("string"===typeof g.LineColor&&!gb.includes(k.Class)&&7<g.LineColor.length)var c="0x"+g.LineColor.substring(g.LineColor.length-2,g.LineColor.length),n=n+("strokeOpacity="+Math.round(parseInt(c)/2.55)+";");"string"===typeof g.FillColor&&!gb.includes(k.Class)&&7<g.FillColor.length&&(c="0x"+g.FillColor.substring(g.FillColor.length-2,g.FillColor.length),n+="fillOpacity="+Math.round(parseInt(c)/2.55)+";"); -return n}function dc(g,k){if(null!=g.Rounding&&!ec.includes(k.Class)){if(0<g.Rounding)return"rounded=1;absoluteArcSize=1;arcSize="+.6*g.Rounding+";"}else if(null==g.Rounding&&fc.includes(k.Class))return"rounded=1;absoluteArcSize=1;arcSize=8;";return""}function V(g,k,l){return null!=g.Rotation&&(g=mxUtils.toDegree(parseFloat(g.Rotation)),"AdvancedSwimLaneBlockRotated"==k.Class?(g+=90,l.geometry.rotate90()):uc.includes(k.Class)?(g-=90,l.geometry.rotate90(),l.geometry.rotate90(),l.geometry.rotate90()): -vc.includes(k.Class)&&(g+=180,l.geometry.rotate90(),l.geometry.rotate90()),0!=g)?"rotation="+g+";":""}function r(g){return null!=g.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function q(g,k){if(null!=g.FillColor&&!wc.includes(k.Class))if("object"===typeof g.FillColor){if(null!=g.FillColor.cs&&1<g.FillColor.cs.length)return xa(mxConstants.STYLE_FILLCOLOR,g.FillColor.cs[0].c.substring(0,7))+xa(mxConstants.STYLE_GRADIENTCOLOR,g.FillColor.cs[1].c.substring(0,7))}else return"string"===typeof g.FillColor? -xa(mxConstants.STYLE_FILLCOLOR,g.FillColor.substring(0,7),"#FFFFFF"):xa(mxConstants.STYLE_FILLCOLOR,"none");return""}function t(g){return"dashed"==g.StrokeStyle?"dashed=1;":"dotted"==g.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==g.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==g.StrokeStyle?"dashed=1;dashPattern=1 1;":""}function l(g){return xa(mxConstants.STYLE_STROKEWIDTH,.6*parseFloat(g.LineWidth),"1")}function gc(n,m){var z=cb(m);if(null!=z){var c=hb[z.Class]+";";null!=c&&(n.style+= -c);c=null!=z.Properties?z.Properties:z;if(null!=c){n.value=k(c);var a=n.style,D=N(c)+I(c)+M(c)+ha(c,n)+ta(c)+ua(c)+Va(c)+va(c)+wa(c)+Za(c)+g(c,z)+p(c,z)+dc(c,z)+V(c,z,n)+(c.FlipX?"flipH=1;":"")+(c.FlipY?"flipV=1;":"")+r(c)+q(c,z)+t(c)+l(c);z="ImageSearchBlock2"==z.Class?"image="+c.URL+";":"";n.style=a+(D+z);if(n.edge){n.style+="rounded=1;arcSize=6;";if("diagonal"!=c.Shape)if(null!=c.ElbowPoints)for(n.geometry.points=[],z=0;z<c.ElbowPoints.length;z++)n.geometry.points.push(new mxPoint(Math.round(.6* -c.ElbowPoints[z].x+0),Math.round(.6*c.ElbowPoints[z].y+0)));else"elbow"==c.Shape?n.style=null!=c.Endpoint1.Block&&null!=c.Endpoint1.Block?n.style+"edgeStyle=orthogonalEdgeStyle;":n.style+"edgeStyle=elbowEdgeStyle;":null!=c.Endpoint1.Block&&null!=c.Endpoint1.Block&&(n.style+="edgeStyle=orthogonalEdgeStyle;","curve"==c.Shape&&(n.style+="curved=1;"));null!=c.Endpoint1.Style&&(n.style+="startArrow="+wb[c.Endpoint1.Style]+";");null!=c.Endpoint2.Style&&(n.style+="endArrow="+wb[c.Endpoint2.Style].replace(/startSize/g, -"endSize")+";");xb(n,c.Endpoint1,!0);xb(n,c.Endpoint2,!1)}}}}function yb(g){var k=cb(g).Properties.BoundingBox;null!=g.Class&&"AWS"===g.Class.substring(0,3)&&(k.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*k.x+0),Math.round(.6*k.y+0),Math.round(.6*k.w),Math.round(.6*k.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;gc(v,g);return v}function db(g,l,m){m=2*(parseFloat(g.Location)-.5);g=new mxCell(k(g),new mxGeometry(m,0,0,0),"text;html=1;resizable=0;labelBackgroundColor=#ffffff;");g.geometry.relative= -!0;g.vertex=!0;l.insert(g);return l}function xa(g,k,l,c){null!=k&&null!=c&&(k=c(k));return null!=k&&k!=l?g+"="+k+";":""}function xb(g,k,l){null!=k&&null!=k.LinkX&&null!=k.LinkY&&(g.style+=(l?"exitX":"entryX")+"="+k.LinkX+";"+(l?"exitY":"entryY")+"="+k.LinkY+";"+(l?"exitPerimeter":"entryPerimeter")+"=0;")}function Ta(g,k,l,c,a,m,f,d){g=new mxCell("",new mxGeometry(g,k,0,0),"strokeColor=none;fillColor=none;");g.vertex=!0;f.insert(g);m=[g];l=sb.cloneCell(l);d.insertEdge(l,!1);g.insertEdge(l,!0);m.push(l); -c.push(a.addCell(l,null,null,null,null))}function W(g,k,l,c,a,m,f,d,p){g=new mxCell("",new mxGeometry(g,k,0,0),"strokeColor=none;fillColor=none;");g.vertex=!0;p.insert(g);l=new mxCell("",new mxGeometry(l,c,0,0),"strokeColor=none;fillColor=none;");l.vertex=!0;p.insert(l);d=[l];a=sb.cloneCell(a);g.insertEdge(a,!0);l.insertEdge(a,!1);d.push(a);m.push(f.addCell(a,null,null,null,null))}function xc(n,D,z){var c=cb(n),a=c.Properties,ma=a.BoundingBox,f=Math.round(.6*ma.w),d=Math.round(.6*ma.h),Aa=Math.round(.6* -ma.x+0),Ba=Math.round(.6*ma.y+0);v=new mxCell("",new mxGeometry(Aa,Ba,f,d),"html=1;whiteSpace=wrap;");v.vertex=!0;switch(n.Class){case "BraceNoteBlock":case "UI2BraceNoteBlock":var pc=!1;null!=a.BraceDirection&&"Right"==a.BraceDirection&&(pc=!0);var ib=null,na=null;pc?(ib=new mxCell("",new mxGeometry(f-.125*d,0,.125*d,d),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(0,0,f-.125*d,d),"strokeColor=none;fillColor=none;")):(ib=new mxCell("",new mxGeometry(0,0,.125*d,d),"shape=curlyBracket;rounded=1;flipH=1;"), -na=new mxCell("",new mxGeometry(.125*d,0,f-.125*d,d),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=V(a,c,v);ib.vertex=!0;v.insert(ib);ib.style+=g(a,c)+p(a,c)+r(a)+t(a)+l(a);na.vertex=!0;na.value=k(a);v.insert(na);na.style+=N(a)+I(a)+M(a)+ha(a,na)+ta(a)+ua(a)+Va(a)+va(a)+wa(a)+Za(a);break;case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":var xa=0;null!=a.Lanes&&(xa=a.Lanes.length);v.style="strokeColor=none;fillColor=none;";for(var za=0,$a=[], -b=0;b<xa;b++){var qc=parseFloat(a.Lanes[b].p);$a.push(new mxCell("",new mxGeometry(f*za,0,f*qc,d),"shape=swimlane;startSize=25;"));$a[b].vertex=!0;v.insert($a[b]);$a[b].value=k(a["Lane_"+b]);$a[b].style+=N(a["Lane_"+b])+I(a["Lane_"+b])+M(a["Lane_"+b])+ha(a["Lane_"+b],$a[b])+ta(a["Lane_"+b])+ua(a["Lane_"+b])+Va(a["Lane_"+b])+va(a["Lane_"+b])+wa(a["Lane_"+b])+Za(a["Lane_"+b])+g(a,c)+p(a,c)+dc(a,c)+V(a,c,$a[b])+(a.FlipX?"flipH=1;":"")+(a.FlipY?"flipV=1;":"")+r(a)+q(a,c)+t(a)+l(a);za+=qc}break;case "AndroidDevice":if(null!= -a.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;";var ab=null,zb=null,Ab=null;if("Tablet"==a.AndroidDeviceName||"Mini Tablet"==a.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",ab=new mxCell("",new mxGeometry(.112*f,.077*d,.77*f,.85*d),""),a.KeyboardShown&&(zb=new mxCell("",new mxGeometry(.112*f,.727*d,.77*f,.2*d),"shape=mxgraph.android.keyboard;")),a.FullScreen||(Ab=new mxCell("",new mxGeometry(.112*f,.077*d,.77*f,.03*d),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+ -.015*d+";"));else if("Large Phone"==a.AndroidDeviceName||"Phone"==a.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",ab=new mxCell("",new mxGeometry(.04*f,.092*d,.92*f,.816*d),""),a.KeyboardShown&&(zb=new mxCell("",new mxGeometry(.04*f,.708*d,.92*f,.2*d),"shape=mxgraph.android.keyboard;")),a.FullScreen||(Ab=new mxCell("",new mxGeometry(.04*f,.092*d,.92*f,.03*d),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*d+";"));ab.vertex=!0;v.insert(ab); -"Dark"==a.Scheme?ab.style+="fillColor=#111111;":"Light"==a.Scheme&&(ab.style+="fillColor=#ffffff;");null!=zb&&(zb.vertex=!0,v.insert(zb));null!=Ab&&(Ab.vertex=!0,v.insert(Ab))}break;case "AndroidAlertDialog":var Ca=new mxCell("",new mxGeometry(0,0,f,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ca.vertex=!0;v.insert(Ca);var T=new mxCell("",new mxGeometry(0,25,f,10),"shape=line;strokeColor=#33B5E5;");T.vertex=!0;v.insert(T);var Bb=new mxCell("",new mxGeometry(0,30,f,d-30),"strokeColor=none;fillColor=none;verticalAlign=top;"); -Bb.vertex=!0;v.insert(Bb);var Y=new mxCell("",new mxGeometry(0,d-25,.5*f,25),"fillColor=none;");Y.vertex=!0;v.insert(Y);var Z=new mxCell("",new mxGeometry(.5*f,d-25,.5*f,25),"fillColor=none;");Z.vertex=!0;v.insert(Z);Ca.value=k(a.DialogTitle);Ca.style+=m(a.DialogTitle);Bb.value=k(a.DialogText);Bb.style+=m(a.DialogText);Y.value=k(a.Button_0);Y.style+=m(a.Button_0);Z.value=k(a.Button_1);Z.style+=m(a.Button_1);"Dark"==a.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",Y.style+="strokeColor=#353535;", -Z.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",Y.style+="strokeColor=#E2E2E2;",Z.style+="strokeColor=#E2E2E2;");break;case "AndroidDateDialog":case "AndroidTimeDialog":Ca=new mxCell("",new mxGeometry(0,0,f,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ca.vertex=!0;v.insert(Ca);Ca.value=k(a.DialogTitle);Ca.style+=m(a.DialogTitle);T=new mxCell("",new mxGeometry(0,25,f,10),"shape=line;strokeColor=#33B5E5;");T.vertex=!0;v.insert(T);Y=new mxCell("",new mxGeometry(0, -d-25,.5*f,25),"fillColor=none;");Y.vertex=!0;v.insert(Y);Y.value=k(a.Button_0);Y.style+=m(a.Button_0);Z=new mxCell("",new mxGeometry(.5*f,d-25,.5*f,25),"fillColor=none;");Z.vertex=!0;v.insert(Z);Z.value=k(a.Button_1);Z.style+=m(a.Button_1);var jb=new mxCell("",new mxGeometry(.5*f-4,41,8,4),"shape=triangle;direction=north;");jb.vertex=!0;v.insert(jb);var kb=new mxCell("",new mxGeometry(.25*f-4,41,8,4),"shape=triangle;direction=north;");kb.vertex=!0;v.insert(kb);var lb=new mxCell("",new mxGeometry(.75* -f-4,41,8,4),"shape=triangle;direction=north;");lb.vertex=!0;v.insert(lb);var Cb=new mxCell("",new mxGeometry(.375*f,50,.2*f,15),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.value=k(a.Label_1);Cb.style+=m(a.Label_1);var Db=new mxCell("",new mxGeometry(.125*f,50,.2*f,15),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.value=k(a.Label_0);Db.style+=m(a.Label_0);var mb=null;"AndroidDateDialog"==n.Class&&(mb=new mxCell("",new mxGeometry(.625*f,50,.2*f,15),"strokeColor=none;fillColor=none;"), -mb.vertex=!0,v.insert(mb),mb.value=k(a.Label_2),mb.style+=m(a.Label_2));var Da=new mxCell("",new mxGeometry(.43*f,60,.14*f,10),"shape=line;strokeColor=#33B5E5;");Da.vertex=!0;v.insert(Da);var Ea=new mxCell("",new mxGeometry(.18*f,60,.14*f,10),"shape=line;strokeColor=#33B5E5;");Ea.vertex=!0;v.insert(Ea);var db=new mxCell("",new mxGeometry(.68*f,60,.14*f,10),"shape=line;strokeColor=#33B5E5;");db.vertex=!0;v.insert(db);var Eb=new mxCell("",new mxGeometry(.375*f,65,.2*f,15),"strokeColor=none;fillColor=none;"); -Eb.vertex=!0;v.insert(Eb);Eb.value=k(a.Label_4);Eb.style+=m(a.Label_4);var nb=null;"AndroidTimeDialog"==n.Class&&(nb=new mxCell("",new mxGeometry(.3*f,65,.1*f,15),"strokeColor=none;fillColor=none;"),nb.vertex=!0,v.insert(nb),nb.value=k(a.Label_Colon),nb.style+=m(a.Label_Colon));var Fb=new mxCell("",new mxGeometry(.125*f,65,.2*f,15),"strokeColor=none;fillColor=none;");Fb.vertex=!0;v.insert(Fb);Fb.value=k(a.Label_3);Fb.style+=m(a.Label_3);var Gb=new mxCell("",new mxGeometry(.625*f,65,.2*f,15),"strokeColor=none;fillColor=none;"); -Gb.vertex=!0;v.insert(Gb);Gb.value=k(a.Label_5);Gb.style+=m(a.Label_5);var gb=new mxCell("",new mxGeometry(.43*f,75,.14*f,10),"shape=line;strokeColor=#33B5E5;");gb.vertex=!0;v.insert(gb);var hb=new mxCell("",new mxGeometry(.18*f,75,.14*f,10),"shape=line;strokeColor=#33B5E5;");hb.vertex=!0;v.insert(hb);var wb=new mxCell("",new mxGeometry(.68*f,75,.14*f,10),"shape=line;strokeColor=#33B5E5;");wb.vertex=!0;v.insert(wb);var Hb=new mxCell("",new mxGeometry(.375*f,80,.2*f,15),"strokeColor=none;fillColor=none;"); -Hb.vertex=!0;v.insert(Hb);Hb.value=k(a.Label_7);Hb.style+=m(a.Label_7);var Ib=new mxCell("",new mxGeometry(.125*f,80,.2*f,15),"strokeColor=none;fillColor=none;");Ib.vertex=!0;v.insert(Ib);Ib.value=k(a.Label_6);Ib.style+=m(a.Label_6);var Jb=new mxCell("",new mxGeometry(.625*f,80,.2*f,15),"strokeColor=none;fillColor=none;");Jb.vertex=!0;v.insert(Jb);Jb.value=k(a.Label_8);Jb.style+=m(a.Label_8);var ob=new mxCell("",new mxGeometry(.5*f-4,99,8,4),"shape=triangle;direction=south;");ob.vertex=!0;v.insert(ob); -var pb=new mxCell("",new mxGeometry(.25*f-4,99,8,4),"shape=triangle;direction=south;");pb.vertex=!0;v.insert(pb);var qb=new mxCell("",new mxGeometry(.75*f-4,99,8,4),"shape=triangle;direction=south;");qb.vertex=!0;v.insert(qb);"Dark"==a.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",Y.style+="strokeColor=#353535;",Z.style+="strokeColor=#353535;",jb.style+="strokeColor=none;fillColor=#7E7E7E;",kb.style+="strokeColor=none;fillColor=#7E7E7E;",lb.style+="strokeColor=none;fillColor=#7E7E7E;", -ob.style+="strokeColor=none;fillColor=#7E7E7E;",pb.style+="strokeColor=none;fillColor=#7E7E7E;",qb.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",Y.style+="strokeColor=#E2E2E2;",Z.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=none;fillColor=#939393;",kb.style+="strokeColor=none;fillColor=#939393;",lb.style+="strokeColor=none;fillColor=#939393;",ob.style+="strokeColor=none;fillColor=#939393;",pb.style+="strokeColor=none;fillColor=#939393;", -qb.style+="strokeColor=none;fillColor=#939393;");break;case "AndroidListItems":var fa=d,Wa=0;if(a.ShowHeader){var Wa=8,Kb=new mxCell("",new mxGeometry(0,0,f,Wa),"strokeColor=none;fillColor=none;");Kb.vertex=!0;v.insert(Kb);Kb.value=k(a.Header);Kb.style+=m(a.Header);var fa=fa-Wa,xb=new mxCell("",new mxGeometry(0,Wa-2,f,4),"shape=line;strokeColor=#999999;");xb.vertex=!0;v.insert(xb)}var Fa=parseInt(a.Items);0<Fa&&(fa/=Fa);for(var x=[],T=[],b=0;b<Fa;b++)x[b]=new mxCell("",new mxGeometry(0,Wa+b*fa,f, -fa),"strokeColor=none;fillColor=none;"),x[b].vertex=!0,v.insert(x[b]),x[b].value=k(a["Item_"+b]),x[b].style+=m(a["Item_"+b]),0<b&&(T[b]=new mxCell("",new mxGeometry(0,Wa+b*fa-2,f,4),"shape=line;"),T[b].vertex=!0,v.insert(T[b]),T[b].style="Dark"==a.Scheme?T[b].style+"strokeColor=#ffffff;":T[b].style+"strokeColor=#D9D9D9;");v.style="Dark"==a.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";break;case "AndroidTabs":var Ga=parseInt(a.Tabs),oa=f;0<Ga&& -(oa/=Ga);for(var P=[],T=[],b=0;b<Ga;b++)P[b]=new mxCell("",new mxGeometry(b*oa,0,oa,d),"strokeColor=none;fillColor=none;"),P[b].vertex=!0,v.insert(P[b]),P[b].value=k(a["Tab_"+b]),P[b].style+=m(a["Tab_"+b]),0<b&&(T[b]=new mxCell("",new mxGeometry(b*oa-2,.2*d,4,.6*d),"shape=line;direction=north;"),T[b].vertex=!0,v.insert(T[b]),T[b].style="Dark"==a.Scheme?T[b].style+"strokeColor=#484848;":T[b].style+"strokeColor=#CCCCCC;");var yb=new mxCell("",new mxGeometry(a.Selected*oa+2,d-3,oa-4,3),"strokeColor=none;fillColor=#33B5E5;"); -yb.vertex=!0;v.insert(yb);v.style="Dark"==a.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Aa),Math.round(Ba+.25*d),Math.round(f),Math.round(.5*d)),"html=1;whiteSpace=wrap;");v.vertex=!0;var Lb=new mxCell("",new mxGeometry(0,0,f*a.BarPosition,Math.round(.5*d)),"strokeColor=none;fillColor=#33B5E5;");Lb.vertex=!0;v.insert(Lb);v.style="Dark"==a.Scheme?v.style+"strokeColor=none;fillColor=#474747;": -v.style+"strokeColor=none;fillColor=#BBBBBB;";break;case "AndroidImageBlock":v.style="Dark"==a.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";break;case "AndroidTextBlock":v.style="Dark"==a.Scheme?a.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":a.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;": -v.style+"fillColor=#ffffff;strokeColor=none;";v.value=k(a.Label);v.style+=m(a.Label);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(a.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(a.HighlightShow){var Xa=null,Xa=a.HighlightTop?new mxCell("",new mxGeometry(0,0,f,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,d- -2,f,2),"strokeColor=none;");Xa.vertex=!0;v.insert(Xa);switch(a.HighlightColor){case "Blue":Xa.style+="fillColor=#33B5E5;";break;case "Dark Gray":Xa.style+="fillColor=#B0B0B0;";break;case "White":Xa.style+="fillColor=#ffffff;"}}if(a.VlignShow){var rb=new mxCell("",new mxGeometry(20,5,2,d-10),"shape=line;direction=north;");rb.vertex=!0;v.insert(rb);switch(a.VlignColor){case "Blue":rb.style+="strokeColor=#244C5A;";break;case "White":rb.style+="strokeColor=#ffffff;"}}break;case "AndroidButton":v.value= -k(a.Label);v.style+=m(a.Label)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==a.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";break;case "AndroidTextBox":v.value=k(a.Label);v.style+=m(a.Label);var Mb=new mxCell("",new mxGeometry(2,d-6,f-4,4),"shape=partialRectangle;top=0;fillColor=none;");Mb.vertex=!0;v.insert(Mb);v.style="Dark"==a.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;"; -Mb.style=a.TextFocused?Mb.style+"strokeColor=#33B5E5;":Mb.style+"strokeColor=#A9A9A9;";break;case "AndroidRadioButton":var eb=null;a.Checked&&(eb=new mxCell("",new mxGeometry(.15*f,.15*d,.7*f,.7*d),"shape=ellipse;fillColor=#33B5E5;strokeWidth=0.6;"),eb.vertex=!0,v.insert(eb));"Dark"==a.Scheme?(v.style+="shape=ellipse;strokeWidth=0.6;strokeColor=#272727;",a.Checked?(eb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=0.6;fillColor=#ffffff;strokeColor=#5C5C5C;", -a.Checked&&(eb.style+="strokeColor=#999999;"));break;case "AndroidCheckBox":var hc=null;a.Checked&&(hc=new mxCell("",new mxGeometry(.25*f,.05*-d,f,.8*d),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),hc.vertex=!0,v.insert(hc));v.style="Dark"==a.Scheme?v.style+"strokeWidth=0.6;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=0.6;strokeColor=#5C5C5C;fillColor=#ffffff;";break;case "AndroidToggle":v.style="Dark"==a.Scheme?a.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;": -v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":a.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+a.BarPosition+";fillColor=#33b5e5;";break;case "iOSSegmentedControl":Ga=parseInt(a.Tabs);oa=f;v.style+="strokeColor=none;fillColor=none;";0<Ga&&(oa/=Ga);P=[];T=[];for(b=0;b<Ga;b++)P[b]=new mxCell("",new mxGeometry(b*oa, -0,oa,d),"strokeColor="+a.FillColor+";"),P[b].vertex=!0,v.insert(P[b]),P[b].value=k(a["Tab_"+b]),P[b].style+=m(a["Tab_"+b]),P[b].style=a.Selected==b?P[b].style+q(a,c):P[b].style+"fillColor=none;";break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+a.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*a.BarPosition+";";break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Aa),Math.round(Ba+.25*d),Math.round(f),Math.round(.5*d)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;"); -v.vertex=!0;Lb=new mxCell("",new mxGeometry(0,0,f*a.BarPosition,Math.round(.5*d)),"strokeColor=none;"+q(a,c));Lb.vertex=!0;v.insert(Lb);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;"+q(a,c)+"strokeColor=#D6D6D6;";break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;"+q(a,c)+"strokeColor=#000000;";var F=new mxCell(k(a.Text),new mxGeometry(.35*f,0,.3*f,d),"strokeColor=none;fillColor=none;");F.vertex=!0;v.insert(F);F.style+=m(a.Text);var ia=new mxCell(k(a.Carrier), -new mxGeometry(.09*f,0,.2*f,d),"strokeColor=none;fillColor=none;");ia.vertex=!0;v.insert(ia);ia.style+=m(a.Carrier);break;case "iOSSearchBar":v.style+="strokeColor=none;"+q(a,c)+p(a,c)+dc(a,c)+m(a.Search);v.value=k(a.Search);var J=new mxCell("",new mxGeometry(.3*f,.3*d,.4*d,.4*d),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");J.vertex=!0;v.insert(J);break;case "iOSNavBar":v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+q(a,c)+p(a,c)+m(a.Title); -v.value=k(a.Title);F=new mxCell(k(a.LeftText),new mxGeometry(.03*f,0,.3*f,d),"strokeColor=none;fillColor=none;");F.vertex=!0;v.insert(F);F.style+=m(a.LeftText);ia=new mxCell(k(a.RightText),new mxGeometry(.65*f,0,.3*f,d),"strokeColor=none;fillColor=none;");ia.vertex=!0;v.insert(ia);ia.style+=m(a.RightText);J=new mxCell("",new mxGeometry(.02*f,.2*d,.3*d,.5*d),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");J.vertex=!0;v.insert(J);break;case "iOSTabs":Ga=parseInt(a.Tabs);oa=f;v.style+= -"shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;"+q(a,c)+p(a,c);0<Ga&&(oa/=Ga);P=[];T=[];for(b=0;b<Ga;b++)P[b]=new mxCell("",new mxGeometry(b*oa,0,oa,d),"strokeColor=none;"),P[b].vertex=!0,v.insert(P[b]),P[b].value=k(a["Tab_"+b]),P[b].style+=N(a["Tab_"+b]),P[b].style+=I(a["Tab_"+b])+M(a["Tab_"+b])+ha(a["Tab_"+b])+ta(a["Tab_"+b])+ua(a["Tab_"+b])+Va(a["Tab_"+b])+va(a["Tab_"+b])+wa(a["Tab_"+b]),P[b].style+="verticalAlign=bottom;",P[b].style=a.Selected==b?P[b].style+"fillColor=#BBBBBB;": -P[b].style+"fillColor=none;";break;case "iOSDatePicker":var Ha=new mxCell("",new mxGeometry(0,0,.5*f,.2*d),"strokeColor=none;fillColor=none;");Ha.vertex=!0;v.insert(Ha);Ha.value=k(a.Option11);Ha.style+=m(a.Option11);var Ia=new mxCell("",new mxGeometry(.5*f,0,.15*f,.2*d),"strokeColor=none;fillColor=none;");Ia.vertex=!0;v.insert(Ia);Ia.value=k(a.Option21);Ia.style+=m(a.Option21);var Ja=new mxCell("",new mxGeometry(.65*f,0,.15*f,.2*d),"strokeColor=none;fillColor=none;");Ja.vertex=!0;v.insert(Ja);Ja.value= -k(a.Option31);Ja.style+=m(a.Option31);var Ka=new mxCell("",new mxGeometry(0,.2*d,.5*f,.2*d),"strokeColor=none;fillColor=none;");Ka.vertex=!0;v.insert(Ka);Ka.value=k(a.Option12);Ka.style+=m(a.Option12);var La=new mxCell("",new mxGeometry(.5*f,.2*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");La.vertex=!0;v.insert(La);La.value=k(a.Option22);La.style+=m(a.Option22);var Ma=new mxCell("",new mxGeometry(.65*f,.2*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Ma.vertex=!0;v.insert(Ma);Ma.value=k(a.Option32); -Ma.style+=m(a.Option32);var aa=new mxCell("",new mxGeometry(0,.4*d,.5*f,.2*d),"strokeColor=none;fillColor=none;");aa.vertex=!0;v.insert(aa);aa.value=k(a.Option13);aa.style+=m(a.Option13);var ba=new mxCell("",new mxGeometry(.5*f,.4*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");ba.vertex=!0;v.insert(ba);ba.value=k(a.Option23);ba.style+=m(a.Option23);var Na=new mxCell("",new mxGeometry(.65*f,.4*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Na.vertex=!0;v.insert(Na);Na.value=k(a.Option33);Na.style+= -m(a.Option33);var ca=new mxCell("",new mxGeometry(.8*f,.4*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");ca.vertex=!0;v.insert(ca);ca.value=k(a.Option43);ca.style+=m(a.Option43);var da=new mxCell("",new mxGeometry(0,.6*d,.5*f,.2*d),"strokeColor=none;fillColor=none;");da.vertex=!0;v.insert(da);da.value=k(a.Option14);da.style+=m(a.Option14);var Oa=new mxCell("",new mxGeometry(.5*f,.6*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Oa.vertex=!0;v.insert(Oa);Oa.value=k(a.Option24);Oa.style+=m(a.Option24); -var Pa=new mxCell("",new mxGeometry(.65*f,.6*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Pa.vertex=!0;v.insert(Pa);Pa.value=k(a.Option34);Pa.style+=m(a.Option34);var Qa=new mxCell("",new mxGeometry(.8*f,.6*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Qa.vertex=!0;v.insert(Qa);Qa.value=k(a.Option44);Qa.style+=m(a.Option44);var ea=new mxCell("",new mxGeometry(0,.8*d,.5*f,.2*d),"strokeColor=none;fillColor=none;");ea.vertex=!0;v.insert(ea);ea.value=k(a.Option15);ea.style+=m(a.Option15);var Ra= -new mxCell("",new mxGeometry(.5*f,.8*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=k(a.Option25);Ra.style+=m(a.Option25);var Sa=new mxCell("",new mxGeometry(.65*f,.8*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=k(a.Option35);Sa.style+=m(a.Option35);Da=new mxCell("",new mxGeometry(0,.4*d-2,f,4),"shape=line;strokeColor=#888888;");Da.vertex=!0;v.insert(Da);Ea=new mxCell("",new mxGeometry(0,.6*d-2,f,4),"shape=line;strokeColor=#888888;"); -Ea.vertex=!0;v.insert(Ea);v.style+=q(a,c)+p(a,c)+"strokeColor=none;";break;case "iOSTimePicker":Ha=new mxCell("",new mxGeometry(0,0,.25*f,.2*d),"strokeColor=none;fillColor=none;");Ha.vertex=!0;v.insert(Ha);Ha.value=k(a.Option11);Ha.style+=m(a.Option11);Ia=new mxCell("",new mxGeometry(.25*f,0,.3*f,.2*d),"strokeColor=none;fillColor=none;");Ia.vertex=!0;v.insert(Ia);Ia.value=k(a.Option21);Ia.style+=m(a.Option21);Ka=new mxCell("",new mxGeometry(0,.2*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");Ka.vertex= -!0;v.insert(Ka);Ka.value=k(a.Option12);Ka.style+=m(a.Option12);La=new mxCell("",new mxGeometry(.25*f,.2*d,.3*f,.2*d),"strokeColor=none;fillColor=none;");La.vertex=!0;v.insert(La);La.value=k(a.Option22);La.style+=m(a.Option22);aa=new mxCell("",new mxGeometry(0,.4*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");aa.vertex=!0;v.insert(aa);aa.value=k(a.Option13);aa.style+=m(a.Option13);ba=new mxCell("",new mxGeometry(.25*f,.4*d,.3*f,.2*d),"strokeColor=none;fillColor=none;");ba.vertex=!0;v.insert(ba); -ba.value=k(a.Option23);ba.style+=m(a.Option23);ca=new mxCell("",new mxGeometry(.7*f,.4*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");ca.vertex=!0;v.insert(ca);ca.value=k(a.Option33);ca.style+=m(a.Option33);da=new mxCell("",new mxGeometry(0,.6*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");da.vertex=!0;v.insert(da);da.value=k(a.Option14);da.style+=m(a.Option14);Oa=new mxCell("",new mxGeometry(.25*f,.6*d,.3*f,.2*d),"strokeColor=none;fillColor=none;");Oa.vertex=!0;v.insert(Oa);Oa.value=k(a.Option24); -Oa.style+=m(a.Option24);Qa=new mxCell("",new mxGeometry(.7*f,.6*d,.15*f,.2*d),"strokeColor=none;fillColor=none;");Qa.vertex=!0;v.insert(Qa);Qa.value=k(a.Option34);Qa.style+=m(a.Option34);ea=new mxCell("",new mxGeometry(0,.8*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");ea.vertex=!0;v.insert(ea);ea.value=k(a.Option15);ea.style+=m(a.Option15);Ra=new mxCell("",new mxGeometry(.25*f,.8*d,.3*f,.2*d),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=k(a.Option25);Ra.style+=m(a.Option25); -Da=new mxCell("",new mxGeometry(0,.4*d-2,f,4),"shape=line;strokeColor=#888888;");Da.vertex=!0;v.insert(Da);Ea=new mxCell("",new mxGeometry(0,.6*d-2,f,4),"shape=line;strokeColor=#888888;");Ea.vertex=!0;v.insert(Ea);v.style+=q(a,c)+p(a,c)+"strokeColor=none;";break;case "iOSCountdownPicker":Ja=new mxCell("",new mxGeometry(.45*f,0,.2*f,.2*d),"strokeColor=none;fillColor=none;");Ja.vertex=!0;v.insert(Ja);Ja.value=k(a.Option31);Ja.style+=m(a.Option31);Ma=new mxCell("",new mxGeometry(.45*f,.2*d,.2*f,.2*d), -"strokeColor=none;fillColor=none;");Ma.vertex=!0;v.insert(Ma);Ma.value=k(a.Option32);Ma.style+=m(a.Option32);aa=new mxCell("",new mxGeometry(0,.4*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");aa.vertex=!0;v.insert(aa);aa.value=k(a.Option13);aa.style+=m(a.Option13);ba=new mxCell("",new mxGeometry(.2*f,.4*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");ba.vertex=!0;v.insert(ba);ba.value=k(a.Option23);ba.style+=m(a.Option23);Na=new mxCell("",new mxGeometry(.45*f,.4*d,.2*f,.2*d),"strokeColor=none;fillColor=none;"); -Na.vertex=!0;v.insert(Na);Na.value=k(a.Option33);Na.style+=m(a.Option33);ca=new mxCell("",new mxGeometry(.6*f,.4*d,.2*f,.2*d),"strokeColor=none;fillColor=none;");ca.vertex=!0;v.insert(ca);ca.value=k(a.Option43);ca.style+=m(a.Option43);da=new mxCell("",new mxGeometry(0,.6*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");da.vertex=!0;v.insert(da);da.value=k(a.Option14);da.style+=m(a.Option14);Pa=new mxCell("",new mxGeometry(.45*f,.6*d,.2*f,.2*d),"strokeColor=none;fillColor=none;");Pa.vertex=!0;v.insert(Pa); -Pa.value=k(a.Option34);Pa.style+=m(a.Option34);ea=new mxCell("",new mxGeometry(0,.8*d,.25*f,.2*d),"strokeColor=none;fillColor=none;");ea.vertex=!0;v.insert(ea);ea.value=k(a.Option15);ea.style+=m(a.Option15);Sa=new mxCell("",new mxGeometry(.45*f,.8*d,.2*f,.2*d),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=k(a.Option35);Sa.style+=m(a.Option35);Da=new mxCell("",new mxGeometry(0,.4*d-2,f,4),"shape=line;strokeColor=#888888;");Da.vertex=!0;v.insert(Da);Ea=new mxCell("",new mxGeometry(0, -.6*d-2,f,4),"shape=line;strokeColor=#888888;");Ea.vertex=!0;v.insert(Ea);v.style+=q(a,c)+p(a,c)+"strokeColor=none;";break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*a.SeparatorInset+";";v.style+=N(a.text)+I(a.text)+M(a.text)+Za(a.text);v.value=k(a.text);switch(a.AccessoryIndicatorType){case "Disclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;"); -J.vertex=!0;v.insert(J);break;case "DetailDisclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);var S=new mxCell("",new mxGeometry(.79*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "DetailIndicator":S=new mxCell("",new mxGeometry(.87*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex= -!0;v.insert(S);break;case "CheckMark":J=new mxCell("",new mxGeometry(.89*f,.37*d,.4*d,.26*d),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),J.vertex=!0,v.insert(J)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.6*a.SeparatorInset+";";v.style+=N(a.subtext)+I(a.subtext)+M(a.subtext);v.value=k(a.subtext);var U=new mxCell("",new mxGeometry(0,.4*d,f,.6*d), -"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*a.SeparatorInset+";");U.vertex=!0;v.insert(U);U.style+=N(a.text)+I(a.text)+M(a.text);U.value=k(a.text);switch(a.AccessoryIndicatorType){case "Disclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);break;case "DetailDisclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;"); -J.vertex=!0;v.insert(J);S=new mxCell("",new mxGeometry(.79*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "DetailIndicator":S=new mxCell("",new mxGeometry(.87*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "CheckMark":J=new mxCell("",new mxGeometry(.89*f,.37*d,.4*d,.26*d),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),J.vertex= -!0,v.insert(J)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*a.SeparatorInset+";";v.style+=N(a.subtext)+I(a.subtext)+M(a.subtext);v.value=k(a.subtext);U=null;switch(a.AccessoryIndicatorType){case "Disclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);U=new mxCell("",new mxGeometry(.55* -f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);S=new mxCell("",new mxGeometry(.79*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);U=new mxCell("",new mxGeometry(.45*f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":S= -new mxCell("",new mxGeometry(.87*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);U=new mxCell("",new mxGeometry(.52*f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":J=new mxCell("",new mxGeometry(.89*f,.37*d,.4*d,.26*d),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");J.vertex=!0;v.insert(J);U=new mxCell("",new mxGeometry(.55*f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;"); -break;default:U=new mxCell("",new mxGeometry(.65*f,0,.3*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;")}U.vertex=!0;v.insert(U);U.style+=N(a.text)+I(a.text)+M(a.text);U.value=k(a.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";var ya=new mxCell("",new mxGeometry(0,0,.25*f,d),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");ya.vertex=!0;v.insert(ya);ya.style+= -N(a.subtext)+I(a.subtext)+M(a.subtext);ya.value=k(a.subtext);U=new mxCell("",new mxGeometry(.25*f,0,.5*f,d),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");U.vertex=!0;v.insert(U);U.style+=N(a.text)+I(a.text)+M(a.text);U.value=k(a.text);switch(a.AccessoryIndicatorType){case "Disclosure":J=new mxCell("",new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);break;case "DetailDisclosure":J=new mxCell("", -new mxGeometry(.91*f,.35*d,.15*d,.3*d),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");J.vertex=!0;v.insert(J);S=new mxCell("",new mxGeometry(.79*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "DetailIndicator":S=new mxCell("",new mxGeometry(.87*f,.25*d,.5*d,.5*d),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");S.vertex=!0;v.insert(S);break;case "CheckMark":J=new mxCell("",new mxGeometry(.89* -f,.37*d,.4*d,.26*d),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),J.vertex=!0,v.insert(J)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";F=new mxCell("",new mxGeometry(0,0,f,.4*d),"fillColor=none;strokeColor=none;spacing=10;align=left;");F.vertex=!0;v.insert(F);F.style+=N(a.text)+I(a.text)+M(a.text);F.value=k(a.text);ia=new mxCell("",new mxGeometry(0,.6*d,f,.4*d),"fillColor=none;strokeColor=none;spacing=10;align=left;"); -ia.vertex=!0;v.insert(ia);ia.style+=N(a["bottom-text"])+I(a["bottom-text"])+M(a["bottom-text"]);ia.value=k(a["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.style+=N(a.text)+I(a.text)+M(a.text);v.value=k(a.text);break;case "SMPage":if(a.Group){v.style+="strokeColor=none;fillColor=none;";var e=new mxCell("",new mxGeometry(0,0,.9*f,.9*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a); -var h=new mxCell("",new mxGeometry(.1*f,.1*d,.9*f,.9*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a);h.value=k(a.Text);a.Future&&(e.style+="dashed=1;",h.style+="dashed=1;")}else a.Future&&(v.style+="dashed=1;"),v.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a),v.value=k(a.Text);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":v.style+= -g(a,c)+q(a,c)+p(a,c)+r(a)+l(a);e=null;switch(n.Class){case "SMHome":e=new mxCell("",new mxGeometry(.5*f-.4*d,.1*d,.8*d,.8*d),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":e=new mxCell("",new mxGeometry(.5*f-.4*d,.19*d,.8*d,.62*d),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":e=new mxCell("",new mxGeometry(.5*f-.4*d,.1*d,.8*d,.8*d),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMSettings":e=new mxCell("",new mxGeometry(.5*f-.35*d,.15*d,.7*d,.7*d),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":e=new mxCell("",new mxGeometry(.5*f-.35*d,.2*d,.7*d,.6*d),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":e=new mxCell("",new mxGeometry(.5*f-.3*d,.25*d,.6*d,.5*d),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMVideo":e=new mxCell("",new mxGeometry(.5*f-.4*d,.2*d,.8*d,.6*d),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":e=new mxCell("",new mxGeometry(.5*f-.3*d,.2*d,.6*d,.6*d),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":e=new mxCell("",new mxGeometry(.5*f-.4*d,.15*d,.8*d,.7*d),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMChart":var w=q(a,c),w=""==w?"#ffffff;":w.replace("fillColor=",""),e=new mxCell("",new mxGeometry(.5*f-.35*d,.15*d,.7*d,.7*d),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+w);break;case "SMCloud":e=new mxCell("",new mxGeometry(.5*f-.4*d,.27*d,.8*d,.46*d),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":e=new mxCell("",new mxGeometry(.5*f-.25*d,.15*d,.5*d,.7*d),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMForm":e=new mxCell("",new mxGeometry(.5*f-.4*d,.15*d,.8*d,.7*d),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":e=new mxCell("",new mxGeometry(.5*f-.4*d,.2*d,.8*d,.6*d),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":e=new mxCell("",new mxGeometry(.5*f-.4*d,.2*d,.8*d,.6*d),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}e.vertex= -!0;v.insert(e);e.style+=m(a);e.value=k(a.Text);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";e=new mxCell("",new mxGeometry(.1*f,0,.9*f,.9*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a);h=new mxCell("",new mxGeometry(0,.1*d,.9*f,.9*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Text);h.value=k(a.Text);break;case "UMLConstraintBlock":var Wb=new mxCell("",new mxGeometry(0,0,.25*d,d),"shape=curlyBracket;rounded=1;"); -Wb.vertex=!0;v.insert(Wb);var Xb=new mxCell("",new mxGeometry(f-.25*d,0,.25*d,d),"shape=curlyBracket;rounded=1;flipH=1;");Xb.vertex=!0;v.insert(Xb);na=new mxCell("",new mxGeometry(.25*d,0,f-.5*d,d),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=k(a);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=V(a,c,v);Wb.style+=g(a,c)+p(a,c)+r(a)+t(a)+l(a);Xb.style+=g(a,c)+p(a,c)+r(a)+t(a)+l(a);na.style+=N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+Va(a)+va(a)+wa(a)+Za(a);break;case "UMLTextBlock":v.style+= -"strokeColor=none;"+p(a,c)+r(a)+t(a)+l(a)+m(a.Text);v.value=k(a.Text);break;case "BPMNActivity":switch(a.bpmnActivityType){case 1:v.style+=q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+l(a)+m(a.Text);v.value=k(a.Text);break;case 2:v.style+="shape=ext;double=1;"+q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+l(a)+m(a.Text);v.value=k(a.Text);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+q(a,c)+g(a,c)+p(a,c)+r(a)+l(a)+m(a.Text);v.value=k(a.Text);break;case 4:v.style+="shape=ext;strokeWidth=2;"+q(a,c)+g(a,c)+p(a,c)+r(a)+ -t(a)+m(a.Text),v.value=k(a.Text)}if(0!=a.bpmnTaskType){switch(a.bpmnTaskType){case 1:e=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");e.geometry.offset=new mxPoint(4,7);break;case 2:e=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");e.geometry.offset=new mxPoint(4,7);break;case 3:e=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");e.geometry.offset=new mxPoint(4,5);break;case 4:e=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;"); -e.geometry.offset=new mxPoint(4,7);break;case 5:e=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");e.geometry.offset=new mxPoint(4,7);break;case 6:e=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");e.geometry.offset=new mxPoint(4,5);break;case 7:e=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),e.geometry.offset=new mxPoint(4,5)}if(1==a.bpmnTaskType){var Nb=q(a,c),w=g(a,c),w=w.replace("strokeColor","fillColor"), -Nb=Nb.replace("fillColor","strokeColor");""==w&&(w="fillColor=#000000;");""==Nb&&(Nb="strokeColor=#ffffff;");e.style+=Nb+w+"part=1;"}else e.style+=q(a,c)+g(a,c)+"part=1;";e.geometry.relative=!0;e.vertex=!0;v.insert(e)}var Ob=0;0!=a.bpmnActivityMarker1&&Ob++;0!=a.bpmnActivityMarker2&&Ob++;var ja=0;1==Ob?ja=-7.5:2==Ob&&(ja=-19);if(0!=a.bpmnActivityMarker1){switch(a.bpmnActivityMarker1){case 1:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+= -q(a,c)+g(a,c);break;case 2:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 3:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 4:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 5:e=new mxCell("", -new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");e.geometry.offset=new mxPoint(ja,-17);w=g(a,c);w=w.replace("strokeColor","fillColor");""==w&&(w="fillColor=#000000;");e.style+=w;break;case 6:e=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),e.geometry.offset=new mxPoint(ja,-18),e.style+=q(a,c)+g(a,c)}e.geometry.relative=!0;e.vertex=!0;v.insert(e)}2==Ob&&(ja=5);if(0!=a.bpmnActivityMarker2){switch(a.bpmnActivityMarker2){case 1:e= -new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 2:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 3:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 4:e=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;"); -e.geometry.offset=new mxPoint(ja,-20);e.style+=q(a,c)+g(a,c);break;case 5:e=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");e.geometry.offset=new mxPoint(ja,-17);w=g(a,c);w=w.replace("strokeColor","fillColor");""==w&&(w="fillColor=#000000;");e.style+=w;break;case 6:e=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),e.geometry.offset=new mxPoint(ja,-18),e.style+=q(a,c)+g(a,c)}e.geometry.relative=!0;e.vertex=!0; -v.insert(e)}break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;"+q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+Va(a)+va(a)+wa(a);v.value=k(a.Text);if(1==a.bpmnDashed)switch(a.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(a.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break; -case 2:v.style+="outline=end;"}switch(a.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;"; -break;case 12:v.style+="symbol=terminate;"}break;case "BPMNConversation":v.style+="shape=hexagon;"+q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);v.style=0==a.bpmnConversationType?v.style+l(a):v.style+"strokeWidth=2;";a.bpmnIsSubConversation&&(e=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),e.geometry.offset=new mxPoint(-6,-17),e.style+=q(a,c)+g(a,c),e.geometry.relative=!0,e.vertex=!0,v.insert(e));break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;"+ -q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+m(a);switch(a.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}break; -case "BPMNData":v.style+="shape=note;size=14;"+q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+m(a);switch(a.bpmnDataType){case 1:e=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");e.geometry.offset=new mxPoint(-6,-15);e.style+=q(a,c)+g(a,c);e.geometry.relative=!0;e.vertex=!0;v.insert(e);break;case 2:e=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");e.geometry.offset=new mxPoint(3,3);e.style+=q(a,c)+g(a,c);e.geometry.relative=!0;e.vertex=!0; -v.insert(e);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";F=new mxCell("",new mxGeometry(0,0,f,20),"strokeColor=none;fillColor=none;");F.geometry.offset=new mxPoint(0,14);F.geometry.relative=!0;F.vertex=!0;v.insert(F);F.value=k(a.Text);F.style+=m(a);break;case 3:e=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),e.geometry.offset=new mxPoint(3,3),e.style+=g(a,c),e.geometry.relative=!0,e.vertex=!0,v.insert(e),w=g(a,c),w=w.replace("strokeColor", -"fillColor"),""==w&&(w="fillColor=#000000;"),e.style+=w,F=new mxCell("",new mxGeometry(0,0,f,20),"strokeColor=none;fillColor=none;"),F.geometry.offset=new mxPoint(0,14),F.geometry.relative=!0,F.vertex=!0,v.insert(F),F.value=k(a.Text),F.style+=m(a)}break;case "BPMNBlackPool":v.style+=q(a,c)+g(a,c)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,f,d),"fillColor=#000000;strokeColor=none;opacity=30;");e.vertex=!0;v.insert(e);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;"; -e=new mxCell("",new mxGeometry(0,0,.95*f,.95*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a);h=new mxCell("",new mxGeometry(.05*f,.05*d,.95*f,.95*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Text);h.value=k(a.Text);break;case "GSDFDDataStoreBlock":v.style+="shape=partialRectangle;right=0;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Text);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,.2*f,d),"part=1;");e.vertex=!0;v.insert(e);e.style+= -g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Number);e.value=k(a.Number);break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==n.Class?v.value=k(a.Text):"VSMProductionControlBlock"==n.Class&&(v.value=k(a.Resources));v.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+va(a)+wa(a)+Za(a);"VSMDedicatedProcessBlock"==n.Class&&(e=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"), -e.geometry.relative=!0,e.geometry.offset=new mxPoint(4,-13),e.vertex=!0,v.insert(e),e.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a));F=new mxCell("",new mxGeometry(0,0,f,15),"strokeColor=none;fillColor=none;part=1;");F.vertex=!0;v.insert(F);F.value=k(a.Title);F.style+=m(a.Title);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=k(a.Text);v.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+va(a)+ -Va(a)+wa(a);F=new mxCell("",new mxGeometry(.1*f,.3*d,.8*f,.6*d),"part=1;");F.vertex=!0;v.insert(F);F.value=k(a.Resource);F.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a.Resource);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+va(a)+wa(a);v.value=k(a.Text);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";var fa= -d,Fa=parseInt(a.Cells),A=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+"part=1;";0<Fa&&(fa/=Fa);x=[];T=[];for(b=1;b<=Fa;b++)x[b]=new mxCell("",new mxGeometry(0,(b-1)*fa,f,fa),A),x[b].vertex=!0,v.insert(x[b]),x[b].value=k(a["cell_"+b]),x[b].style+=m(a["cell_"+b]);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+N(a)+I(a)+M(a)+ha(a)+ta(a)+ua(a)+Va(a)+va(a)+wa(a);v.value=k(a.Text);break;case "VSMSupermarketBlock":v.style+= -"strokeColor=none;"+q(a,c);fa=d;Fa=parseInt(a.Cells);A=g(a,c)+p(a,c)+l(a)+"part=1;fillColor=none;";0<Fa&&(fa/=Fa);x=[];ya=[];for(b=1;b<=Fa;b++)x[b]=new mxCell("",new mxGeometry(.5*f,(b-1)*fa,.5*f,fa),"shape=partialRectangle;left=0;"+A),x[b].vertex=!0,v.insert(x[b]),ya[b]=new mxCell("",new mxGeometry(0,(b-1)*fa,f,fa),"strokeColor=none;fillColor=none;part=1;"),ya[b].vertex=!0,v.insert(ya[b]),ya[b].value=k(a["cell_"+b]),ya[b].style+=m(a["cell_"+b]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18"; -v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.17*f,.2*d,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+p(a,c)+l(a);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";A="shape=card;size=18;flipH=1;part=1;"+g(a,c)+q(a,c)+p(a,c)+l(a);e=new mxCell("", -new mxGeometry(.1*f,0,.9*f,.8*d),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;");e.vertex=!0;v.insert(e);e.style+=A;h=new mxCell("",new mxGeometry(.05*f,.1*d,.9*f,.8*d),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;");h.vertex=!0;v.insert(h);h.style+=A;var u=new mxCell("",new mxGeometry(0,.2*d,.9*f,.8*d),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;");u.vertex=!0;v.insert(u);u.style+=A+ -m(a);u.value=k(a.Text);break;case "AWSRoundedRectangleContainerBlock2":v.style+="strokeColor=none;fillColor=none;";a.Spotfleet?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"), -h.geometry.relative=!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.Beanstalk?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"), -h.geometry.relative=!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.EC2?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),h.geometry.relative= -!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.Subnet?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),h.geometry.relative= -!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.VPC?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),h.geometry.relative= -!0,h.geometry.offset=new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.AWS?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),h.geometry.relative=!0,h.geometry.offset= -new mxPoint(30,0),h.vertex=!0,v.insert(h)):a.Corporate?(e=new mxCell("",new mxGeometry(0,0,f,d-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),e.geometry.offset=new mxPoint(0,20),e.geometry.relative=!0,e.vertex=!0,v.insert(e),e.style+=g(a,c)+m(a.Title)+t(a)+l(a),e.value=k(a.Title),h=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),h.geometry.relative=!0,h.geometry.offset= -new mxPoint(30,0),h.vertex=!0,v.insert(h)):(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"+g(a,c)+m(a.Title)+t(a)+l(a),v.value=k(a.Title));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+m(a.Title)+q(a,c)+p(a,c)+r(a);v.value=k(a.Title);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+ -m(a.Title)+q(a,c)+p(a,c)+r(a);v.value=k(a.Title);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+m(a.Title)+q(a,c)+p(a,c)+r(a);v.value=k(a.Title);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";var K=new mxCell("",new mxGeometry(.25*f,.25*d,.5*f,.5*d),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");K.vertex=!0;v.insert(K);var O=[K];K.style+=q(a, -c);var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");G.geometry.relative=!0;G.edge=!0;Ta(.5*f,0,G,D,z,O,v,K);Ta(.855*f,.145*d,G,D,z,O,v,K);Ta(f,.5*d,G,D,z,O,v,K);Ta(.855*f,.855*d,G,D,z,O,v,K);Ta(.5*f,d,G,D,z,O,v,K);Ta(.145*f,.855*d,G,D,z,O,v,K);Ta(0,.5*d,G,D,z,O,v,K);Ta(.145*f,.145*d,G,D,z,O,v,K);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";K=new mxCell("",new mxGeometry(0,.5*d-10,f,20), -"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");K.vertex=!0;v.insert(K);O=[K];G=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");G.geometry.relative=!0;G.edge=!0;for(var O=[K],Pb=f/a.NumTopNodes,b=0;b<a.NumTopNodes;b++)Ta(.5*Pb+b*Pb,0,G,D,z,O,v,K);Pb=f/a.NumBottomNodes;for(b=0;b<a.NumBottomNodes;b++)Ta(.5* -Pb+b*Pb,d,G,D,z,O,v,K);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+m(a);v.value=k(a.Title);a.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);"EIMessageChannelBlock"== -n.Class?(e=new mxCell("",new mxGeometry(.5,.5,.9*f,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),e.geometry.offset=new mxPoint(.45*-f,0)):"EIDatatypeChannelBlock"==n.Class?(e=new mxCell("",new mxGeometry(.5,.5,.9*f,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),e.geometry.offset=new mxPoint(.45*-f,0)):"EIInvalidMessageChannelBlock"==n.Class?(e=new mxCell("",new mxGeometry(.5,.5,.9*f,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),e.geometry.offset= -new mxPoint(.45*-f,0)):"EIDeadLetterChannelBlock"==n.Class?(e=new mxCell("",new mxGeometry(.5,.5,.9*f,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),e.geometry.offset=new mxPoint(.45*-f,0)):"EIGuaranteedDeliveryBlock"==n.Class&&(e=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),e.geometry.offset=new mxPoint(-10,-7));e.geometry.relative=!0;e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a);G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); -G.geometry.relative=!0;G.edge=!0;W(.15*f,.25*d,.85*f,.25*d,G,D,z,O,v,K);break;case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,.07*d,.21*f,.86*d),"fillColor=#FFFF33;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a)+t(a);h=new mxCell("",new mxGeometry(.26*f,.09*d,.2*f,.82*d),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");h.vertex=!0;v.insert(h); -h.style+=g(a,c)+p(a,c)+l(a)+t(a);u=new mxCell("",new mxGeometry(1,.5,.35*f,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");u.geometry.relative=!0;u.geometry.offset=new mxPoint(.4*-f,-10);u.vertex=!0;v.insert(u);u.style+=g(a,c)+p(a,c)+l(a)+t(a);C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");C.geometry.relative=!0;C.edge=!0;e.insertEdge(C,!0);h.insertEdge(C, -!1);C.style+=g(a,c);D.push(z.addCell(C,null,null,null,null));B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");B.geometry.relative=!0;B.edge=!0;h.insertEdge(B,!0);u.insertEdge(B,!1);D.push(z.addCell(B,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+= -"strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);for(var Qb=a.Messages,ic=(d-17)/Qb,h=[],G=[],b=0;b<Qb;b++){var Rb=ic*(b+1)-3;h[b]=new mxCell("",new mxGeometry(f-20,Rb,20,20),"part=1;");h[b].vertex=!0;v.insert(h[b]);h[b].style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a);switch(n.Class){case "EIMessageBlock":h[b].value=k(a["message_"+ -(b+1)]);h.style+=m(a["message_"+(b+1)]);break;case "EICommandMessageBlock":h[b].value="C";h[b].style+="fontStyle=1;fontSize=10;";break;case "EIDocumentMessageBlock":h[b].value="D";h[b].style+="fontStyle=1;fontSize=10;";break;case "EIEventMessageBlock":h[b].value="E",h[b].style+="fontStyle=1;fontSize=10;"}G[b]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");G[b].geometry.relative=!0;G[b].edge=!0;e.insertEdge(G[b],!1); -h[b].insertEdge(G[b],!0);G[b].style+=g(a,c)+l(a);var bb=[];bb.push(new mxPoint(Aa+8.5,Ba+Rb+10));G[b].geometry.points=bb;D.push(z.addCell(G[b],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.45*f,.25*d,.3*f,.5*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a);G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); -G.geometry.relative=!0;G.edge=!0;W(0,.5*d,.4*f,.5*d,G,D,z,O,v,K);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");C.geometry.relative=!0;C.edge=!0;W(.05*f,.5*d,.85*f,.5*d,C,D,z,O,v,K);var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); -B.geometry.relative=!0;B.edge=!0;W(.05*f,.5*d,.85*f,.15*d,B,D,z,O,v,K);var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");L.geometry.relative=!0;L.edge=!0;W(.05*f,.5*d,.85*f,.85*d,L,D,z,O,v,K);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); -C.geometry.relative=!0;C.edge=!0;C.style+=g(a,c);W(.05*f,.5*d,.95*f,.5*d,C,D,z,O,v,K);B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");B.geometry.relative=!0;B.edge=!0;B.style+=g(a,c);W(.3*f,.1*d,.3*f,.5*d,B,D,z,O,v,K);L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); -L.geometry.relative=!0;L.edge=!0;L.style+=g(a,c);W(.7*f,.1*d,.7*f,.5*d,L,D,z,O,v,K);var X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");X.geometry.relative=!0;X.edge=!0;X.style+=g(a,c);W(.5*f,.5*d,.5*f,.9*d,X,D,z,O,v,K);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text); -e=new mxCell("",new mxGeometry(.2*f,.21*d,.16*f,.24*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a);C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");C.geometry.relative=!0;C.edge=!0;W(.45*f,.33*d,.8*f,.33*d,C,D,z,O,v,K);h=new mxCell("",new mxGeometry(.64*f,.55*d,.16*f,.24*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+p(a,c)+l(a);B=new mxCell("",new mxGeometry(0,0,0,0), -"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");B.geometry.relative=!0;B.edge=!0;W(.55*f,.67*d,.2*f,.67*d,B,D,z,O,v,K);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.1*f,.15*d,.8*f,.7*d),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+p(a,c)+l(a);break; -case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.04*f,.06*d,.18*f,.28*d),"shape=ellipse;fillColor=#808080;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);h=new mxCell("",new mxGeometry(.2*f,.56*d,.2*f,.32*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+p(a,c)+l(a)+t(a);h.value="A";h.style+="fontStyle=1;fontSize=10;";C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;"); -C.geometry.relative=!0;C.edge=!0;e.insertEdge(C,!1);h.insertEdge(C,!0);C.style+=g(a,c)+l(a);bb=[];bb.push(new mxPoint(Aa+.13*f,Ba+.72*d));C.geometry.points=bb;D.push(z.addCell(C,null,null,null,null));u=new mxCell("",new mxGeometry(.6*f,.06*d,.18*f,.28*d),"shape=ellipse;fillColor=#808080;part=1;");u.vertex=!0;v.insert(u);u.style+=g(a,c)+l(a);E=new mxCell("",new mxGeometry(.76*f,.56*d,.2*f,.32*d),"part=1;");E.vertex=!0;v.insert(E);E.style+=g(a,c)+p(a,c)+l(a)+t(a);E.value="B";E.style+="fontStyle=1;fontSize=10;"; -B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");B.geometry.relative=!0;B.edge=!0;u.insertEdge(B,!1);E.insertEdge(B,!0);B.style+=g(a,c)+l(a);var Vb=[];Vb.push(new mxPoint(Aa+.69*f,Ba+.72*d));B.geometry.points=Vb;D.push(z.addCell(B,null,null,null,null));L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");L.geometry.relative=!0;L.edge=!0;e.insertEdge(L, -!1);u.insertEdge(L,!0);L.style+=g(a,c)+l(a);D.push(z.addCell(L,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("1",new mxGeometry(.2*f,.4*d,.1*f,.19*d),"fontStyle=1;fontSize=10;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);h=new mxCell("2",new mxGeometry(.45*f,.4*d,.1*f,.19*d),"fontStyle=1;fontSize=10;part=1;");h.vertex=!0;v.insert(h);h.style+=g(a,c)+ -l(a);u=new mxCell("3",new mxGeometry(.7*f,.4*d,.1*f,.19*d),"fontStyle=1;fontSize=10;part=1;");u.vertex=!0;v.insert(u);u.style+=g(a,c)+l(a);C=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");e.insertEdge(C,!1);h.insertEdge(C,!0);C.geometry.points=[new mxPoint(Aa+.375*f,Ba+.15*d)];C.geometry.relative=!0;C.edge=!0;C.style+=g(a,c)+l(a);D.push(z.addCell(C,null,null,null,null));B=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;"); -h.insertEdge(B,!1);u.insertEdge(B,!0);B.geometry.points=[new mxPoint(Aa+.675*f,Ba+.15*d)];B.geometry.relative=!0;B.edge=!0;B.style+=g(a,c)+l(a);D.push(z.addCell(B,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.3*f,.2*d,.4*f,.6*d),"shape=mxgraph.ios7.icons.clock;flipH=1;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);break;case "EIMessageBrokerBlock":v.style+= -"strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+N(a)+I(a)+M(a)+ha(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.38*f,.42*d,.24*f,.16*d),"part=1;fillColor=#aefe7d;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);h=new mxCell("",new mxGeometry(.38*f,0,.24*f,.16*d),"part=1;");h.vertex=!0;v.insert(h);h.style+=q(a,c)+g(a,c)+l(a);u=new mxCell("",new mxGeometry(.76*f,.23*d,.24*f,.16*d),"part=1;");u.vertex=!0;v.insert(u);u.style=h.style;var E=new mxCell("",new mxGeometry(.76* -f,.61*d,.24*f,.16*d),"part=1;");E.vertex=!0;v.insert(E);E.style=h.style;var Yb=new mxCell("",new mxGeometry(.38*f,.84*d,.24*f,.16*d),"part=1;");Yb.vertex=!0;v.insert(Yb);Yb.style=h.style;var Zb=new mxCell("",new mxGeometry(0,.61*d,.24*f,.16*d),"part=1;");Zb.vertex=!0;v.insert(Zb);Zb.style=h.style;var $b=new mxCell("",new mxGeometry(0,.23*d,.24*f,.16*d),"part=1;");$b.vertex=!0;v.insert($b);$b.style=h.style;C=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(C,!1);h.insertEdge(C, -!0);C.edge=!0;C.style+=g(a,c)+l(a);D.push(z.addCell(C,null,null,null,null));B=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(B,!1);u.insertEdge(B,!0);B.edge=!0;B.style+=g(a,c)+l(a);D.push(z.addCell(B,null,null,null,null));L=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(L,!1);E.insertEdge(L,!0);L.edge=!0;L.style+=g(a,c)+l(a);D.push(z.addCell(L,null,null,null,null));X=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(X, -!1);Yb.insertEdge(X,!0);X.edge=!0;X.style+=g(a,c)+l(a);D.push(z.addCell(X,null,null,null,null));var tb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(tb,!1);Zb.insertEdge(tb,!0);tb.edge=!0;tb.style+=g(a,c)+l(a);D.push(z.addCell(tb,null,null,null,null));var ub=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");e.insertEdge(ub,!1);$b.insertEdge(ub,!0);ub.edge=!0;ub.style+=g(a,c)+l(a);D.push(z.addCell(ub,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+= -"verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");C.geometry.relative=!0;C.edge=!0;W(.05*f,.5*d,.6*f,.25*d,C,D,z,O,v,K);B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");B.geometry.relative=!0;B.edge=!0;W(.05*f,.5*d,.6*f,.75*d,B,D,z,O,v,K);e=new mxCell("",new mxGeometry(.7* -f,.1*d,.15*f,.32*d),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.25*f,.25*d,.5*f,.5*d),"shape=mxgraph.eip.control_bus;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+ -m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);u=new mxCell("",new mxGeometry(f-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");u.vertex=!0;v.insert(u);u.style+=g(a,c)+l(a);L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");L.geometry.relative=!0;L.edge=!0;e.insertEdge(L,!1);u.insertEdge(L, -!0);L.style+=g(a,c)+l(a);L.geometry.points=[new mxPoint(Aa+8.5,Ba+40)];D.push(z.addCell(L,null,null,null,null));E=new mxCell("",new mxGeometry(f-45,d-20,20,20),"part=1;");E.vertex=!0;v.insert(E);E.value=k(a.message_0);E.style+=m(a.message_0);E.style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a);X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");X.geometry.relative=!0;X.edge=!0;e.insertEdge(X,!1);E.insertEdge(X,!0);X.style+=g(a, -c)+l(a);X.geometry.points=[new mxPoint(Aa+8.5,Ba+d-10)];D.push(z.addCell(X,null,null,null,null));Qb=a.HistoryMessages;ic=(d-75)/Qb;h=[];G=[];for(b=0;b<Qb;b++)Rb=ic*(b+1)+30,h[b]=new mxCell("",new mxGeometry(f-20,Rb,20,20),"part=1;"),h[b].vertex=!0,h[b].value=k(a["message_"+(b+1)]),h.style+=m(a["message_"+(b+1)]),v.insert(h[b]),h[b].style+=g(a,c)+q(a,c)+p(a,c)+r(a)+l(a)+t(a),G[b]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"), -G[b].geometry.relative=!0,G[b].edge=!0,u.insertEdge(G[b],!1),h[b].insertEdge(G[b],!0),G[b].style+=g(a,c)+l(a),bb=[],bb.push(new mxPoint(Aa+f-30,Ba+Rb+10)),G[b].geometry.points=bb,D.push(z.addCell(G[b],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;"+g(a,c)+p(a,c)+r(a)+l(a)+V(a,c,v);t(a);0>a.DoorAngle&&(v.style+="flipV=1;");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;"+g(a,c)+p(a,c)+r(a)+l(a)+V(a,c,v)+t(a);0<a.DoorAngle&&(v.style+="flipV=1;"); -break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;"+V(a,c,v);e=new mxCell("",new mxGeometry(0,0,f,.25*d),"part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a);for(var h=[],rc=.02*f,jc=(f-2*rc)/a.LightCount,sc=.8*jc,b=0;b<a.LightCount;b++)h[b]=new mxCell("",new mxGeometry(rc+jc*b+(jc-sc)/2,.25*d,sc,.75*d),"part=1;shape=ellipse;"),h[b].vertex=!0,v.insert(h[b]),h[b].style+=g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;"+ -V(a,c,v);for(var e=[],tc=f/a.SinkCount,b=0;b<a.SinkCount;b++)e[b]=new mxCell("",new mxGeometry(tc*b,0,tc,d),"part=1;shape=mxgraph.floorplan.sink_2;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var ka=.1*f/a.StallCount,e=new mxCell("",new mxGeometry(0,0,ka,d),"fillColor=#000000;part=1;");e.vertex=!0;v.insert(e);e.style+=g(a,c)+l(a);for(var sa=(f-ka)/a.StallCount,kc=[],Sb=[],Tb=[],Ub=[],w=g(a, -c),w=""==w?"#000000;":w.replace("stokreColor=",""),cc="part=1;fillColor="+w+g(a,c)+l(a),lc=q(a,c)+g(a,c)+l(a),b=0;b<a.StallCount;b++)kc[b]=new mxCell("",new mxGeometry((b+1)*sa,0,ka,d),cc),kc[b].vertex=!0,v.insert(kc[b]),Tb[b]=new mxCell("",new mxGeometry(ka+b*sa+.05*(sa-ka),d-.92*(sa-ka),.9*(sa-ka),.92*(sa-ka)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Tb[b].vertex=!0,v.insert(Tb[b]),Tb[b].style+=lc,Sb[b]=new mxCell("",new mxGeometry(ka+b*sa+.2*(sa-ka),0,.6*(sa-ka),.8*(sa-ka)),"shape=mxgraph.floorplan.toilet;part=1;"), -Sb[b].vertex=!0,v.insert(Sb[b]),Sb[b].style+=lc,Ub[b]=new mxCell("",new mxGeometry(ka+b*sa,.42*d,.15*(sa-ka),.12*(sa-ka)),"part=1;"),Ub[b].vertex=!0,v.insert(Ub[b]),Ub[b].style+=lc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ac="edgeStyle=none;endArrow=none;part=1;"+g(a,c)+l(a)+p(a,c)+r(a)+t(a),w=g(a,c),w=""==w?"#000000;":w.replace("stokreColor=",""),mc="shape=triangle;part=1;fillColor="+w+g(a,c)+l(a)+p(a,c)+r(a)+t(a),C=new mxCell("",new mxGeometry(0,0,0,0),ac);C.geometry.relative= -!0;C.edge=!0;W(0,.5*d,.65*f,.5*d,C,D,z,O,v,K);for(var y=d/a.numLines,B=[],fb=[],b=0;b<a.numLines;b++)B[b]=new mxCell("",new mxGeometry(0,0,0,0),ac),B[b].geometry.relative=!0,B[b].edge=!0,W(.65*f,.5*d,.96*f,(b+.5)*y,B[b],D,z,O,v,K),fb[b]=new mxCell("",new mxGeometry(.95*f,(b+.2)*y,.05*f,.6*y),mc),fb[b].vertex=!0,v.insert(fb[b]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";ac="edgeStyle=none;endArrow=none;part=1;"+g(a,c)+l(a)+p(a,c)+r(a)+t(a);w=g(a,c);w=""==w?"#000000;":w.replace("stokreColor=", -"");mc="shape=triangle;part=1;fillColor="+w+g(a,c)+l(a)+p(a,c)+r(a)+t(a);y=d/a.numLines;B=[];fb=[];for(b=0;b<a.numLines;b++)B[b]=new mxCell("",new mxGeometry(0,0,0,0),ac),B[b].geometry.relative=!0,B[b].edge=!0,W(0,(b+.5)*y,.96*f,(b+.5)*y,B[b],D,z,O,v,K),fb[b]=new mxCell("",new mxGeometry(.95*f,(b+.2)*y,.05*f,.6*y),mc),fb[b].vertex=!0,v.insert(fb[b]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);switch(a.vesselType){case 1:v.style+= -"shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;size=0.10;direction=south;"}break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);1==a.peakedRoof&&0==a.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==a.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ -g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a)+m(a);v.value=k(a.Text);v.style=0==a.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;"+V(a,c,v)+m(a);v.value=k(a.Text);A=g(a,c)+q(a,c)+l(a)+p(a,c)+r(a)+t(a);e=new mxCell("",new mxGeometry(0,.2*d,f,.6*d),"part=1;shape=trapezoid;direction=south;");e.vertex=!0;v.insert(e);e.style+=A;A+="endSize=4;endArrow=block;endFill=1;";0== -a.compressorType?(C=new mxCell("",new mxGeometry(0,0,0,0),""),C.geometry.relative=!0,C.edge=!0,C.style+=A,W(0,0,0,.2*d,C,D,z,O,v,K),B=new mxCell("",new mxGeometry(0,0,0,0),""),B.geometry.relative=!0,B.edge=!0,B.style+=A,W(f,.67*d,f,d,B,D,z,O,v,K)):(e.style+="flipH=1;",C=new mxCell("",new mxGeometry(0,0,0,0),""),C.geometry.relative=!0,C.edge=!0,C.style+=A,W(0,0,0,.33*d,C,D,z,O,v,K),B=new mxCell("",new mxGeometry(0,0,0,0),""),B.geometry.relative=!0,B.edge=!0,B.style+=A,W(f,.8*d,f,d,B,D,z,O,v,K));1== -a.centerLineType&&(L=new mxCell("",new mxGeometry(0,0,0,0),""),L.geometry.relative=!0,L.edge=!0,L.style+=A,W(.2*f,.5*d,.8*f,.5*d,L,D,z,O,v,K));break;case "PEMotorDrivenTurbineBlock":A=g(a,c)+q(a,c)+l(a)+p(a,c)+t(a);v.style+="shape=ellipse;"+r(a)+V(a,c,v)+m(a);v.value=k(a.Text);e=new mxCell("",new mxGeometry(.2*f,.2*d,.6*f,.6*d),"part=1;shape=trapezoid;direction=south;");e.vertex=!0;v.insert(e);e.style+=A;break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":A= -p(a,c);v.style+=A+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);switch(n.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+= -"shape=mxgraph.pid2inst.progLogCont;"}"PEIndicator2Block"==n.Class||"PESharedIndicator2Block"==n.Class?(e=new mxCell("",new mxGeometry(0,0,f,.5*f),"part=1;strokeColor=none;fillColor=none;"),e.vertex=!0,v.insert(e),e.style+=A+m(a.TopText),e.value=k(a.TopText),h=new mxCell("",new mxGeometry(0,.5*f,f,.5*f),"part=1;strokeColor=none;fillColor=none;")):(e=new mxCell("",new mxGeometry(0,0,f,.5*d),"part=1;strokeColor=none;fillColor=none;"),e.vertex=!0,v.insert(e),e.style+=A+m(a.TopText),e.value=k(a.TopText), -h=new mxCell("",new mxGeometry(0,.5*d,f,.5*d),"part=1;strokeColor=none;fillColor=none;"));h.vertex=!0;v.insert(h);h.style+=A;m(a.BotText);h.value=k(a.BotText);switch(a.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var nc=!1;"PEPoweredValveBlock"== -n.Class?1!=a.poweredHandOperated&&(nc=!0):1!=a.handOperated&&(nc=!0);if(nc){var a=cb(n).Properties,ma=a.BoundingBox,ec=ma.h;ma.h="PEAngleValveBlock"==n.Class||"PEAngleGlobeValveBlock"==n.Class?.7*ma.h:.6*ma.h;v=new mxCell("",new mxGeometry(Math.round(.6*ma.x+0),Math.round(.6*(ma.y+ec-ma.h)+0),Math.round(.6*ma.w),Math.round(.6*ma.h)),"");v.vertex=!0;gc(v,n)}if("PEPoweredValveBlock"==n.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;"+p(a,c)+g(a,c)+q(a, -c)+l(a)+t(a)+r(a)+V(a,c,v),1==a.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",e=new mxCell("",new mxGeometry(.325*f,0,.35*f,.35*d),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),e.vertex=!0,v.insert(e),e.style+=A+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+"fontSize=6;"+I(a.PoweredText)+M(a.PoweredText)+ha(a.PoweredText)+ta(a.PoweredText)+ua(a.PoweredText)+va(a.PoweredText)+wa(a.PoweredText)+Za(a.PoweredText),e.value=k(a.PoweredText)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;"+ -p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v)+N(a)+I(a)+M(a)+ha(a);v.value=k(a.Text);switch(n.Class){case "PEGateValveBlock":v.style+="valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==a.handOperated&&(v.style+="actuator=man;")}break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;"+p(a,c)+g(a,c)+ -q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);1==a.vScroll&&(u=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,110),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;");1==a.hScroll&&(E=1==a.vScroll?new mxCell("",new mxGeometry(0, -1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(0,-20),E.vertex=!0,v.insert(E));break;case "UI2WindowBlock":v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v)+N(a.Title)+I(a.Title)+M(a.Title);v.value= -k(a.Title);1==a.vScroll&&(u=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,30),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;");1==a.hScroll&&(E=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"): -new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(0,-20),E.vertex=!0,v.insert(E));break;case "UI2DialogBlock":v.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v)+m(a.Text);v.value=k(a.Text);e=new mxCell("",new mxGeometry(0,0,f,30),"part=1;resizeHeight=0;");e.vertex=!0;v.insert(e);e.style+=A+m(a.Title);e.value=k(a.Title);h=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;"); -h.geometry.relative=!0;h.geometry.offset=new mxPoint(-25,-10);h.vertex=!0;e.insert(h);1==a.vScroll&&(u=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,30),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;"); -1==a.hScroll&&(E=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(0,-20),E.vertex=!0,v.insert(E));break;case "UI2AccordionBlock":v.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);e=[];y=25;for(b=0;b<=a.Panels-1;b++)e[b]=b<a.Selected-1?new mxCell("", -new mxGeometry(0,b*y,f,y),"part=1;fillColor=#000000;fillOpacity=25;"):b==a.Selected-1?new mxCell("",new mxGeometry(0,b*y,f,y),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,d-(a.Panels-a.Selected)*y+(b-a.Selected)*y,f,y),"part=1;fillColor=#000000;fillOpacity=25;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=m(a["Panel_"+(b+1)]),e[b].value=k(a["Panel_"+(b+1)]),e[b].style.includes(";align=")||(e[b].style+="align=left;spacingLeft=5;");var R=g(a,c),R=R.replace("strokeColor","fillColor2");""== -R&&(R="fillColor2=#000000;");1==a.vScroll&&(h=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-a.Selected*y-20-(a.Panels-a.Selected)*y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-a.Selected*y-(a.Panels-a.Selected)*y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),h.geometry.relative=!0,h.geometry.offset=new mxPoint(-20,a.Selected*y),h.vertex=!0,v.insert(h),v.style+= -"spacingRight=20;",h.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));1==a.hScroll&&(u=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(0,-20-(a.Panels-a.Selected)*y),u.vertex=!0,v.insert(u),u.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));E=1==a.vScroll?new mxCell("", -new mxGeometry(0,a.Selected*y,f-20,d-a.Selected*y-20-(a.Panels-a.Selected)*y),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,a.Selected*y,f-20,d-a.Selected*y-(a.Panels-a.Selected)*y),"part=1;fillColor=none;strokeColor=none;");E.vertex=!0;v.insert(E);E.style+=m(a.Content_1);E.style.includes(";align=")||(E.style+="align=left;spacingLeft=5;");E.value=k(a.Content_1);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var e=[],h=[],y=25,pa=3,H=(f+ -pa)/(a.Tabs+1),qa=new mxCell("",new mxGeometry(0,y,f,d-y),"part=1;");qa.vertex=!0;v.insert(qa);qa.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);for(b=0;b<=a.Tabs-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(10+b*H,0,H-pa,y),""),h[b].vertex=!0,v.insert(h[b]),h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Tab_"+(b+1)])):(e[b]=new mxCell("",new mxGeometry(10+b*H,0,H-pa,y),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a),h[b]=new mxCell("",new mxGeometry(0, -0,H-pa,y),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Tab_"+(b+1)])),h[b].value=k(a["Tab_"+(b+1)]),h[b].style.includes(";align=")||(h[b].style+="align=left;spacingLeft=2;");R=g(a,c);R=R.replace("strokeColor","fillColor2");""==R&&(R="fillColor2=#000000;");1==a.vScroll&&(h=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-20-y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1, -0,20,d-y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),h.geometry.relative=!0,h.geometry.offset=new mxPoint(-20,y),h.vertex=!0,v.insert(h),v.style+="spacingRight=20;",h.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));1==a.hScroll&&(u=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), -u.geometry.relative=!0,u.geometry.offset=new mxPoint(0,-20),u.vertex=!0,v.insert(u),u.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";e=[];h=[];y=25;pa=3;H=(f+pa)/a.Tabs;qa=new mxCell("",new mxGeometry(0,y,f,d-y),"part=1;");qa.vertex=!0;v.insert(qa);qa.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);for(b=0;b<=a.Tabs-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(b*H,0,H-pa,y),""),h[b].vertex=!0,v.insert(h[b]), -h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Tab_"+(b+1)])):(e[b]=new mxCell("",new mxGeometry(b*H,0,H-pa,y),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a),h[b]=new mxCell("",new mxGeometry(0,0,H-pa,y),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Tab_"+(b+1)])),h[b].value=k(a["Tab_"+(b+1)]),h[b].style.includes(";align=")||(h[b].style+="align=left;spacingLeft=2;");R=g(a,c);R=R.replace("strokeColor", -"fillColor2");""==R&&(R="fillColor2=#000000;");1==a.vScroll&&(h=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-20-y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,d-y),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),h.geometry.relative=!0,h.geometry.offset=new mxPoint(-20,y),h.vertex=!0,v.insert(h),v.style+="spacingRight=20;",h.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)); -1==a.hScroll&&(u=1==a.vScroll?new mxCell("",new mxGeometry(0,1,f-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,f,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(0,-20),u.vertex=!0,v.insert(u),u.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";e=[];h=[];pa=3;y=25+pa;H=80;Wa= -10;qa=new mxCell("",new mxGeometry(H,0,f-H,d),"part=1;");qa.vertex=!0;v.insert(qa);qa.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v);for(b=0;b<=a.Tabs-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(0,Wa+b*y,H,y-pa),""),h[b].vertex=!0,v.insert(h[b]),h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Tab_"+(b+1)])):(e[b]=new mxCell("",new mxGeometry(0,Wa+b*y,H,y-pa),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a),h[b]=new mxCell("",new mxGeometry(0, -0,H,y-pa),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Tab_"+(b+1)])),h[b].value=k(a["Tab_"+(b+1)]),h[b].style.includes(";align=")||(h[b].style+="align=left;spacingLeft=2;");R=g(a,c);R=R.replace("strokeColor","fillColor2");""==R&&(R="fillColor2=#000000;");1==a.vScroll&&(h=1==a.hScroll?new mxCell("",new mxGeometry(1,0,20,d-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1, -0,20,d),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),h.geometry.relative=!0,h.geometry.offset=new mxPoint(-20,0),h.vertex=!0,v.insert(h),v.style+="spacingRight=20;",h.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));1==a.hScroll&&(u=1==a.vScroll?new mxCell("",new mxGeometry(H,1,f-20-H,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(H,1,f-H,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), -u.geometry.relative=!0,u.geometry.offset=new mxPoint(0,-20),u.vertex=!0,v.insert(u),u.style+=R+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";y=d/a.Options;e=[];h=[];for(b=0;b<a.Options;b++)e[b]=new mxCell("",new mxGeometry(0,b*y+.5*y-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Option_"+ -(b+1)]),null!=a.Selected[b+1]&&1==a.Selected[b+1]&&(w=g(a,c),w=w.replace("strokeColor","fillColor"),""==w&&(w="fillColor=#000000;"),h[b]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=w+p(a,c)+g(a,c)+l(a)+t(a)),e[b].value=k(a["Option_"+(b+1)]);break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";H=f/a.Options;e=[];h=[];for(b=0;b<a.Options;b++)e[b]=new mxCell("",new mxGeometry(b*H,.5* -d-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Option_"+(b+1)]),null!=a.Selected[b+1]&&1==a.Selected[b+1]&&(w=g(a,c),w=w.replace("strokeColor","fillColor"),""==w&&(w="fillColor=#000000;"),h[b]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=w+p(a,c)+g(a,c)+l(a)+t(a)), -e[b].value=k(a["Option_"+(b+1)]);break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";y=d/a.Options;e=[];h=[];for(b=0;b<a.Options;b++)e[b]=new mxCell("",new mxGeometry(0,b*y+.5*y-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Option_"+(b+1)]),null!=a.Selected&&a.Selected==b+1&&(w=g(a,c),w=w.replace("strokeColor","fillColor"), -""==w&&(w="fillColor=#000000;"),h[b]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=w+p(a,c)+g(a,c)+l(a)+t(a)),e[b].value=k(a["Option_"+(b+1)]);break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";H=f/a.Options;e=[];h=[];for(b=0;b<a.Options;b++)e[b]=new mxCell("",new mxGeometry(b*H,.5*d-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), -e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Option_"+(b+1)]),null!=a.Selected&&a.Selected==b+1&&(w=g(a,c),w=w.replace("strokeColor","fillColor"),""==w&&(w="fillColor=#000000;"),h[b]=new mxCell("",new mxGeometry(2,2,6,6),"shape=ellipse;part=1;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=w+p(a,c)+g(a,c)+l(a)+t(a)),e[b].value=k(a["Option_"+(b+1)]);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;"+ -p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a);"UI2VSliderBlock"==n.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*a.ScrollVal+";";break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";e=new mxCell("",new mxGeometry(0,0,.6*f,d),"part=1;");e.vertex=!0;v.insert(e);e.style+=p(a,c)+g(a,c)+l(a)+t(a)+r(a)+m(a.Date);e.value=k(a.Date);w=g(a,c);w=w.replace("strokeColor","fillColor");""==w&&(w="fillColor=#000000;");h=new mxCell("",new mxGeometry(.75*f,0,.25*f,d),"part=1;shape=mxgraph.gmdl.calendar;"); -h.vertex=!0;v.insert(h);h.style+=w+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a);break;case "UI2SearchBlock":v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+p(a,c)+g(a,c)+l(a)+t(a)+r(a)+N(a.Search)+I(a.Search)+M(a.Search);v.value=k(a.Search);break;case "UI2NumericStepperBlock":w=g(a,c);w=w.replace("strokeColor","fillColor");""==w&&(w="fillColor=#000000;");v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+ -w+p(a,c)+g(a,c)+l(a)+t(a)+r(a)+N(a.Number)+I(a.Number)+M(a.Number);v.value=k(a.Number);break;case "UI2ButtonBarBlock":v.style+=p(a,c)+g(a,c)+l(a)+t(a)+r(a);e=[];h=[];H=f/a.Buttons;for(b=0;b<=a.Buttons-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(b*H,0,H,d),""),h[b].vertex=!0,v.insert(h[b]),h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Button_"+(b+1)])):(e[b]=new mxCell("",new mxGeometry(b*H,0,H,d),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a), -h[b]=new mxCell("",new mxGeometry(0,0,H,d),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Button_"+(b+1)])),h[b].value=k(a["Button_"+(b+1)]);break;case "UI2VerticalButtonBarBlock":v.style+=p(a,c)+g(a,c)+l(a)+t(a)+r(a);e=[];h=[];y=d/a.Buttons;for(b=0;b<=a.Buttons-1;b++)b==a.Selected-1?(h[b]=new mxCell("",new mxGeometry(0,b*y,f,y),""),h[b].vertex=!0,v.insert(h[b]),h[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+m(a["Button_"+(b+1)])):(e[b]=new mxCell("", -new mxGeometry(0,b*y,f,y),"strokeColor=none;"),e[b].vertex=!0,v.insert(e[b]),e[b].style+=p(a,c)+q(a,c)+r(a),h[b]=new mxCell("",new mxGeometry(0,0,f,y),"fillColor=#000000;fillOpacity=25;"),h[b].vertex=!0,e[b].insert(h[b]),h[b].style+=g(a,c)+l(a)+t(a)+m(a["Button_"+(b+1)])),h[b].value=k(a["Button_"+(b+1)]);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;"+p(a,c)+g(a,c)+l(a)+t(a)+r(a);e=[];h=[];H=f/a.Links;for(b=0;b<a.Links;b++)0!=b?(h[b]=new mxCell("",new mxGeometry(b*H,0,H,d), -"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),h[b].style+=p(a,c)+r(a)+g(a,c)+l(a)+t(a)):h[b]=new mxCell("",new mxGeometry(b*H,0,H,d),"fillColor=none;strokeColor=none;"),h[b].vertex=!0,v.insert(h[b]),h[b].style+=m(a["Link_"+(b+1)]),h[b].value=k(a["Link_"+(b+1)]);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;"+p(a,c)+g(a,c)+l(a)+t(a)+r(a);e=[];h=[];H=f/a.Links;for(b=0;b<a.Links;b++)e[b]=new mxCell("",new mxGeometry(b*H,0,H,d),"fillColor=none;strokeColor=none;"), -e[b].vertex=!0,v.insert(e[b]),e[b].style+=m(a["Link_"+(b+1)]),e[b].value=k(a["Link_"+(b+1)]);for(b=1;b<a.Links;b++)h[b]=new mxCell("",new mxGeometry(b/a.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),h[b].geometry.relative=!0,h[b].geometry.offset=new mxPoint(-3,-5),h[b].vertex=!0,v.insert(h[b]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;"+p(a,c)+q(a,c)+r(a);e=[];H=f/(a.Buttons+1);for(b=0;b<=a.Buttons-1;b++)e[b]=b!=a.Selected-1?new mxCell("",new mxGeometry(0,0,H,d),"strokeColor=none;fillColor=none;resizeHeight=1;"): -new mxCell("",new mxGeometry(0,0,H,d),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),e[b].geometry.relative=!0,e[b].geometry.offset=new mxPoint(b*H,0),e[b].vertex=!0,v.insert(e[b]),e[b].style+=m(a["MenuItem_"+(b+1)]),e[b].value=k(a["MenuItem_"+(b+1)]);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+m(a.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+m(a.Text_prev); -v.value=k(a.Text_prev)+" ";for(b=0;b<a.Links;b++)v.value+=k(a["Link_"+(b+1)])+" ";v.value+=k(a.Text_next);break;case "UI2ContextMenuBlock":v.style+=p(a,c)+q(a,c)+g(a,c)+l(a)+t(a)+r(a);for(var x=[],Ua=[],vb=[],y=d/a.Lines,A=null,b=0;b<a.Lines;b++)null!=a["Item_"+(b+1)]&&(null==A&&(A=""+N(a["Item_"+(b+1)])+I(a["Item_"+(b+1)])+M(a["Item_"+(b+1)])),x[b]=new mxCell("",new mxGeometry(0,b*d/a.Lines,f,y),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),x[b].vertex=!0,v.insert(x[b]),x[b].style+= -A,x[b].value=k(a["Item_"+(b+1)])),null!=a.Icons[b+1]&&null!=x[b]&&("dot"==a.Icons[b+1]?(Ua[b]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),Ua[b].geometry.offset=new mxPoint(6,-4)):"check"==a.Icons[b+1]&&(Ua[b]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),Ua[b].geometry.offset=new mxPoint(6.5,-4)),null!=Ua[b]&&(Ua[b].geometry.relative=!0,Ua[b].vertex=!0,x[b].insert(Ua[b]),w=g(a,c),w=w.replace("strokeColor","fillColor"), -""==w&&(w="fillColor=#000000;"),Ua[b].style+=w)),null!=a["Shortcut_"+(b+1)]&&(null==A&&(A=""+N(a["Shortcut_"+(b+1)])+I(a["Shortcut_"+(b+1)])+M(a["Shortcut_"+(b+1)])),vb[b]=new mxCell("",new mxGeometry(.6*f,b*d/a.Lines,.4*f,y),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),vb[b].vertex=!0,v.insert(vb[b]),vb[b].style+=A,vb[b].value=k(a["Shortcut_"+(b+1)])),null!=a.Dividers[b+1]&&(x[b]=new mxCell("",new mxGeometry(.05*f,b*d/a.Lines,.9*f,y),"shape=line;strokeWidth=0.25;"),x[b].vertex= -!0,v.insert(x[b]),x[b].style+=g(a,c));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*a.ScrollVal+";";break;case "UI2TooltipSquareBlock":v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+a.RoundCorners+";"+p(a,c)+q(a,c)+g(a,c)+l(a)+t(a)+r(a)+m(a.Tip);v.value=k(a.Tip);break;case "UI2CalloutBlock":v.style+="shape=ellipse;"+p(a,c)+q(a,c)+g(a,c)+l(a)+t(a)+r(a)+m(a.Txt);v.value=k(a.Txt); -break;case "UI2AlertBlock":v.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+r(a)+V(a,c,v)+m(a.Txt);v.value=k(a.Txt);e=new mxCell("",new mxGeometry(0,0,f,30),"part=1;resizeHeight=0;");e.vertex=!0;v.insert(e);e.style+=A+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+m(a.Title);e.value=k(a.Title);h=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");h.geometry.relative=!0;h.geometry.offset=new mxPoint(-25,-10);h.vertex=!0;e.insert(h);for(var fc=45*a.Buttons+ -(10*a.Buttons-1),u=[],b=0;b<a.Buttons;b++)u[b]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),u[b].geometry.relative=!0,u[b].geometry.offset=new mxPoint(.5*-fc+55*b,-40),u[b].vertex=!0,v.insert(u[b]),u[b].style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+m(a["Button_"+(b+1)]),u[b].value=k(a["Button_"+(b+1)]);break;case "UMLClassBlock":if(0==a.Simple){var A=q(a,c),la=.6*a.TitleHeight,A=A.replace("fillColor","swimlaneFillColor");""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ -A+"startSize="+la+";"+p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+m(a.Title);v.value=k(a.Title);for(var x=[],oc=[],ga=la/d,b=0;b<=a.Attributes;b++)0<b&&(oc[b]=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),oc[b].vertex=!0,v.insert(oc[b])),y=0,b<a.Attributes?(y=a["Text"+(b+1)+"Percent"],ga+=y):y=1-ga,x[b]=new mxCell("",new mxGeometry(0,0,f,(d- -la)*y),"part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),x[b].vertex=!0,v.insert(x[b]),x[b].style+=A+p(a,c)+N(a["Text"+(b+1)])+I(a["Text"+(b+1)])+M(a["Text"+(b+1)]),x[b].value=k(a["Text"+(b+1)])}else v.style+=p(a,c)+g(a,c)+q(a,c)+l(a)+t(a)+m(a.Title),v.value=k(a.Title);break;case "ERDEntityBlock":A=q(a,c);la=.6*a.Name_h;A=A.replace("fillColor","swimlaneFillColor"); -""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+A+"startSize="+la+";"+p(a,c)+g(a,c)+l(a)+t(a)+m(a.Name);v.style=a.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+q(a,c);v.value=k(a.Name);x=[];ga=la/d;for(b=0;b<a.Fields;b++)y=0,x[b]=new mxCell("",new mxGeometry(0,0,f,.6*a["Field"+(b+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -x[b].vertex=!0,v.insert(x[b]),x[b].style+=A+N(a["Field"+(b+1)])+I(a["Field"+(b+1)])+M(a["Field"+(b+1)]),x[b].style=1==a.AltRows&&0!=b%2?x[b].style+"fillColor=#000000;opacity=5;":x[b].style+("fillColor=none;"+p(a,c)),x[b].value=k(a["Field"+(b+1)]);break;case "ERDEntityBlock2":A=q(a,c);la=.6*a.Name_h;A=A.replace("fillColor","swimlaneFillColor");""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+A+"startSize="+la+";"+ -p(a,c)+g(a,c)+l(a)+t(a)+m(a.Name);v.style=a.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+q(a,c);v.value=k(a.Name);var x=[],Q=[],ga=la,ra=30;null!=a.Column1&&(ra=.6*a.Column1);for(b=0;b<a.Fields;b++)y=0,Q[b]=new mxCell("",new mxGeometry(0,ga,ra,.6*a["Key"+(b+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Q[b].vertex=!0,v.insert(Q[b]),Q[b].style+=A+N(a["Key"+ -(b+1)])+I(a["Key"+(b+1)])+M(a["Key"+(b+1)]),Q[b].style=1==a.AltRows&&0!=b%2?Q[b].style+"fillColor=#000000;fillOpacity=5;":Q[b].style+("fillColor=none;"+p(a,c)),Q[b].value=k(a["Key"+(b+1)]),x[b]=new mxCell("",new mxGeometry(ra,ga,f-ra,.6*a["Field"+(b+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),x[b].vertex=!0,v.insert(x[b]),x[b].style+= -A+g(a,c)+l(a)+t(a)+N(a["Field"+(b+1)])+I(a["Field"+(b+1)])+M(a["Field"+(b+1)]),x[b].style=1==a.AltRows&&0!=b%2?x[b].style+"fillColor=#000000;fillOpacity=5;":x[b].style+("fillColor=none;"+p(a,c)),x[b].value=k(a["Field"+(b+1)]),ga+=.6*a["Key"+(b+1)+"_h"];break;case "ERDEntityBlock3":A=q(a,c);la=.6*a.Name_h;A=A.replace("fillColor","swimlaneFillColor");""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+A+"startSize="+ -la+";"+p(a,c)+g(a,c)+l(a)+t(a)+m(a.Name);v.style=a.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+q(a,c);v.value=k(a.Name);x=[];Q=[];ga=la;ra=30;null!=a.Column1&&(ra=.6*a.Column1);for(b=0;b<a.Fields;b++)y=0,Q[b]=new mxCell("",new mxGeometry(0,ga,ra,.6*a["Field"+(b+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Q[b].vertex=!0,v.insert(Q[b]),Q[b].style+=A+N(a["Field"+ -(b+1)])+I(a["Field"+(b+1)])+M(a["Field"+(b+1)]),Q[b].style=1==a.AltRows&&0!=b%2?Q[b].style+"fillColor=#000000;fillOpacity=5;":Q[b].style+("fillColor=none;"+p(a,c)),Q[b].value=k(a["Field"+(b+1)]),x[b]=new mxCell("",new mxGeometry(ra,ga,f-ra,.6*a["Type"+(b+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),x[b].vertex=!0,v.insert(x[b]), -x[b].style+=A+g(a,c)+l(a)+t(a)+N(a["Type"+(b+1)])+I(a["Type"+(b+1)])+M(a["Type"+(b+1)]),x[b].style=1==a.AltRows&&0!=b%2?x[b].style+"fillColor=#000000;fillOpacity=5;":x[b].style+("fillColor=none;"+p(a,c)),x[b].value=k(a["Type"+(b+1)]),ga+=.6*a["Field"+(b+1)+"_h"];break;case "ERDEntityBlock4":A=q(a,c);la=.6*a.Name_h;A=A.replace("fillColor","swimlaneFillColor");""==A&&(A="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+A+"startSize="+ -la+";"+p(a,c)+g(a,c)+l(a)+t(a)+m(a.Name);v.style=a.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+q(a,c);v.value=k(a.Name);var x=[],Q=[],Ya=[],ga=la,ra=30,bc=40;null!=a.Column1&&(ra=.6*a.Column1);null!=a.Column2&&(bc=.6*a.Column2);for(b=0;b<a.Fields;b++)y=0,Q[b]=new mxCell("",new mxGeometry(0,ga,ra,.6*a["Key"+(b+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -Q[b].vertex=!0,v.insert(Q[b]),Q[b].style+=A+N(a["Key"+(b+1)])+I(a["Key"+(b+1)])+M(a["Key"+(b+1)]),Q[b].style=1==a.AltRows&&0!=b%2?Q[b].style+"fillColor=#000000;fillOpacity=5;":Q[b].style+("fillColor=none;"+p(a,c)),Q[b].value=k(a["Key"+(b+1)]),x[b]=new mxCell("",new mxGeometry(ra,ga,f-ra-bc,.6*a["Field"+(b+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -x[b].vertex=!0,v.insert(x[b]),x[b].style+=A+g(a,c)+l(a)+t(a)+N(a["Field"+(b+1)])+I(a["Field"+(b+1)])+M(a["Field"+(b+1)]),x[b].style=1==a.AltRows&&0!=b%2?x[b].style+"fillColor=#000000;fillOpacity=5;":x[b].style+("fillColor=none;"+p(a,c)),x[b].value=k(a["Field"+(b+1)]),Ya[b]=new mxCell("",new mxGeometry(f-bc,ga,bc,.6*a["Type"+(b+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -Ya[b].vertex=!0,v.insert(Ya[b]),Ya[b].style+=A+g(a,c)+l(a)+t(a)+N(a["Type"+(b+1)])+I(a["Type"+(b+1)])+M(a["Type"+(b+1)]),Ya[b].style=1==a.AltRows&&0!=b%2?Ya[b].style+"fillColor=#000000;fillOpacity=5;":Ya[b].style+("fillColor=none;"+p(a,c)),Ya[b].value=k(a["Type"+(b+1)]),ga+=.6*a["Key"+(b+1)+"_h"]}return v}var ec=["GSDFDProcessBlock","GSDFDProcessBlock2","RoundedRectangleContainerBlock","UI2ButtonBlock","UMLStateBlock"],fc=["ProcessBlock","UMLActivationBlock"],cc="VennPlainColor1 VennPlainColor2 VennPlainColor3 VennPlainColor4 VennPlainColor5 VennPlainColor6 VennPlainColor7 VennPlainColor8 VennGradientColor1 VennGradientColor2 VennGradientColor3 VennGradientColor4 VennGradientColor5 VennGradientColor6 VennGradientColor7 VennGradientColor8 UMLEndBlock DefaultTextBlockNew iOSButton".split(" "), -wc="AWSAndroidBlock3 AWSiOSBlock3 AWSJavaBlock3 AWSJavaScript AWSNetBlock3 AWSNodeJSBlock3 AWSPHPBlock3 AWSPythonBlock3 AWSRubyBlock3 AWSXamarin AWSCLIBlock3 AWSEclipseToolkitBlock3 AWSVisualStudioToolkitBlock3 AWSWindowsPowershellToolkitBlock3 DefaultTextBlock RectangleContainerBlock UMLStartBlock UMLEndBlock DefaultTextBlockNew UMLHForkJoinBlock iOSButton".split(" "),gb="VennPlainColor1 VennPlainColor2 VennPlainColor3 VennPlainColor4 VennPlainColor5 VennPlainColor6 VennPlainColor7 VennPlainColor8 VennGradientColor1 VennGradientColor2 VennGradientColor3 VennGradientColor4 VennGradientColor5 VennGradientColor6 VennGradientColor7 VennGradientColor8".split(" "), -uc=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],vc=["fpDoor"],wb={None:"none",Arrow:"block;endFill=1","Hollow Arrow":"block;endFill=0","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10","CFN ERD Many Arrow":"ERmany;startSize=10","CFN ERD Exactly One Arrow":"ERmandOne;startSize=10","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10","CFN ERD One Arrow":"ERone;startSize=16", -Generalization:"block;endFill=0;startSize=12","Big Open Arrow":"open;startSize=10",Asynch1:"openAsync;flipH=1;startSize=10",Asynch2:"openAsync;startSize=10",Aggregation:"diamond;endFill=0;startSize=16",Composition:"diamond;endFill=1;startSize=16",BlockEnd:"none;endFill=1;startSize=16"},hb={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15", +(function(){function c(a){var b=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==b&&null!=a.State?null!=a.State.t&&(b=a.State):null==b&&null!=a.Note?null!=a.Note.t&&(b=a.Note):null==b&&null!=a.Title?null!=a.Title.t&&(b=a.Title):null!=a.t&&(b=a);null==b&&null!=a.TextAreas&&null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(b=a.TextAreas.Text.Value);if(null!=b){if(null!=b.t)return b.t=b.t.replace(/</g,"<"),b.t=b.t.replace(/>/g,">"),b.t;if(null!=b.Value&& +null!=b.Value.t)return b.Value.t=b.Value.t.replace(/</g,"<"),b.Value.t=b.Value.t.replace(/>/g,">"),b.Value.t}return""}function u(a){return null!=a.Action?a.Action:a}function q(a){if(null!=a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else if(null!=a.m)return a.m;return null}function l(c){return h(c)+f(c)+b(c)+a(c)+d(c)+g(c)+n(c)+C(c)+D(c)+y(c)}function h(a){a= +q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=10;"}function f(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("c"==d.n&&null!=d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+a+";";b++}return""}function b(a){a=q(a);if(null!=a){var b=0,d=!1;if(null!=a)for(var g=0;!d&&g<a.length;){var e=a[g];"b"==e.n&&null!=e.v&&e.v&&(d=!0,b+=1);g++}d=!1;if(null!=a)for(g= +0;!d&&g<a.length;)e=a[g],"i"==e.n&&null!=e.v&&e.v&&(d=!0,b+=2),g++;d=!1;if(null!=a)for(g=0;!d&&g<a.length;)e=a[g],"u"==e.n&&null!=e.v&&e.v&&(d=!0,b+=4),g++;if(0<b)return"fontStyle="+b+";"}return""}function a(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function d(b){var d=q(b);if(null!=d)for(var g=0;g<d.length;){var n=d[g];if("il"==n.n){if(null!=n.v)return"spacingLeft="+.6*n.v+";"}else if("s"==n.n&&"align=center;"!=a(b)&&null!= +n.v)return"spacingLeft="+.6*n.v+";";g++}return""}function g(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function n(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function C(a){a=q(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+";";b++}return""}function D(a){return"number"===typeof a.InsetMargin? +"spacing="+parseInt(a.InsetMargin)+";":""}function y(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":L(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function p(a,b){return Ub.includes(b.Class)?"Venn"==b.Class.substring(0,4)?L(mxConstants.STYLE_STROKECOLOR,a.FillColor.substring(0,7),"#FFFFFF"):"":0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":L(mxConstants.STYLE_STROKECOLOR,a.LineColor.substring(0,7),"#000000")}function z(a,b){var d= +"";kb.includes(b.Class)||(d+=L(mxConstants.STYLE_OPACITY,a.Opacity,"100"));if("string"===typeof a.LineColor&&!kb.includes(b.Class)&&7<a.LineColor.length)var g="0x"+a.LineColor.substring(a.LineColor.length-2,a.LineColor.length),d=d+("strokeOpacity="+Math.round(parseInt(g)/2.55)+";");"string"===typeof a.FillColor&&!kb.includes(b.Class)&&7<a.FillColor.length&&(g="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d+="fillOpacity="+Math.round(parseInt(g)/2.55)+";");return d}function W(a, +b){if(null!=a.Rounding&&!Ga.includes(b.Class)){if(0<a.Rounding)return"rounded=1;absoluteArcSize=1;arcSize="+.6*a.Rounding+";"}else if(null==a.Rounding&&Ia.includes(b.Class))return"rounded=1;absoluteArcSize=1;arcSize=8;";return""}function P(a,b,d){return null!=a.Rotation&&(a=mxUtils.toDegree(parseFloat(a.Rotation)),"AdvancedSwimLaneBlockRotated"==b.Class?(a+=90,d.geometry.rotate90()):Vb.includes(b.Class)?(a-=90,d.geometry.rotate90(),d.geometry.rotate90(),d.geometry.rotate90()):fb.includes(b.Class)&& +(a+=180,d.geometry.rotate90(),d.geometry.rotate90()),0!=a)?"rotation="+a+";":""}function E(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function A(a,b){if(null!=a.FillColor&&!Ea.includes(b.Class))if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return L(mxConstants.STYLE_FILLCOLOR,a.FillColor.cs[0].c.substring(0,7))+L(mxConstants.STYLE_GRADIENTCOLOR,a.FillColor.cs[1].c.substring(0,7))}else return"string"===typeof a.FillColor?L(mxConstants.STYLE_FILLCOLOR, +a.FillColor.substring(0,7),"#FFFFFF"):L(mxConstants.STYLE_FILLCOLOR,"none");return""}function F(a){return"dashed"==a.StrokeStyle?"dashed=1;":"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 1;":""}function B(a){return L(mxConstants.STYLE_STROKEWIDTH,.6*parseFloat(a.LineWidth),"1")}function Z(l,q){var Z=u(q);if(null!=Z){var m=lb[Z.Class]+";";null!=m&&(l.style+=m);m=null!=Z.Properties?Z.Properties: +Z;if(null!=m){l.value=c(m);var e=l.style,L=h(m)+f(m)+b(m)+a(m,l)+d(m)+g(m)+n(m)+C(m)+D(m)+y(m)+p(m,Z)+z(m,Z)+W(m,Z)+P(m,Z,l)+(m.FlipX?"flipH=1;":"")+(m.FlipY?"flipV=1;":"")+E(m)+A(m,Z)+F(m)+B(m);Z="ImageSearchBlock2"==Z.Class?"image="+m.URL+";":"";l.style=e+(L+Z);if(l.edge){l.style+="rounded=1;arcSize=6;";if("diagonal"!=m.Shape)if(null!=m.ElbowPoints)for(l.geometry.points=[],Z=0;Z<m.ElbowPoints.length;Z++)l.geometry.points.push(new mxPoint(Math.round(.6*m.ElbowPoints[Z].x+0),Math.round(.6*m.ElbowPoints[Z].y+ +0)));else"elbow"==m.Shape?l.style=null!=m.Endpoint1.Block&&null!=m.Endpoint1.Block?l.style+"edgeStyle=orthogonalEdgeStyle;":l.style+"edgeStyle=elbowEdgeStyle;":null!=m.Endpoint1.Block&&null!=m.Endpoint1.Block&&(l.style+="edgeStyle=orthogonalEdgeStyle;","curve"==m.Shape&&(l.style+="curved=1;"));null!=m.Endpoint1.Style&&(l.style+="startArrow="+xb[m.Endpoint1.Style]+";");null!=m.Endpoint2.Style&&(l.style+="endArrow="+xb[m.Endpoint2.Style].replace(/startSize/g,"endSize")+";");fa(l,m.Endpoint1,!0);fa(l, +m.Endpoint2,!1)}}}}function K(a){var b=u(a).Properties.BoundingBox;null!=a.Class&&"AWS"===a.Class.substring(0,3)&&(b.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*b.x+0),Math.round(.6*b.y+0),Math.round(.6*b.w),Math.round(.6*b.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;Z(v,a);return v}function Y(a,b,d){d=2*(parseFloat(a.Location)-.5);a=new mxCell(c(a),new mxGeometry(d,0,0,0),"text;html=1;resizable=0;labelBackgroundColor=#ffffff;");a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function L(a, +b,d,g){null!=b&&null!=g&&(b=g(b));return null!=b&&b!=d?a+"="+b+";":""}function fa(a,b,d){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(d?"exitX":"entryX")+"="+b.LinkX+";"+(d?"exitY":"entryY")+"="+b.LinkY+";"+(d?"exitPerimeter":"entryPerimeter")+"=0;")}function ka(a,b,d,g,e,n,c,f){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;c.insert(a);n=[a];d=sb.cloneCell(d);f.insertEdge(d,!1);a.insertEdge(d,!0);n.push(d);g.push(e.addCell(d,null,null,null,null))}function ea(a, +b,d,g,e,n,c,f,C){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;C.insert(a);d=new mxCell("",new mxGeometry(d,g,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;C.insert(d);f=[d];e=sb.cloneCell(e);a.insertEdge(e,!0);d.insertEdge(e,!1);f.push(e);n.push(c.addCell(e,null,null,null,null))}function na(q,L,K){var m=u(q),e=m.Properties,Y=e.BoundingBox,w=Math.round(.6*Y.w),t=Math.round(.6*Y.h),fa=Math.round(.6*Y.x+0),na=Math.round(.6*Y.y+0);v=new mxCell("",new mxGeometry(fa, +na,w,t),"html=1;whiteSpace=wrap;");v.vertex=!0;switch(q.Class){case "BraceNoteBlock":case "UI2BraceNoteBlock":var Ga=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(Ga=!0);var Ia=null,za=null;Ga?(Ia=new mxCell("",new mxGeometry(w-.125*t,0,.125*t,t),"shape=curlyBracket;rounded=1;"),za=new mxCell("",new mxGeometry(0,0,w-.125*t,t),"strokeColor=none;fillColor=none;")):(Ia=new mxCell("",new mxGeometry(0,0,.125*t,t),"shape=curlyBracket;rounded=1;flipH=1;"),za=new mxCell("",new mxGeometry(.125*t, +0,w-.125*t,t),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=P(e,m,v);Ia.vertex=!0;v.insert(Ia);Ia.style+=p(e,m)+z(e,m)+E(e)+F(e)+B(e);za.vertex=!0;za.value=c(e);v.insert(za);za.style+=h(e)+f(e)+b(e)+a(e,za)+d(e)+g(e)+n(e)+C(e)+D(e)+y(e);break;case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":var Ub=0;null!=e.Lanes&&(Ub=e.Lanes.length);v.style="strokeColor=none;fillColor=none;";for(var Vb=0,db=[],k=0;k<Ub;k++){var kb=parseFloat(e.Lanes[k].p); +db.push(new mxCell("",new mxGeometry(w*Vb,0,w*kb,t),"shape=swimlane;startSize=25;"));db[k].vertex=!0;v.insert(db[k]);db[k].value=c(e["Lane_"+k]);db[k].style+=h(e["Lane_"+k])+f(e["Lane_"+k])+b(e["Lane_"+k])+a(e["Lane_"+k],db[k])+d(e["Lane_"+k])+g(e["Lane_"+k])+n(e["Lane_"+k])+C(e["Lane_"+k])+D(e["Lane_"+k])+y(e["Lane_"+k])+p(e,m)+z(e,m)+W(e,m)+P(e,m,db[k])+(e.FlipX?"flipH=1;":"")+(e.FlipY?"flipV=1;":"")+E(e)+A(e,m)+F(e)+B(e);Vb+=kb}break;case "AndroidDevice":if(null!=e.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;"; +var Ea=null,fb=null,yb=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",Ea=new mxCell("",new mxGeometry(.112*w,.077*t,.77*w,.85*t),""),e.KeyboardShown&&(fb=new mxCell("",new mxGeometry(.112*w,.727*t,.77*w,.2*t),"shape=mxgraph.android.keyboard;")),e.FullScreen||(yb=new mxCell("",new mxGeometry(.112*w,.077*t,.77*w,.03*t),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*t+";"));else if("Large Phone"== +e.AndroidDeviceName||"Phone"==e.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",Ea=new mxCell("",new mxGeometry(.04*w,.092*t,.92*w,.816*t),""),e.KeyboardShown&&(fb=new mxCell("",new mxGeometry(.04*w,.708*t,.92*w,.2*t),"shape=mxgraph.android.keyboard;")),e.FullScreen||(yb=new mxCell("",new mxGeometry(.04*w,.092*t,.92*w,.03*t),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*t+";"));Ea.vertex=!0;v.insert(Ea);"Dark"==e.Scheme?Ea.style+= +"fillColor=#111111;":"Light"==e.Scheme&&(Ea.style+="fillColor=#ffffff;");null!=fb&&(fb.vertex=!0,v.insert(fb));null!=yb&&(yb.vertex=!0,v.insert(yb))}break;case "AndroidAlertDialog":var Ja=new mxCell("",new mxGeometry(0,0,w,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ja.vertex=!0;v.insert(Ja);var ha=new mxCell("",new mxGeometry(0,25,w,10),"shape=line;strokeColor=#33B5E5;");ha.vertex=!0;v.insert(ha);var zb=new mxCell("",new mxGeometry(0,30,w,t-30),"strokeColor=none;fillColor=none;verticalAlign=top;"); +zb.vertex=!0;v.insert(zb);var la=new mxCell("",new mxGeometry(0,t-25,.5*w,25),"fillColor=none;");la.vertex=!0;v.insert(la);var ma=new mxCell("",new mxGeometry(.5*w,t-25,.5*w,25),"fillColor=none;");ma.vertex=!0;v.insert(ma);Ja.value=c(e.DialogTitle);Ja.style+=l(e.DialogTitle);zb.value=c(e.DialogText);zb.style+=l(e.DialogText);la.value=c(e.Button_0);la.style+=l(e.Button_0);ma.value=c(e.Button_1);ma.style+=l(e.Button_1);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",la.style+= +"strokeColor=#353535;",ma.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",la.style+="strokeColor=#E2E2E2;",ma.style+="strokeColor=#E2E2E2;");break;case "AndroidDateDialog":case "AndroidTimeDialog":Ja=new mxCell("",new mxGeometry(0,0,w,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ja.vertex=!0;v.insert(Ja);Ja.value=c(e.DialogTitle);Ja.style+=l(e.DialogTitle);ha=new mxCell("",new mxGeometry(0,25,w,10),"shape=line;strokeColor=#33B5E5;");ha.vertex=!0;v.insert(ha); +la=new mxCell("",new mxGeometry(0,t-25,.5*w,25),"fillColor=none;");la.vertex=!0;v.insert(la);la.value=c(e.Button_0);la.style+=l(e.Button_0);ma=new mxCell("",new mxGeometry(.5*w,t-25,.5*w,25),"fillColor=none;");ma.vertex=!0;v.insert(ma);ma.value=c(e.Button_1);ma.style+=l(e.Button_1);var jb=new mxCell("",new mxGeometry(.5*w-4,41,8,4),"shape=triangle;direction=north;");jb.vertex=!0;v.insert(jb);var ib=new mxCell("",new mxGeometry(.25*w-4,41,8,4),"shape=triangle;direction=north;");ib.vertex=!0;v.insert(ib); +var mb=new mxCell("",new mxGeometry(.75*w-4,41,8,4),"shape=triangle;direction=north;");mb.vertex=!0;v.insert(mb);var Ab=new mxCell("",new mxGeometry(.375*w,50,.2*w,15),"strokeColor=none;fillColor=none;");Ab.vertex=!0;v.insert(Ab);Ab.value=c(e.Label_1);Ab.style+=l(e.Label_1);var Bb=new mxCell("",new mxGeometry(.125*w,50,.2*w,15),"strokeColor=none;fillColor=none;");Bb.vertex=!0;v.insert(Bb);Bb.value=c(e.Label_0);Bb.style+=l(e.Label_0);var nb=null;"AndroidDateDialog"==q.Class&&(nb=new mxCell("",new mxGeometry(.625* +w,50,.2*w,15),"strokeColor=none;fillColor=none;"),nb.vertex=!0,v.insert(nb),nb.value=c(e.Label_2),nb.style+=l(e.Label_2));var Ka=new mxCell("",new mxGeometry(.43*w,60,.14*w,10),"shape=line;strokeColor=#33B5E5;");Ka.vertex=!0;v.insert(Ka);var La=new mxCell("",new mxGeometry(.18*w,60,.14*w,10),"shape=line;strokeColor=#33B5E5;");La.vertex=!0;v.insert(La);var lb=new mxCell("",new mxGeometry(.68*w,60,.14*w,10),"shape=line;strokeColor=#33B5E5;");lb.vertex=!0;v.insert(lb);var Cb=new mxCell("",new mxGeometry(.375* +w,65,.2*w,15),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.value=c(e.Label_4);Cb.style+=l(e.Label_4);var ob=null;"AndroidTimeDialog"==q.Class&&(ob=new mxCell("",new mxGeometry(.3*w,65,.1*w,15),"strokeColor=none;fillColor=none;"),ob.vertex=!0,v.insert(ob),ob.value=c(e.Label_Colon),ob.style+=l(e.Label_Colon));var Db=new mxCell("",new mxGeometry(.125*w,65,.2*w,15),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.value=c(e.Label_3);Db.style+=l(e.Label_3);var Eb=new mxCell("", +new mxGeometry(.625*w,65,.2*w,15),"strokeColor=none;fillColor=none;");Eb.vertex=!0;v.insert(Eb);Eb.value=c(e.Label_5);Eb.style+=l(e.Label_5);var xb=new mxCell("",new mxGeometry(.43*w,75,.14*w,10),"shape=line;strokeColor=#33B5E5;");xb.vertex=!0;v.insert(xb);var Tb=new mxCell("",new mxGeometry(.18*w,75,.14*w,10),"shape=line;strokeColor=#33B5E5;");Tb.vertex=!0;v.insert(Tb);var kc=new mxCell("",new mxGeometry(.68*w,75,.14*w,10),"shape=line;strokeColor=#33B5E5;");kc.vertex=!0;v.insert(kc);var Fb=new mxCell("", +new mxGeometry(.375*w,80,.2*w,15),"strokeColor=none;fillColor=none;");Fb.vertex=!0;v.insert(Fb);Fb.value=c(e.Label_7);Fb.style+=l(e.Label_7);var Gb=new mxCell("",new mxGeometry(.125*w,80,.2*w,15),"strokeColor=none;fillColor=none;");Gb.vertex=!0;v.insert(Gb);Gb.value=c(e.Label_6);Gb.style+=l(e.Label_6);var Hb=new mxCell("",new mxGeometry(.625*w,80,.2*w,15),"strokeColor=none;fillColor=none;");Hb.vertex=!0;v.insert(Hb);Hb.value=c(e.Label_8);Hb.style+=l(e.Label_8);var pb=new mxCell("",new mxGeometry(.5* +w-4,99,8,4),"shape=triangle;direction=south;");pb.vertex=!0;v.insert(pb);var qb=new mxCell("",new mxGeometry(.25*w-4,99,8,4),"shape=triangle;direction=south;");qb.vertex=!0;v.insert(qb);var rb=new mxCell("",new mxGeometry(.75*w-4,99,8,4),"shape=triangle;direction=south;");rb.vertex=!0;v.insert(rb);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",la.style+="strokeColor=#353535;",ma.style+="strokeColor=#353535;",jb.style+="strokeColor=none;fillColor=#7E7E7E;",ib.style+="strokeColor=none;fillColor=#7E7E7E;", +mb.style+="strokeColor=none;fillColor=#7E7E7E;",pb.style+="strokeColor=none;fillColor=#7E7E7E;",qb.style+="strokeColor=none;fillColor=#7E7E7E;",rb.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",la.style+="strokeColor=#E2E2E2;",ma.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=none;fillColor=#939393;",ib.style+="strokeColor=none;fillColor=#939393;",mb.style+="strokeColor=none;fillColor=#939393;",pb.style+="strokeColor=none;fillColor=#939393;", +qb.style+="strokeColor=none;fillColor=#939393;",rb.style+="strokeColor=none;fillColor=#939393;");break;case "AndroidListItems":var ta=t,ab=0;if(e.ShowHeader){var ab=8,Ib=new mxCell("",new mxGeometry(0,0,w,ab),"strokeColor=none;fillColor=none;");Ib.vertex=!0;v.insert(Ib);Ib.value=c(e.Header);Ib.style+=l(e.Header);var ta=ta-ab,lc=new mxCell("",new mxGeometry(0,ab-2,w,4),"shape=line;strokeColor=#999999;");lc.vertex=!0;v.insert(lc)}var Ma=parseInt(e.Items);0<Ma&&(ta/=Ma);for(var I=[],ha=[],k=0;k<Ma;k++)I[k]= +new mxCell("",new mxGeometry(0,ab+k*ta,w,ta),"strokeColor=none;fillColor=none;"),I[k].vertex=!0,v.insert(I[k]),I[k].value=c(e["Item_"+k]),I[k].style+=l(e["Item_"+k]),0<k&&(ha[k]=new mxCell("",new mxGeometry(0,ab+k*ta-2,w,4),"shape=line;"),ha[k].vertex=!0,v.insert(ha[k]),ha[k].style="Dark"==e.Scheme?ha[k].style+"strokeColor=#ffffff;":ha[k].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";break;case "AndroidTabs":var Na= +parseInt(e.Tabs),Aa=w;0<Na&&(Aa/=Na);for(var ba=[],ha=[],k=0;k<Na;k++)ba[k]=new mxCell("",new mxGeometry(k*Aa,0,Aa,t),"strokeColor=none;fillColor=none;"),ba[k].vertex=!0,v.insert(ba[k]),ba[k].value=c(e["Tab_"+k]),ba[k].style+=l(e["Tab_"+k]),0<k&&(ha[k]=new mxCell("",new mxGeometry(k*Aa-2,.2*t,4,.6*t),"shape=line;direction=north;"),ha[k].vertex=!0,v.insert(ha[k]),ha[k].style="Dark"==e.Scheme?ha[k].style+"strokeColor=#484848;":ha[k].style+"strokeColor=#CCCCCC;");var mc=new mxCell("",new mxGeometry(e.Selected* +Aa+2,t-3,Aa-4,3),"strokeColor=none;fillColor=#33B5E5;");mc.vertex=!0;v.insert(mc);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(fa),Math.round(na+.25*t),Math.round(w),Math.round(.5*t)),"html=1;whiteSpace=wrap;");v.vertex=!0;var Jb=new mxCell("",new mxGeometry(0,0,w*e.BarPosition,Math.round(.5*t)),"strokeColor=none;fillColor=#33B5E5;");Jb.vertex=!0;v.insert(Jb); +v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;": +e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=c(e.Label);v.style+=l(e.Label);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(e.HighlightShow){var bb=null,bb=e.HighlightTop?new mxCell("",new mxGeometry(0, +0,w,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,t-2,w,2),"strokeColor=none;");bb.vertex=!0;v.insert(bb);switch(e.HighlightColor){case "Blue":bb.style+="fillColor=#33B5E5;";break;case "Dark Gray":bb.style+="fillColor=#B0B0B0;";break;case "White":bb.style+="fillColor=#ffffff;"}}if(e.VlignShow){var tb=new mxCell("",new mxGeometry(20,5,2,t-10),"shape=line;direction=north;");tb.vertex=!0;v.insert(tb);switch(e.VlignColor){case "Blue":tb.style+="strokeColor=#244C5A;";break;case "White":tb.style+= +"strokeColor=#ffffff;"}}break;case "AndroidButton":v.value=c(e.Label);v.style+=l(e.Label)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";break;case "AndroidTextBox":v.value=c(e.Label);v.style+=l(e.Label);var Kb=new mxCell("",new mxGeometry(2,t-6,w-4,4),"shape=partialRectangle;top=0;fillColor=none;");Kb.vertex=!0;v.insert(Kb);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;": +v.style+"fillColor=#ffffff;strokeColor=none;";Kb.style=e.TextFocused?Kb.style+"strokeColor=#33B5E5;":Kb.style+"strokeColor=#A9A9A9;";break;case "AndroidRadioButton":var gb=null;e.Checked&&(gb=new mxCell("",new mxGeometry(.15*w,.15*t,.7*w,.7*t),"shape=ellipse;fillColor=#33B5E5;strokeWidth=0.6;"),gb.vertex=!0,v.insert(gb));"Dark"==e.Scheme?(v.style+="shape=ellipse;strokeWidth=0.6;strokeColor=#272727;",e.Checked?(gb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"): +(v.style+="shape=ellipse;strokeWidth=0.6;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&(gb.style+="strokeColor=#999999;"));break;case "AndroidCheckBox":var cc=null;e.Checked&&(cc=new mxCell("",new mxGeometry(.25*w,.05*-t,w,.8*t),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),cc.vertex=!0,v.insert(cc));v.style="Dark"==e.Scheme?v.style+"strokeWidth=0.6;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=0.6;strokeColor=#5C5C5C;fillColor=#ffffff;";break;case "AndroidToggle":v.style= +"Dark"==e.Scheme?e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";break;case "iOSSegmentedControl":Na=parseInt(e.Tabs);Aa=w;v.style+="strokeColor=none;fillColor=none;"; +0<Na&&(Aa/=Na);ba=[];ha=[];for(k=0;k<Na;k++)ba[k]=new mxCell("",new mxGeometry(k*Aa,0,Aa,t),"strokeColor="+e.FillColor+";"),ba[k].vertex=!0,v.insert(ba[k]),ba[k].value=c(e["Tab_"+k]),ba[k].style+=l(e["Tab_"+k]),ba[k].style=e.Selected==k?ba[k].style+A(e,m):ba[k].style+"fillColor=none;";break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(fa), +Math.round(na+.25*t),Math.round(w),Math.round(.5*t)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Jb=new mxCell("",new mxGeometry(0,0,w*e.BarPosition,Math.round(.5*t)),"strokeColor=none;"+A(e,m));Jb.vertex=!0;v.insert(Jb);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;"+A(e,m)+"strokeColor=#D6D6D6;";break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;"+A(e,m)+"strokeColor=#000000;";var R=new mxCell(c(e.Text),new mxGeometry(.35*w,0, +.3*w,t),"strokeColor=none;fillColor=none;");R.vertex=!0;v.insert(R);R.style+=l(e.Text);var va=new mxCell(c(e.Carrier),new mxGeometry(.09*w,0,.2*w,t),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.style+=l(e.Carrier);break;case "iOSSearchBar":v.style+="strokeColor=none;"+A(e,m)+z(e,m)+W(e,m)+l(e.Search);v.value=c(e.Search);var U=new mxCell("",new mxGeometry(.3*w,.3*t,.4*t,.4*t),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");U.vertex=!0;v.insert(U);break; +case "iOSNavBar":v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+A(e,m)+z(e,m)+l(e.Title);v.value=c(e.Title);R=new mxCell(c(e.LeftText),new mxGeometry(.03*w,0,.3*w,t),"strokeColor=none;fillColor=none;");R.vertex=!0;v.insert(R);R.style+=l(e.LeftText);va=new mxCell(c(e.RightText),new mxGeometry(.65*w,0,.3*w,t),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.style+=l(e.RightText);U=new mxCell("",new mxGeometry(.02*w,.2*t,.3*t,.5*t),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;"); +U.vertex=!0;v.insert(U);break;case "iOSTabs":Na=parseInt(e.Tabs);Aa=w;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;"+A(e,m)+z(e,m);0<Na&&(Aa/=Na);ba=[];ha=[];for(k=0;k<Na;k++)ba[k]=new mxCell("",new mxGeometry(k*Aa,0,Aa,t),"strokeColor=none;"),ba[k].vertex=!0,v.insert(ba[k]),ba[k].value=c(e["Tab_"+k]),ba[k].style+=h(e["Tab_"+k]),ba[k].style+=f(e["Tab_"+k])+b(e["Tab_"+k])+a(e["Tab_"+k])+d(e["Tab_"+k])+g(e["Tab_"+k])+n(e["Tab_"+k])+C(e["Tab_"+k])+D(e["Tab_"+k]),ba[k].style+= +"verticalAlign=bottom;",ba[k].style=e.Selected==k?ba[k].style+"fillColor=#BBBBBB;":ba[k].style+"fillColor=none;";break;case "iOSDatePicker":var Oa=new mxCell("",new mxGeometry(0,0,.5*w,.2*t),"strokeColor=none;fillColor=none;");Oa.vertex=!0;v.insert(Oa);Oa.value=c(e.Option11);Oa.style+=l(e.Option11);var Pa=new mxCell("",new mxGeometry(.5*w,0,.15*w,.2*t),"strokeColor=none;fillColor=none;");Pa.vertex=!0;v.insert(Pa);Pa.value=c(e.Option21);Pa.style+=l(e.Option21);var Qa=new mxCell("",new mxGeometry(.65* +w,0,.15*w,.2*t),"strokeColor=none;fillColor=none;");Qa.vertex=!0;v.insert(Qa);Qa.value=c(e.Option31);Qa.style+=l(e.Option31);var Ra=new mxCell("",new mxGeometry(0,.2*t,.5*w,.2*t),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=c(e.Option12);Ra.style+=l(e.Option12);var Sa=new mxCell("",new mxGeometry(.5*w,.2*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=c(e.Option22);Sa.style+=l(e.Option22);var Ta=new mxCell("",new mxGeometry(.65*w,.2*t, +.15*w,.2*t),"strokeColor=none;fillColor=none;");Ta.vertex=!0;v.insert(Ta);Ta.value=c(e.Option32);Ta.style+=l(e.Option32);var oa=new mxCell("",new mxGeometry(0,.4*t,.5*w,.2*t),"strokeColor=none;fillColor=none;");oa.vertex=!0;v.insert(oa);oa.value=c(e.Option13);oa.style+=l(e.Option13);var pa=new mxCell("",new mxGeometry(.5*w,.4*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");pa.vertex=!0;v.insert(pa);pa.value=c(e.Option23);pa.style+=l(e.Option23);var Ua=new mxCell("",new mxGeometry(.65*w,.4*t,.15* +w,.2*t),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(e.Option33);Ua.style+=l(e.Option33);var qa=new mxCell("",new mxGeometry(.8*w,.4*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(e.Option43);qa.style+=l(e.Option43);var ra=new mxCell("",new mxGeometry(0,.6*t,.5*w,.2*t),"strokeColor=none;fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(e.Option14);ra.style+=l(e.Option14);var Va=new mxCell("",new mxGeometry(.5*w,.6*t,.15*w,.2* +t),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(e.Option24);Va.style+=l(e.Option24);var Wa=new mxCell("",new mxGeometry(.65*w,.6*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(e.Option34);Wa.style+=l(e.Option34);var Xa=new mxCell("",new mxGeometry(.8*w,.6*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(e.Option44);Xa.style+=l(e.Option44);var sa=new mxCell("",new mxGeometry(0,.8*t,.5*w,.2*t), +"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(e.Option15);sa.style+=l(e.Option15);var Ya=new mxCell("",new mxGeometry(.5*w,.8*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(e.Option25);Ya.style+=l(e.Option25);var Za=new mxCell("",new mxGeometry(.65*w,.8*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(e.Option35);Za.style+=l(e.Option35);Ka=new mxCell("",new mxGeometry(0,.4*t-2,w,4),"shape=line;strokeColor=#888888;"); +Ka.vertex=!0;v.insert(Ka);La=new mxCell("",new mxGeometry(0,.6*t-2,w,4),"shape=line;strokeColor=#888888;");La.vertex=!0;v.insert(La);v.style+=A(e,m)+z(e,m)+"strokeColor=none;";break;case "iOSTimePicker":Oa=new mxCell("",new mxGeometry(0,0,.25*w,.2*t),"strokeColor=none;fillColor=none;");Oa.vertex=!0;v.insert(Oa);Oa.value=c(e.Option11);Oa.style+=l(e.Option11);Pa=new mxCell("",new mxGeometry(.25*w,0,.3*w,.2*t),"strokeColor=none;fillColor=none;");Pa.vertex=!0;v.insert(Pa);Pa.value=c(e.Option21);Pa.style+= +l(e.Option21);Ra=new mxCell("",new mxGeometry(0,.2*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");Ra.vertex=!0;v.insert(Ra);Ra.value=c(e.Option12);Ra.style+=l(e.Option12);Sa=new mxCell("",new mxGeometry(.25*w,.2*t,.3*w,.2*t),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=c(e.Option22);Sa.style+=l(e.Option22);oa=new mxCell("",new mxGeometry(0,.4*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");oa.vertex=!0;v.insert(oa);oa.value=c(e.Option13);oa.style+=l(e.Option13);pa=new mxCell("", +new mxGeometry(.25*w,.4*t,.3*w,.2*t),"strokeColor=none;fillColor=none;");pa.vertex=!0;v.insert(pa);pa.value=c(e.Option23);pa.style+=l(e.Option23);qa=new mxCell("",new mxGeometry(.7*w,.4*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(e.Option33);qa.style+=l(e.Option33);ra=new mxCell("",new mxGeometry(0,.6*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(e.Option14);ra.style+=l(e.Option14);Va=new mxCell("",new mxGeometry(.25* +w,.6*t,.3*w,.2*t),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(e.Option24);Va.style+=l(e.Option24);Xa=new mxCell("",new mxGeometry(.7*w,.6*t,.15*w,.2*t),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(e.Option34);Xa.style+=l(e.Option34);sa=new mxCell("",new mxGeometry(0,.8*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(e.Option15);sa.style+=l(e.Option15);Ya=new mxCell("",new mxGeometry(.25*w,.8*t,.3*w,.2* +t),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(e.Option25);Ya.style+=l(e.Option25);Ka=new mxCell("",new mxGeometry(0,.4*t-2,w,4),"shape=line;strokeColor=#888888;");Ka.vertex=!0;v.insert(Ka);La=new mxCell("",new mxGeometry(0,.6*t-2,w,4),"shape=line;strokeColor=#888888;");La.vertex=!0;v.insert(La);v.style+=A(e,m)+z(e,m)+"strokeColor=none;";break;case "iOSCountdownPicker":Qa=new mxCell("",new mxGeometry(.45*w,0,.2*w,.2*t),"strokeColor=none;fillColor=none;");Qa.vertex=!0; +v.insert(Qa);Qa.value=c(e.Option31);Qa.style+=l(e.Option31);Ta=new mxCell("",new mxGeometry(.45*w,.2*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");Ta.vertex=!0;v.insert(Ta);Ta.value=c(e.Option32);Ta.style+=l(e.Option32);oa=new mxCell("",new mxGeometry(0,.4*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");oa.vertex=!0;v.insert(oa);oa.value=c(e.Option13);oa.style+=l(e.Option13);pa=new mxCell("",new mxGeometry(.2*w,.4*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");pa.vertex=!0;v.insert(pa);pa.value= +c(e.Option23);pa.style+=l(e.Option23);Ua=new mxCell("",new mxGeometry(.45*w,.4*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(e.Option33);Ua.style+=l(e.Option33);qa=new mxCell("",new mxGeometry(.6*w,.4*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(e.Option43);qa.style+=l(e.Option43);ra=new mxCell("",new mxGeometry(0,.6*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(e.Option14);ra.style+= +l(e.Option14);Wa=new mxCell("",new mxGeometry(.45*w,.6*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(e.Option34);Wa.style+=l(e.Option34);sa=new mxCell("",new mxGeometry(0,.8*t,.25*w,.2*t),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(e.Option15);sa.style+=l(e.Option15);Za=new mxCell("",new mxGeometry(.45*w,.8*t,.2*w,.2*t),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(e.Option35);Za.style+=l(e.Option35);Ka= +new mxCell("",new mxGeometry(0,.4*t-2,w,4),"shape=line;strokeColor=#888888;");Ka.vertex=!0;v.insert(Ka);La=new mxCell("",new mxGeometry(0,.6*t-2,w,4),"shape=line;strokeColor=#888888;");La.vertex=!0;v.insert(La);v.style+=A(e,m)+z(e,m)+"strokeColor=none;";break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*e.SeparatorInset+";";v.style+=h(e.text)+f(e.text)+b(e.text)+y(e.text);v.value=c(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":U= +new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);break;case "DetailDisclosure":U=new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);var ga=new mxCell("",new mxGeometry(.79*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "DetailIndicator":ga=new mxCell("",new mxGeometry(.87* +w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "CheckMark":U=new mxCell("",new mxGeometry(.89*w,.37*t,.4*t,.26*t),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),U.vertex=!0,v.insert(U)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.6*e.SeparatorInset+";";v.style+=h(e.subtext)+ +f(e.subtext)+b(e.subtext);v.value=c(e.subtext);var ia=new mxCell("",new mxGeometry(0,.4*t,w,.6*t),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*e.SeparatorInset+";");ia.vertex=!0;v.insert(ia);ia.style+=h(e.text)+f(e.text)+b(e.text);ia.value=c(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":U=new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);break;case "DetailDisclosure":U= +new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);ga=new mxCell("",new mxGeometry(.79*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "DetailIndicator":ga=new mxCell("",new mxGeometry(.87*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "CheckMark":U=new mxCell("", +new mxGeometry(.89*w,.37*t,.4*t,.26*t),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),U.vertex=!0,v.insert(U)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*e.SeparatorInset+";";v.style+=h(e.subtext)+f(e.subtext)+b(e.subtext);v.value=c(e.subtext);ia=null;switch(e.AccessoryIndicatorType){case "Disclosure":U=new mxCell("",new mxGeometry(.91*w,.35* +t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);ia=new mxCell("",new mxGeometry(.55*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":U=new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);ga=new mxCell("",new mxGeometry(.79*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0; +v.insert(ga);ia=new mxCell("",new mxGeometry(.45*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":ga=new mxCell("",new mxGeometry(.87*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);ia=new mxCell("",new mxGeometry(.52*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":U=new mxCell("",new mxGeometry(.89*w,.37*t,.4*t,.26*t),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"); +U.vertex=!0;v.insert(U);ia=new mxCell("",new mxGeometry(.55*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:ia=new mxCell("",new mxGeometry(.65*w,0,.3*w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;")}ia.vertex=!0;v.insert(ia);ia.style+=h(e.text)+f(e.text)+b(e.text);ia.value=c(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";var Ha=new mxCell("",new mxGeometry(0,0,.25* +w,t),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ha.vertex=!0;v.insert(Ha);Ha.style+=h(e.subtext)+f(e.subtext)+b(e.subtext);Ha.value=c(e.subtext);ia=new mxCell("",new mxGeometry(.25*w,0,.5*w,t),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");ia.vertex=!0;v.insert(ia);ia.style+=h(e.text)+f(e.text)+b(e.text);ia.value=c(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":U=new mxCell("",new mxGeometry(.91* +w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);break;case "DetailDisclosure":U=new mxCell("",new mxGeometry(.91*w,.35*t,.15*t,.3*t),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");U.vertex=!0;v.insert(U);ga=new mxCell("",new mxGeometry(.79*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ga.vertex=!0;v.insert(ga);break;case "DetailIndicator":ga=new mxCell("",new mxGeometry(.87*w,.25*t,.5*t,.5*t),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;"); +ga.vertex=!0;v.insert(ga);break;case "CheckMark":U=new mxCell("",new mxGeometry(.89*w,.37*t,.4*t,.26*t),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),U.vertex=!0,v.insert(U)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";R=new mxCell("",new mxGeometry(0,0,w,.4*t),"fillColor=none;strokeColor=none;spacing=10;align=left;");R.vertex=!0;v.insert(R);R.style+=h(e.text)+f(e.text)+b(e.text);R.value=c(e.text); +va=new mxCell("",new mxGeometry(0,.6*t,w,.4*t),"fillColor=none;strokeColor=none;spacing=10;align=left;");va.vertex=!0;v.insert(va);va.style+=h(e["bottom-text"])+f(e["bottom-text"])+b(e["bottom-text"]);va.value=c(e["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.style+=h(e.text)+f(e.text)+b(e.text);v.value=c(e.text);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var r=new mxCell("", +new mxGeometry(0,0,.9*w,.9*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e);var x=new mxCell("",new mxGeometry(.1*w,.1*t,.9*w,.9*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e);x.value=c(e.Text);e.Future&&(r.style+="dashed=1;",x.style+="dashed=1;")}else e.Future&&(v.style+="dashed=1;"),v.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e),v.value=c(e.Text);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":v.style+= +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e);r=null;switch(q.Class){case "SMHome":r=new mxCell("",new mxGeometry(.5*w-.4*t,.1*t,.8*t,.8*t),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":r=new mxCell("",new mxGeometry(.5*w-.4*t,.19*t,.8*t,.62*t),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":r=new mxCell("",new mxGeometry(.5*w-.4*t,.1*t,.8*t,.8*t),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMSettings":r=new mxCell("",new mxGeometry(.5*w-.35*t,.15*t,.7*t,.7*t),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":r=new mxCell("",new mxGeometry(.5*w-.35*t,.2*t,.7*t,.6*t),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":r=new mxCell("",new mxGeometry(.5*w-.3*t,.25*t,.6*t,.5*t),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMVideo":r=new mxCell("",new mxGeometry(.5*w-.4*t,.2*t,.8*t,.6*t),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":r=new mxCell("",new mxGeometry(.5*w-.3*t,.2*t,.6*t,.6*t),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":r=new mxCell("",new mxGeometry(.5*w-.4*t,.15*t,.8*t,.7*t),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMChart":var H=A(e,m),H=""==H?"#ffffff;":H.replace("fillColor=",""),r=new mxCell("",new mxGeometry(.5*w-.35*t,.15*t,.7*t,.7*t),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+H);break;case "SMCloud":r=new mxCell("",new mxGeometry(.5*w-.4*t,.27*t,.8*t,.46*t),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":r=new mxCell("",new mxGeometry(.5*w-.25*t,.15*t,.5*t,.7*t),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMForm":r=new mxCell("",new mxGeometry(.5*w-.4*t,.15*t,.8*t,.7*t),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":r=new mxCell("",new mxGeometry(.5*w-.4*t,.2*t,.8*t,.6*t),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":r=new mxCell("",new mxGeometry(.5*w-.4*t,.2*t,.8*t,.6*t),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}r.vertex= +!0;v.insert(r);r.style+=l(e);r.value=c(e.Text);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";r=new mxCell("",new mxGeometry(.1*w,0,.9*w,.9*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e);x=new mxCell("",new mxGeometry(0,.1*t,.9*w,.9*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Text);x.value=c(e.Text);break;case "UMLConstraintBlock":var Wb=new mxCell("",new mxGeometry(0,0,.25*t,t),"shape=curlyBracket;rounded=1;"); +Wb.vertex=!0;v.insert(Wb);var Xb=new mxCell("",new mxGeometry(w-.25*t,0,.25*t,t),"shape=curlyBracket;rounded=1;flipH=1;");Xb.vertex=!0;v.insert(Xb);za=new mxCell("",new mxGeometry(.25*t,0,w-.5*t,t),"strokeColor=none;fillColor=none;");za.vertex=!0;za.value=c(e);v.insert(za);v.style="strokeColor=none;fillColor=none;";v.style+=P(e,m,v);Wb.style+=p(e,m)+z(e,m)+E(e)+F(e)+B(e);Xb.style+=p(e,m)+z(e,m)+E(e)+F(e)+B(e);za.style+=h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+n(e)+C(e)+D(e)+y(e);break;case "UMLTextBlock":v.style+= +"strokeColor=none;"+z(e,m)+E(e)+F(e)+B(e)+l(e.Text);v.value=c(e.Text);break;case "BPMNActivity":switch(e.bpmnActivityType){case 1:v.style+=A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+B(e)+l(e.Text);v.value=c(e.Text);break;case 2:v.style+="shape=ext;double=1;"+A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+B(e)+l(e.Text);v.value=c(e.Text);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+A(e,m)+p(e,m)+z(e,m)+E(e)+B(e)+l(e.Text);v.value=c(e.Text);break;case 4:v.style+="shape=ext;strokeWidth=2;"+A(e,m)+p(e,m)+z(e,m)+E(e)+ +F(e)+l(e.Text),v.value=c(e.Text)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:r=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");r.geometry.offset=new mxPoint(4,7);break;case 2:r=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");r.geometry.offset=new mxPoint(4,7);break;case 3:r=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");r.geometry.offset=new mxPoint(4,5);break;case 4:r=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;"); +r.geometry.offset=new mxPoint(4,7);break;case 5:r=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");r.geometry.offset=new mxPoint(4,7);break;case 6:r=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");r.geometry.offset=new mxPoint(4,5);break;case 7:r=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),r.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Lb=A(e,m),H=p(e,m),H=H.replace("strokeColor","fillColor"), +Lb=Lb.replace("fillColor","strokeColor");""==H&&(H="fillColor=#000000;");""==Lb&&(Lb="strokeColor=#ffffff;");r.style+=Lb+H+"part=1;"}else r.style+=A(e,m)+p(e,m)+"part=1;";r.geometry.relative=!0;r.vertex=!0;v.insert(r)}var Mb=0;0!=e.bpmnActivityMarker1&&Mb++;0!=e.bpmnActivityMarker2&&Mb++;var wa=0;1==Mb?wa=-7.5:2==Mb&&(wa=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+= +A(e,m)+p(e,m);break;case 2:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 3:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 4:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 5:r=new mxCell("", +new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");r.geometry.offset=new mxPoint(wa,-17);H=p(e,m);H=H.replace("strokeColor","fillColor");""==H&&(H="fillColor=#000000;");r.style+=H;break;case 6:r=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),r.geometry.offset=new mxPoint(wa,-18),r.style+=A(e,m)+p(e,m)}r.geometry.relative=!0;r.vertex=!0;v.insert(r)}2==Mb&&(wa=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:r= +new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 2:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 3:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 4:r=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;"); +r.geometry.offset=new mxPoint(wa,-20);r.style+=A(e,m)+p(e,m);break;case 5:r=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");r.geometry.offset=new mxPoint(wa,-17);H=p(e,m);H=H.replace("strokeColor","fillColor");""==H&&(H="fillColor=#000000;");r.style+=H;break;case 6:r=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),r.geometry.offset=new mxPoint(wa,-18),r.style+=A(e,m)+p(e,m)}r.geometry.relative=!0;r.vertex=!0; +v.insert(r)}break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;"+A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+n(e)+C(e)+D(e);v.value=c(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(e.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+= +"outline=end;"}switch(e.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+= +"symbol=terminate;"}break;case "BPMNConversation":v.style+="shape=hexagon;"+A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+l(e);v.value=c(e.Text);v.style=0==e.bpmnConversationType?v.style+B(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(r=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),r.geometry.offset=new mxPoint(-6,-17),r.style+=A(e,m)+p(e,m),r.geometry.relative=!0,r.vertex=!0,v.insert(r));break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;"+ +A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+l(e);switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}break; +case "BPMNData":v.style+="shape=note;size=14;"+A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+l(e);switch(e.bpmnDataType){case 1:r=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");r.geometry.offset=new mxPoint(-6,-15);r.style+=A(e,m)+p(e,m);r.geometry.relative=!0;r.vertex=!0;v.insert(r);break;case 2:r=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");r.geometry.offset=new mxPoint(3,3);r.style+=A(e,m)+p(e,m);r.geometry.relative=!0;r.vertex=!0; +v.insert(r);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";R=new mxCell("",new mxGeometry(0,0,w,20),"strokeColor=none;fillColor=none;");R.geometry.offset=new mxPoint(0,14);R.geometry.relative=!0;R.vertex=!0;v.insert(R);R.value=c(e.Text);R.style+=l(e);break;case 3:r=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),r.geometry.offset=new mxPoint(3,3),r.style+=p(e,m),r.geometry.relative=!0,r.vertex=!0,v.insert(r),H=p(e,m),H=H.replace("strokeColor", +"fillColor"),""==H&&(H="fillColor=#000000;"),r.style+=H,R=new mxCell("",new mxGeometry(0,0,w,20),"strokeColor=none;fillColor=none;"),R.geometry.offset=new mxPoint(0,14),R.geometry.relative=!0,R.vertex=!0,v.insert(R),R.value=c(e.Text),R.style+=l(e)}break;case "BPMNBlackPool":v.style+=A(e,m)+p(e,m)+z(e,m)+E(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,w,t),"fillColor=#000000;strokeColor=none;opacity=30;");r.vertex=!0;v.insert(r);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;"; +r=new mxCell("",new mxGeometry(0,0,.95*w,.95*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e);x=new mxCell("",new mxGeometry(.05*w,.05*t,.95*w,.95*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Text);x.value=c(e.Text);break;case "GSDFDDataStoreBlock":v.style+="shape=partialRectangle;right=0;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Text);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,.2*w,t),"part=1;");r.vertex=!0;v.insert(r);r.style+= +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Number);r.value=c(e.Number);break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==q.Class?v.value=c(e.Text):"VSMProductionControlBlock"==q.Class&&(v.value=c(e.Resources));v.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+C(e)+D(e)+y(e);"VSMDedicatedProcessBlock"==q.Class&&(r=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"), +r.geometry.relative=!0,r.geometry.offset=new mxPoint(4,-13),r.vertex=!0,v.insert(r),r.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e));R=new mxCell("",new mxGeometry(0,0,w,15),"strokeColor=none;fillColor=none;part=1;");R.vertex=!0;v.insert(R);R.value=c(e.Title);R.style+=l(e.Title);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=c(e.Text);v.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+C(e)+n(e)+ +D(e);R=new mxCell("",new mxGeometry(.1*w,.3*t,.8*w,.6*t),"part=1;");R.vertex=!0;v.insert(R);R.value=c(e.Resource);R.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e.Resource);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+C(e)+D(e);v.value=c(e.Text);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";var ta=t,Ma=parseInt(e.Cells), +M=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+"part=1;";0<Ma&&(ta/=Ma);I=[];ha=[];for(k=1;k<=Ma;k++)I[k]=new mxCell("",new mxGeometry(0,(k-1)*ta,w,ta),M),I[k].vertex=!0,v.insert(I[k]),I[k].value=c(e["cell_"+k]),I[k].style+=l(e["cell_"+k]);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+h(e)+f(e)+b(e)+a(e)+d(e)+g(e)+n(e)+C(e)+D(e);v.value=c(e.Text);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;"+ +A(e,m);ta=t;Ma=parseInt(e.Cells);M=p(e,m)+z(e,m)+B(e)+"part=1;fillColor=none;";0<Ma&&(ta/=Ma);I=[];Ha=[];for(k=1;k<=Ma;k++)I[k]=new mxCell("",new mxGeometry(.5*w,(k-1)*ta,.5*w,ta),"shape=partialRectangle;left=0;"+M),I[k].vertex=!0,v.insert(I[k]),Ha[k]=new mxCell("",new mxGeometry(0,(k-1)*ta,w,ta),"strokeColor=none;fillColor=none;part=1;"),Ha[k].vertex=!0,v.insert(Ha[k]),Ha[k].value=c(e["cell_"+k]),Ha[k].style+=l(e["cell_"+k]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18"; +v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.17*w,.2*t,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+A(e,m)+z(e,m)+B(e);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";M="shape=card;size=18;flipH=1;part=1;"+p(e,m)+A(e,m)+z(e,m)+B(e);r=new mxCell("", +new mxGeometry(.1*w,0,.9*w,.8*t),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;");r.vertex=!0;v.insert(r);r.style+=M;x=new mxCell("",new mxGeometry(.05*w,.1*t,.9*w,.8*t),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=M;var G=new mxCell("",new mxGeometry(0,.2*t,.9*w,.8*t),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;");G.vertex=!0;v.insert(G);G.style+=M+ +l(e);G.value=c(e.Text);break;case "AWSRoundedRectangleContainerBlock2":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"), +x.geometry.relative=!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.Beanstalk?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"), +x.geometry.relative=!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.EC2?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),x.geometry.relative= +!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.Subnet?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),x.geometry.relative= +!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.VPC?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),x.geometry.relative= +!0,x.geometry.offset=new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.AWS?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),x.geometry.relative=!0,x.geometry.offset= +new mxPoint(30,0),x.vertex=!0,v.insert(x)):e.Corporate?(r=new mxCell("",new mxGeometry(0,0,w,t-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),r.geometry.offset=new mxPoint(0,20),r.geometry.relative=!0,r.vertex=!0,v.insert(r),r.style+=p(e,m)+l(e.Title)+F(e)+B(e),r.value=c(e.Title),x=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),x.geometry.relative=!0,x.geometry.offset= +new mxPoint(30,0),x.vertex=!0,v.insert(x)):(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"+p(e,m)+l(e.Title)+F(e)+B(e),v.value=c(e.Title));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+l(e.Title)+A(e,m)+z(e,m)+E(e);v.value=c(e.Title);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+ +l(e.Title)+A(e,m)+z(e,m)+E(e);v.value=c(e.Title);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;"+l(e.Title)+A(e,m)+z(e,m)+E(e);v.value=c(e.Title);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";var V=new mxCell("",new mxGeometry(.25*w,.25*t,.5*w,.5*t),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");V.vertex=!0;v.insert(V);var aa=[V];V.style+=A(e, +m);var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;ka(.5*w,0,S,L,K,aa,v,V);ka(.855*w,.145*t,S,L,K,aa,v,V);ka(w,.5*t,S,L,K,aa,v,V);ka(.855*w,.855*t,S,L,K,aa,v,V);ka(.5*w,t,S,L,K,aa,v,V);ka(.145*w,.855*t,S,L,K,aa,v,V);ka(0,.5*t,S,L,K,aa,v,V);ka(.145*w,.145*t,S,L,K,aa,v,V);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";V=new mxCell("",new mxGeometry(0,.5*t- +10,w,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");V.vertex=!0;v.insert(V);aa=[V];S=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;for(var aa=[V],Nb=w/e.NumTopNodes,k=0;k<e.NumTopNodes;k++)ka(.5*Nb+k*Nb,0,S,L,K,aa,v,V);Nb=w/e.NumBottomNodes;for(k=0;k<e.NumBottomNodes;k++)ka(.5* +Nb+k*Nb,t,S,L,K,aa,v,V);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+l(e);v.value=c(e.Title);e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);"EIMessageChannelBlock"== +q.Class?(r=new mxCell("",new mxGeometry(.5,.5,.9*w,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),r.geometry.offset=new mxPoint(.45*-w,0)):"EIDatatypeChannelBlock"==q.Class?(r=new mxCell("",new mxGeometry(.5,.5,.9*w,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),r.geometry.offset=new mxPoint(.45*-w,0)):"EIInvalidMessageChannelBlock"==q.Class?(r=new mxCell("",new mxGeometry(.5,.5,.9*w,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),r.geometry.offset= +new mxPoint(.45*-w,0)):"EIDeadLetterChannelBlock"==q.Class?(r=new mxCell("",new mxGeometry(.5,.5,.9*w,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),r.geometry.offset=new mxPoint(.45*-w,0)):"EIGuaranteedDeliveryBlock"==q.Class&&(r=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),r.geometry.offset=new mxPoint(-10,-7));r.geometry.relative=!0;r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); +S.geometry.relative=!0;S.edge=!0;ea(.15*w,.25*t,.85*w,.25*t,S,L,K,aa,v,V);break;case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,.07*t,.21*w,.86*t),"fillColor=#FFFF33;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e)+F(e);x=new mxCell("",new mxGeometry(.26*w,.09*t,.2*w,.82*t),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");x.vertex=!0;v.insert(x); +x.style+=p(e,m)+z(e,m)+B(e)+F(e);G=new mxCell("",new mxGeometry(1,.5,.35*w,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");G.geometry.relative=!0;G.geometry.offset=new mxPoint(.4*-w,-10);G.vertex=!0;v.insert(G);G.style+=p(e,m)+z(e,m)+B(e)+F(e);O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");O.geometry.relative=!0;O.edge=!0;r.insertEdge(O,!0);x.insertEdge(O, +!1);O.style+=p(e,m);L.push(K.addCell(O,null,null,null,null));N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");N.geometry.relative=!0;N.edge=!0;x.insertEdge(N,!0);G.insertEdge(N,!1);L.push(K.addCell(N,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+= +"strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);for(var Ob=e.Messages,dc=(t-17)/Ob,x=[],S=[],k=0;k<Ob;k++){var Pb=dc*(k+1)-3;x[k]=new mxCell("",new mxGeometry(w-20,Pb,20,20),"part=1;");x[k].vertex=!0;v.insert(x[k]);x[k].style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e);switch(q.Class){case "EIMessageBlock":x[k].value=c(e["message_"+ +(k+1)]);x.style+=l(e["message_"+(k+1)]);break;case "EICommandMessageBlock":x[k].value="C";x[k].style+="fontStyle=1;fontSize=10;";break;case "EIDocumentMessageBlock":x[k].value="D";x[k].style+="fontStyle=1;fontSize=10;";break;case "EIEventMessageBlock":x[k].value="E",x[k].style+="fontStyle=1;fontSize=10;"}S[k]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");S[k].geometry.relative=!0;S[k].edge=!0;r.insertEdge(S[k],!1); +x[k].insertEdge(S[k],!0);S[k].style+=p(e,m)+B(e);var eb=[];eb.push(new mxPoint(fa+8.5,na+Pb+10));S[k].geometry.points=eb;L.push(K.addCell(S[k],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.45*w,.25*t,.3*w,.5*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); +S.geometry.relative=!0;S.edge=!0;ea(0,.5*t,.4*w,.5*t,S,L,K,aa,v,V);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);var O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");O.geometry.relative=!0;O.edge=!0;ea(.05*w,.5*t,.85*w,.5*t,O,L,K,aa,v,V);var N=new mxCell("",new mxGeometry(0,0,0,0), +"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");N.geometry.relative=!0;N.edge=!0;ea(.05*w,.5*t,.85*w,.15*t,N,L,K,aa,v,V);var X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");X.geometry.relative=!0;X.edge=!0;ea(.05*w,.5*t,.85*w,.85*t,X,L,K,aa,v,V);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");O.geometry.relative=!0;O.edge=!0;O.style+=p(e,m);ea(.05*w,.5*t,.95*w,.5*t,O,L,K,aa,v,V);N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); +N.geometry.relative=!0;N.edge=!0;N.style+=p(e,m);ea(.3*w,.1*t,.3*w,.5*t,N,L,K,aa,v,V);X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");X.geometry.relative=!0;X.edge=!0;X.style+=p(e,m);ea(.7*w,.1*t,.7*w,.5*t,X,L,K,aa,v,V);var ja=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); +ja.geometry.relative=!0;ja.edge=!0;ja.style+=p(e,m);ea(.5*w,.5*t,.5*w,.9*t,ja,L,K,aa,v,V);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.2*w,.21*t,.16*w,.24*t),"part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e);O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;"); +O.geometry.relative=!0;O.edge=!0;ea(.45*w,.33*t,.8*w,.33*t,O,L,K,aa,v,V);x=new mxCell("",new mxGeometry(.64*w,.55*t,.16*w,.24*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+z(e,m)+B(e);N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");N.geometry.relative=!0;N.edge=!0;ea(.55*w,.67*t,.2*w,.67*t,N,L,K,aa,v,V);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.1*w,.15*t,.8*w,.7*t),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+z(e,m)+B(e);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.04*w,.06*t,.18*w,.28*t),"shape=ellipse;fillColor=#808080;part=1;");r.vertex=!0;v.insert(r);r.style+= +p(e,m)+B(e);x=new mxCell("",new mxGeometry(.2*w,.56*t,.2*w,.32*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+z(e,m)+B(e)+F(e);x.value="A";x.style+="fontStyle=1;fontSize=10;";O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");O.geometry.relative=!0;O.edge=!0;r.insertEdge(O,!1);x.insertEdge(O,!0);O.style+=p(e,m)+B(e);eb=[];eb.push(new mxPoint(fa+.13*w,na+.72*t));O.geometry.points=eb;L.push(K.addCell(O,null, +null,null,null));G=new mxCell("",new mxGeometry(.6*w,.06*t,.18*w,.28*t),"shape=ellipse;fillColor=#808080;part=1;");G.vertex=!0;v.insert(G);G.style+=p(e,m)+B(e);Q=new mxCell("",new mxGeometry(.76*w,.56*t,.2*w,.32*t),"part=1;");Q.vertex=!0;v.insert(Q);Q.style+=p(e,m)+z(e,m)+B(e)+F(e);Q.value="B";Q.style+="fontStyle=1;fontSize=10;";N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");N.geometry.relative=!0;N.edge=!0; +G.insertEdge(N,!1);Q.insertEdge(N,!0);N.style+=p(e,m)+B(e);var nc=[];nc.push(new mxPoint(fa+.69*w,na+.72*t));N.geometry.points=nc;L.push(K.addCell(N,null,null,null,null));X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");X.geometry.relative=!0;X.edge=!0;r.insertEdge(X,!1);G.insertEdge(X,!0);X.style+=p(e,m)+B(e);L.push(K.addCell(X,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("1",new mxGeometry(.2*w,.4*t,.1*w,.19*t),"fontStyle=1;fontSize=10;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);x=new mxCell("2",new mxGeometry(.45*w,.4*t,.1*w,.19*t),"fontStyle=1;fontSize=10;part=1;");x.vertex=!0;v.insert(x);x.style+=p(e,m)+B(e);G=new mxCell("3",new mxGeometry(.7*w,.4*t,.1*w,.19*t),"fontStyle=1;fontSize=10;part=1;");G.vertex=!0;v.insert(G);G.style+=p(e,m)+B(e);O=new mxCell("",new mxGeometry(0,0,0,0), +"curved=1;endArrow=block;html=1;endSize=3;part=1;");r.insertEdge(O,!1);x.insertEdge(O,!0);O.geometry.points=[new mxPoint(fa+.375*w,na+.15*t)];O.geometry.relative=!0;O.edge=!0;O.style+=p(e,m)+B(e);L.push(K.addCell(O,null,null,null,null));N=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");x.insertEdge(N,!1);G.insertEdge(N,!0);N.geometry.points=[new mxPoint(fa+.675*w,na+.15*t)];N.geometry.relative=!0;N.edge=!0;N.style+=p(e,m)+B(e);L.push(K.addCell(N,null,null, +null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.3*w,.2*t,.4*w,.6*t),"shape=mxgraph.ios7.icons.clock;flipH=1;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+h(e)+f(e)+b(e)+a(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.38* +w,.42*t,.24*w,.16*t),"part=1;fillColor=#aefe7d;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);x=new mxCell("",new mxGeometry(.38*w,0,.24*w,.16*t),"part=1;");x.vertex=!0;v.insert(x);x.style+=A(e,m)+p(e,m)+B(e);G=new mxCell("",new mxGeometry(.76*w,.23*t,.24*w,.16*t),"part=1;");G.vertex=!0;v.insert(G);G.style=x.style;var Q=new mxCell("",new mxGeometry(.76*w,.61*t,.24*w,.16*t),"part=1;");Q.vertex=!0;v.insert(Q);Q.style=x.style;var Yb=new mxCell("",new mxGeometry(.38*w,.84*t,.24*w,.16*t),"part=1;");Yb.vertex= +!0;v.insert(Yb);Yb.style=x.style;var Zb=new mxCell("",new mxGeometry(0,.61*t,.24*w,.16*t),"part=1;");Zb.vertex=!0;v.insert(Zb);Zb.style=x.style;var $b=new mxCell("",new mxGeometry(0,.23*t,.24*w,.16*t),"part=1;");$b.vertex=!0;v.insert($b);$b.style=x.style;O=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(O,!1);x.insertEdge(O,!0);O.edge=!0;O.style+=p(e,m)+B(e);L.push(K.addCell(O,null,null,null,null));N=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(N, +!1);G.insertEdge(N,!0);N.edge=!0;N.style+=p(e,m)+B(e);L.push(K.addCell(N,null,null,null,null));X=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(X,!1);Q.insertEdge(X,!0);X.edge=!0;X.style+=p(e,m)+B(e);L.push(K.addCell(X,null,null,null,null));ja=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(ja,!1);Yb.insertEdge(ja,!0);ja.edge=!0;ja.style+=p(e,m)+B(e);L.push(K.addCell(ja,null,null,null,null));var ub=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;"); +r.insertEdge(ub,!1);Zb.insertEdge(ub,!0);ub.edge=!0;ub.style+=p(e,m)+B(e);L.push(K.addCell(ub,null,null,null,null));var vb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");r.insertEdge(vb,!1);$b.insertEdge(vb,!0);vb.edge=!0;vb.style+=p(e,m)+B(e);L.push(K.addCell(vb,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);O=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;"); +O.geometry.relative=!0;O.edge=!0;ea(.05*w,.5*t,.6*w,.25*t,O,L,K,aa,v,V);N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");N.geometry.relative=!0;N.edge=!0;ea(.05*w,.5*t,.6*w,.75*t,N,L,K,aa,v,V);r=new mxCell("",new mxGeometry(.7*w,.1*t,.15*w,.32*t),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+ +p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.25*w,.25*t,.5*w,.5*t),"shape=mxgraph.eip.control_bus;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;"+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);G=new mxCell("",new mxGeometry(w- +45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");G.vertex=!0;v.insert(G);G.style+=p(e,m)+B(e);X=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");X.geometry.relative=!0;X.edge=!0;r.insertEdge(X,!1);G.insertEdge(X,!0);X.style+=p(e,m)+B(e);X.geometry.points=[new mxPoint(fa+8.5,na+40)];L.push(K.addCell(X,null,null,null,null));Q=new mxCell("",new mxGeometry(w-45,t-20,20,20),"part=1;");Q.vertex=!0; +v.insert(Q);Q.value=c(e.message_0);Q.style+=l(e.message_0);Q.style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e);ja=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");ja.geometry.relative=!0;ja.edge=!0;r.insertEdge(ja,!1);Q.insertEdge(ja,!0);ja.style+=p(e,m)+B(e);ja.geometry.points=[new mxPoint(fa+8.5,na+t-10)];L.push(K.addCell(ja,null,null,null,null));Ob=e.HistoryMessages;dc=(t-75)/Ob;x=[];S=[];for(k=0;k<Ob;k++)Pb=dc*(k+1)+30, +x[k]=new mxCell("",new mxGeometry(w-20,Pb,20,20),"part=1;"),x[k].vertex=!0,x[k].value=c(e["message_"+(k+1)]),x.style+=l(e["message_"+(k+1)]),v.insert(x[k]),x[k].style+=p(e,m)+A(e,m)+z(e,m)+E(e)+B(e)+F(e),S[k]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),S[k].geometry.relative=!0,S[k].edge=!0,G.insertEdge(S[k],!1),x[k].insertEdge(S[k],!0),S[k].style+=p(e,m)+B(e),eb=[],eb.push(new mxPoint(fa+w-30,na+Pb+10)),S[k].geometry.points= +eb,L.push(K.addCell(S[k],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;"+p(e,m)+z(e,m)+E(e)+B(e)+P(e,m,v);F(e);0>e.DoorAngle&&(v.style+="flipV=1;");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;"+p(e,m)+z(e,m)+E(e)+B(e)+P(e,m,v)+F(e);0<e.DoorAngle&&(v.style+="flipV=1;");break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;"+P(e,m,v);r=new mxCell("",new mxGeometry(0,0,w,.25*t),"part=1;");r.vertex=!0;v.insert(r);r.style+= +p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e);for(var x=[],oc=.02*w,ec=(w-2*oc)/e.LightCount,pc=.8*ec,k=0;k<e.LightCount;k++)x[k]=new mxCell("",new mxGeometry(oc+ec*k+(ec-pc)/2,.25*t,pc,.75*t),"part=1;shape=ellipse;"),x[k].vertex=!0,v.insert(x[k]),x[k].style+=p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;"+P(e,m,v);for(var r=[],qc=w/e.SinkCount,k=0;k<e.SinkCount;k++)r[k]=new mxCell("",new mxGeometry(qc*k,0,qc,t),"part=1;shape=mxgraph.floorplan.sink_2;"), +r[k].vertex=!0,v.insert(r[k]),r[k].style+=p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var xa=.1*w/e.StallCount,r=new mxCell("",new mxGeometry(0,0,xa,t),"fillColor=#000000;part=1;");r.vertex=!0;v.insert(r);r.style+=p(e,m)+B(e);for(var Fa=(w-xa)/e.StallCount,fc=[],Qb=[],Rb=[],Sb=[],H=p(e,m),H=""==H?"#000000;":H.replace("stokreColor=",""),rc="part=1;fillColor="+H+p(e,m)+B(e),gc=A(e,m)+p(e,m)+B(e),k=0;k<e.StallCount;k++)fc[k]=new mxCell("", +new mxGeometry((k+1)*Fa,0,xa,t),rc),fc[k].vertex=!0,v.insert(fc[k]),Rb[k]=new mxCell("",new mxGeometry(xa+k*Fa+.05*(Fa-xa),t-.92*(Fa-xa),.9*(Fa-xa),.92*(Fa-xa)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Rb[k].vertex=!0,v.insert(Rb[k]),Rb[k].style+=gc,Qb[k]=new mxCell("",new mxGeometry(xa+k*Fa+.2*(Fa-xa),0,.6*(Fa-xa),.8*(Fa-xa)),"shape=mxgraph.floorplan.toilet;part=1;"),Qb[k].vertex=!0,v.insert(Qb[k]),Qb[k].style+=gc,Sb[k]=new mxCell("",new mxGeometry(xa+k*Fa,.42*t,.15*(Fa-xa),.12*(Fa-xa)), +"part=1;"),Sb[k].vertex=!0,v.insert(Sb[k]),Sb[k].style+=gc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ac="edgeStyle=none;endArrow=none;part=1;"+p(e,m)+B(e)+z(e,m)+E(e)+F(e),H=p(e,m),H=""==H?"#000000;":H.replace("stokreColor=",""),hc="shape=triangle;part=1;fillColor="+H+p(e,m)+B(e)+z(e,m)+E(e)+F(e),O=new mxCell("",new mxGeometry(0,0,0,0),ac);O.geometry.relative=!0;O.edge=!0;ea(0,.5*t,.65*w,.5*t,O,L,K,aa,v,V);for(var J=t/e.numLines,N=[],hb=[],k=0;k<e.numLines;k++)N[k]= +new mxCell("",new mxGeometry(0,0,0,0),ac),N[k].geometry.relative=!0,N[k].edge=!0,ea(.65*w,.5*t,.96*w,(k+.5)*J,N[k],L,K,aa,v,V),hb[k]=new mxCell("",new mxGeometry(.95*w,(k+.2)*J,.05*w,.6*J),hc),hb[k].vertex=!0,v.insert(hb[k]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";ac="edgeStyle=none;endArrow=none;part=1;"+p(e,m)+B(e)+z(e,m)+E(e)+F(e);H=p(e,m);H=""==H?"#000000;":H.replace("stokreColor=","");hc="shape=triangle;part=1;fillColor="+H+p(e,m)+B(e)+z(e,m)+E(e)+F(e);J=t/e.numLines; +N=[];hb=[];for(k=0;k<e.numLines;k++)N[k]=new mxCell("",new mxGeometry(0,0,0,0),ac),N[k].geometry.relative=!0,N[k].edge=!0,ea(0,(k+.5)*J,.96*w,(k+.5)*J,N[k],L,K,aa,v,V),hb[k]=new mxCell("",new mxGeometry(.95*w,(k+.2)*J,.05*w,.6*J),hc),hb[k].vertex=!0,v.insert(hb[k]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e)+l(e);v.value=c(e.Text);switch(e.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break; +case 2:v.style+="shape=hexagon;size=0.10;direction=south;"}break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e)+l(e);v.value=c(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"+p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e)+l(e);v.value= +c(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;"+P(e,m,v)+l(e);v.value=c(e.Text);M=p(e,m)+A(e,m)+B(e)+z(e,m)+E(e)+F(e);r=new mxCell("",new mxGeometry(0,.2*t,w,.6*t),"part=1;shape=trapezoid;direction=south;");r.vertex=!0;v.insert(r);r.style+=M;M+="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(O=new mxCell("",new mxGeometry(0, +0,0,0),""),O.geometry.relative=!0,O.edge=!0,O.style+=M,ea(0,0,0,.2*t,O,L,K,aa,v,V),N=new mxCell("",new mxGeometry(0,0,0,0),""),N.geometry.relative=!0,N.edge=!0,N.style+=M,ea(w,.67*t,w,t,N,L,K,aa,v,V)):(r.style+="flipH=1;",O=new mxCell("",new mxGeometry(0,0,0,0),""),O.geometry.relative=!0,O.edge=!0,O.style+=M,ea(0,0,0,.33*t,O,L,K,aa,v,V),N=new mxCell("",new mxGeometry(0,0,0,0),""),N.geometry.relative=!0,N.edge=!0,N.style+=M,ea(w,.8*t,w,t,N,L,K,aa,v,V));1==e.centerLineType&&(X=new mxCell("",new mxGeometry(0, +0,0,0),""),X.geometry.relative=!0,X.edge=!0,X.style+=M,ea(.2*w,.5*t,.8*w,.5*t,X,L,K,aa,v,V));break;case "PEMotorDrivenTurbineBlock":M=p(e,m)+A(e,m)+B(e)+z(e,m)+F(e);v.style+="shape=ellipse;"+E(e)+P(e,m,v)+l(e);v.value=c(e.Text);r=new mxCell("",new mxGeometry(.2*w,.2*t,.6*w,.6*t),"part=1;shape=trapezoid;direction=south;");r.vertex=!0;v.insert(r);r.style+=M;break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":M= +z(e,m);v.style+=M+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);switch(q.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+= +"shape=mxgraph.pid2inst.progLogCont;"}"PEIndicator2Block"==q.Class||"PESharedIndicator2Block"==q.Class?(r=new mxCell("",new mxGeometry(0,0,w,.5*w),"part=1;strokeColor=none;fillColor=none;"),r.vertex=!0,v.insert(r),r.style+=M+l(e.TopText),r.value=c(e.TopText),x=new mxCell("",new mxGeometry(0,.5*w,w,.5*w),"part=1;strokeColor=none;fillColor=none;")):(r=new mxCell("",new mxGeometry(0,0,w,.5*t),"part=1;strokeColor=none;fillColor=none;"),r.vertex=!0,v.insert(r),r.style+=M+l(e.TopText),r.value=c(e.TopText), +x=new mxCell("",new mxGeometry(0,.5*t,w,.5*t),"part=1;strokeColor=none;fillColor=none;"));x.vertex=!0;v.insert(x);x.style+=M;l(e.BotText);x.value=c(e.BotText);switch(e.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var ic=!1;"PEPoweredValveBlock"== +q.Class?1!=e.poweredHandOperated&&(ic=!0):1!=e.handOperated&&(ic=!0);if(ic){var e=u(q).Properties,Y=e.BoundingBox,sc=Y.h;Y.h="PEAngleValveBlock"==q.Class||"PEAngleGlobeValveBlock"==q.Class?.7*Y.h:.6*Y.h;v=new mxCell("",new mxGeometry(Math.round(.6*Y.x+0),Math.round(.6*(Y.y+sc-Y.h)+0),Math.round(.6*Y.w),Math.round(.6*Y.h)),"");v.vertex=!0;Z(v,q)}if("PEPoweredValveBlock"==q.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;"+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+ +E(e)+P(e,m,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",r=new mxCell("",new mxGeometry(.325*w,0,.35*w,.35*t),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),r.vertex=!0,v.insert(r),r.style+=M+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+"fontSize=6;"+f(e.PoweredText)+b(e.PoweredText)+a(e.PoweredText)+d(e.PoweredText)+g(e.PoweredText)+C(e.PoweredText)+D(e.PoweredText)+y(e.PoweredText),r.value=c(e.PoweredText)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;"+ +z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v)+h(e)+f(e)+b(e)+a(e);v.value=c(e.Text);switch(q.Class){case "PEGateValveBlock":v.style+="valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;"+z(e,m)+p(e,m)+ +A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);1==e.vScroll&&(G=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(-20,110),G.vertex=!0,v.insert(G),v.style+="spacingRight=20;");1==e.hScroll&&(Q=1==e.vScroll?new mxCell("",new mxGeometry(0, +1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),Q.geometry.relative=!0,Q.geometry.offset=new mxPoint(0,-20),Q.vertex=!0,v.insert(Q));break;case "UI2WindowBlock":v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v)+h(e.Title)+f(e.Title)+b(e.Title);v.value= +c(e.Title);1==e.vScroll&&(G=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(-20,30),G.vertex=!0,v.insert(G),v.style+="spacingRight=20;");1==e.hScroll&&(Q=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"): +new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),Q.geometry.relative=!0,Q.geometry.offset=new mxPoint(0,-20),Q.vertex=!0,v.insert(Q));break;case "UI2DialogBlock":v.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v)+l(e.Text);v.value=c(e.Text);r=new mxCell("",new mxGeometry(0,0,w,30),"part=1;resizeHeight=0;");r.vertex=!0;v.insert(r);r.style+=M+l(e.Title);r.value=c(e.Title);x=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;"); +x.geometry.relative=!0;x.geometry.offset=new mxPoint(-25,-10);x.vertex=!0;r.insert(x);1==e.vScroll&&(G=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(-20,30),G.vertex=!0,v.insert(G),v.style+="spacingRight=20;"); +1==e.hScroll&&(Q=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),Q.geometry.relative=!0,Q.geometry.offset=new mxPoint(0,-20),Q.vertex=!0,v.insert(Q));break;case "UI2AccordionBlock":v.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);r=[];J=25;for(k=0;k<=e.Panels-1;k++)r[k]=k<e.Selected-1?new mxCell("", +new mxGeometry(0,k*J,w,J),"part=1;fillColor=#000000;fillOpacity=25;"):k==e.Selected-1?new mxCell("",new mxGeometry(0,k*J,w,J),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,t-(e.Panels-e.Selected)*J+(k-e.Selected)*J,w,J),"part=1;fillColor=#000000;fillOpacity=25;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=l(e["Panel_"+(k+1)]),r[k].value=c(e["Panel_"+(k+1)]),r[k].style.includes(";align=")||(r[k].style+="align=left;spacingLeft=5;");var da=p(e,m),da=da.replace("strokeColor","fillColor2");""== +da&&(da="fillColor2=#000000;");1==e.vScroll&&(x=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-e.Selected*J-20-(e.Panels-e.Selected)*J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-e.Selected*J-(e.Panels-e.Selected)*J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(-20,e.Selected*J),x.vertex=!0,v.insert(x),v.style+= +"spacingRight=20;",x.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));1==e.hScroll&&(G=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*J),G.vertex=!0,v.insert(G),G.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));Q=1==e.vScroll?new mxCell("", +new mxGeometry(0,e.Selected*J,w-20,t-e.Selected*J-20-(e.Panels-e.Selected)*J),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*J,w-20,t-e.Selected*J-(e.Panels-e.Selected)*J),"part=1;fillColor=none;strokeColor=none;");Q.vertex=!0;v.insert(Q);Q.style+=l(e.Content_1);Q.style.includes(";align=")||(Q.style+="align=left;spacingLeft=5;");Q.value=c(e.Content_1);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var r=[],x=[],J=25,Ba=3,T=(w+ +Ba)/(e.Tabs+1),Ca=new mxCell("",new mxGeometry(0,J,w,t-J),"part=1;");Ca.vertex=!0;v.insert(Ca);Ca.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);for(k=0;k<=e.Tabs-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(10+k*T,0,T-Ba,J),""),x[k].vertex=!0,v.insert(x[k]),x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Tab_"+(k+1)])):(r[k]=new mxCell("",new mxGeometry(10+k*T,0,T-Ba,J),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e),x[k]=new mxCell("",new mxGeometry(0, +0,T-Ba,J),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Tab_"+(k+1)])),x[k].value=c(e["Tab_"+(k+1)]),x[k].style.includes(";align=")||(x[k].style+="align=left;spacingLeft=2;");da=p(e,m);da=da.replace("strokeColor","fillColor2");""==da&&(da="fillColor2=#000000;");1==e.vScroll&&(x=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-20-J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("", +new mxGeometry(1,0,20,t-J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(-20,J),x.vertex=!0,v.insert(x),v.style+="spacingRight=20;",x.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));1==e.hScroll&&(G=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), +G.geometry.relative=!0,G.geometry.offset=new mxPoint(0,-20),G.vertex=!0,v.insert(G),G.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";r=[];x=[];J=25;Ba=3;T=(w+Ba)/e.Tabs;Ca=new mxCell("",new mxGeometry(0,J,w,t-J),"part=1;");Ca.vertex=!0;v.insert(Ca);Ca.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);for(k=0;k<=e.Tabs-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(k*T,0,T-Ba,J),""),x[k].vertex=!0,v.insert(x[k]), +x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Tab_"+(k+1)])):(r[k]=new mxCell("",new mxGeometry(k*T,0,T-Ba,J),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e),x[k]=new mxCell("",new mxGeometry(0,0,T-Ba,J),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Tab_"+(k+1)])),x[k].value=c(e["Tab_"+(k+1)]),x[k].style.includes(";align=")||(x[k].style+="align=left;spacingLeft=2;");da=p(e,m);da=da.replace("strokeColor", +"fillColor2");""==da&&(da="fillColor2=#000000;");1==e.vScroll&&(x=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-20-J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,t-J),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(-20,J),x.vertex=!0,v.insert(x),v.style+="spacingRight=20;",x.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+ +F(e));1==e.hScroll&&(G=1==e.vScroll?new mxCell("",new mxGeometry(0,1,w-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,w,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),G.geometry.relative=!0,G.geometry.offset=new mxPoint(0,-20),G.vertex=!0,v.insert(G),G.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";r=[];x=[];Ba=3;J=25+Ba; +T=80;ab=10;Ca=new mxCell("",new mxGeometry(T,0,w-T,t),"part=1;");Ca.vertex=!0;v.insert(Ca);Ca.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v);for(k=0;k<=e.Tabs-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(0,ab+k*J,T,J-Ba),""),x[k].vertex=!0,v.insert(x[k]),x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Tab_"+(k+1)])):(r[k]=new mxCell("",new mxGeometry(0,ab+k*J,T,J-Ba),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e),x[k]=new mxCell("",new mxGeometry(0, +0,T,J-Ba),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Tab_"+(k+1)])),x[k].value=c(e["Tab_"+(k+1)]),x[k].style.includes(";align=")||(x[k].style+="align=left;spacingLeft=2;");da=p(e,m);da=da.replace("strokeColor","fillColor2");""==da&&(da="fillColor2=#000000;");1==e.vScroll&&(x=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,t-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1, +0,20,t),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(-20,0),x.vertex=!0,v.insert(x),v.style+="spacingRight=20;",x.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));1==e.hScroll&&(G=1==e.vScroll?new mxCell("",new mxGeometry(T,1,w-20-T,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(T,1,w-T,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), +G.geometry.relative=!0,G.geometry.offset=new mxPoint(0,-20),G.vertex=!0,v.insert(G),G.style+=da+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";J=t/e.Options;r=[];x=[];for(k=0;k<e.Options;k++)r[k]=new mxCell("",new mxGeometry(0,k*J+.5*J-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Option_"+ +(k+1)]),null!=e.Selected[k+1]&&1==e.Selected[k+1]&&(H=p(e,m),H=H.replace("strokeColor","fillColor"),""==H&&(H="fillColor=#000000;"),x[k]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=H+z(e,m)+p(e,m)+B(e)+F(e)),r[k].value=c(e["Option_"+(k+1)]);break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";T=w/e.Options;r=[];x=[];for(k=0;k<e.Options;k++)r[k]=new mxCell("",new mxGeometry(k*T,.5* +t-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Option_"+(k+1)]),null!=e.Selected[k+1]&&1==e.Selected[k+1]&&(H=p(e,m),H=H.replace("strokeColor","fillColor"),""==H&&(H="fillColor=#000000;"),x[k]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=H+z(e,m)+p(e,m)+B(e)+F(e)), +r[k].value=c(e["Option_"+(k+1)]);break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";J=t/e.Options;r=[];x=[];for(k=0;k<e.Options;k++)r[k]=new mxCell("",new mxGeometry(0,k*J+.5*J-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Option_"+(k+1)]),null!=e.Selected&&e.Selected==k+1&&(H=p(e,m),H=H.replace("strokeColor","fillColor"), +""==H&&(H="fillColor=#000000;"),x[k]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=H+z(e,m)+p(e,m)+B(e)+F(e)),r[k].value=c(e["Option_"+(k+1)]);break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";T=w/e.Options;r=[];x=[];for(k=0;k<e.Options;k++)r[k]=new mxCell("",new mxGeometry(k*T,.5*t-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), +r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Option_"+(k+1)]),null!=e.Selected&&e.Selected==k+1&&(H=p(e,m),H=H.replace("strokeColor","fillColor"),""==H&&(H="fillColor=#000000;"),x[k]=new mxCell("",new mxGeometry(2,2,6,6),"shape=ellipse;part=1;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=H+z(e,m)+p(e,m)+B(e)+F(e)),r[k].value=c(e["Option_"+(k+1)]);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;"+ +z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e);"UI2VSliderBlock"==q.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";r=new mxCell("",new mxGeometry(0,0,.6*w,t),"part=1;");r.vertex=!0;v.insert(r);r.style+=z(e,m)+p(e,m)+B(e)+F(e)+E(e)+l(e.Date);r.value=c(e.Date);H=p(e,m);H=H.replace("strokeColor","fillColor");""==H&&(H="fillColor=#000000;");x=new mxCell("",new mxGeometry(.75*w,0,.25*w,t),"part=1;shape=mxgraph.gmdl.calendar;"); +x.vertex=!0;v.insert(x);x.style+=H+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e);break;case "UI2SearchBlock":v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+z(e,m)+p(e,m)+B(e)+F(e)+E(e)+h(e.Search)+f(e.Search)+b(e.Search);v.value=c(e.Search);break;case "UI2NumericStepperBlock":H=p(e,m);H=H.replace("strokeColor","fillColor");""==H&&(H="fillColor=#000000;");v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+ +H+z(e,m)+p(e,m)+B(e)+F(e)+E(e)+h(e.Number)+f(e.Number)+b(e.Number);v.value=c(e.Number);break;case "UI2ButtonBarBlock":v.style+=z(e,m)+p(e,m)+B(e)+F(e)+E(e);r=[];x=[];T=w/e.Buttons;for(k=0;k<=e.Buttons-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(k*T,0,T,t),""),x[k].vertex=!0,v.insert(x[k]),x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Button_"+(k+1)])):(r[k]=new mxCell("",new mxGeometry(k*T,0,T,t),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e), +x[k]=new mxCell("",new mxGeometry(0,0,T,t),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Button_"+(k+1)])),x[k].value=c(e["Button_"+(k+1)]);break;case "UI2VerticalButtonBarBlock":v.style+=z(e,m)+p(e,m)+B(e)+F(e)+E(e);r=[];x=[];J=t/e.Buttons;for(k=0;k<=e.Buttons-1;k++)k==e.Selected-1?(x[k]=new mxCell("",new mxGeometry(0,k*J,w,J),""),x[k].vertex=!0,v.insert(x[k]),x[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+l(e["Button_"+(k+1)])):(r[k]=new mxCell("", +new mxGeometry(0,k*J,w,J),"strokeColor=none;"),r[k].vertex=!0,v.insert(r[k]),r[k].style+=z(e,m)+A(e,m)+E(e),x[k]=new mxCell("",new mxGeometry(0,0,w,J),"fillColor=#000000;fillOpacity=25;"),x[k].vertex=!0,r[k].insert(x[k]),x[k].style+=p(e,m)+B(e)+F(e)+l(e["Button_"+(k+1)])),x[k].value=c(e["Button_"+(k+1)]);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;"+z(e,m)+p(e,m)+B(e)+F(e)+E(e);r=[];x=[];T=w/e.Links;for(k=0;k<e.Links;k++)0!=k?(x[k]=new mxCell("",new mxGeometry(k*T,0,T,t), +"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),x[k].style+=z(e,m)+E(e)+p(e,m)+B(e)+F(e)):x[k]=new mxCell("",new mxGeometry(k*T,0,T,t),"fillColor=none;strokeColor=none;"),x[k].vertex=!0,v.insert(x[k]),x[k].style+=l(e["Link_"+(k+1)]),x[k].value=c(e["Link_"+(k+1)]);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;"+z(e,m)+p(e,m)+B(e)+F(e)+E(e);r=[];x=[];T=w/e.Links;for(k=0;k<e.Links;k++)r[k]=new mxCell("",new mxGeometry(k*T,0,T,t),"fillColor=none;strokeColor=none;"), +r[k].vertex=!0,v.insert(r[k]),r[k].style+=l(e["Link_"+(k+1)]),r[k].value=c(e["Link_"+(k+1)]);for(k=1;k<e.Links;k++)x[k]=new mxCell("",new mxGeometry(k/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),x[k].geometry.relative=!0,x[k].geometry.offset=new mxPoint(-3,-5),x[k].vertex=!0,v.insert(x[k]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;"+z(e,m)+A(e,m)+E(e);r=[];T=w/(e.Buttons+1);for(k=0;k<=e.Buttons-1;k++)r[k]=k!=e.Selected-1?new mxCell("",new mxGeometry(0,0,T,t),"strokeColor=none;fillColor=none;resizeHeight=1;"): +new mxCell("",new mxGeometry(0,0,T,t),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),r[k].geometry.relative=!0,r[k].geometry.offset=new mxPoint(k*T,0),r[k].vertex=!0,v.insert(r[k]),r[k].style+=l(e["MenuItem_"+(k+1)]),r[k].value=c(e["MenuItem_"+(k+1)]);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+l(e.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+l(e.Text_prev); +v.value=c(e.Text_prev)+" ";for(k=0;k<e.Links;k++)v.value+=c(e["Link_"+(k+1)])+" ";v.value+=c(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=z(e,m)+A(e,m)+p(e,m)+B(e)+F(e)+E(e);for(var I=[],$a=[],wb=[],J=t/e.Lines,M=null,k=0;k<e.Lines;k++)null!=e["Item_"+(k+1)]&&(null==M&&(M=""+h(e["Item_"+(k+1)])+f(e["Item_"+(k+1)])+b(e["Item_"+(k+1)])),I[k]=new mxCell("",new mxGeometry(0,k*t/e.Lines,w,J),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),I[k].vertex=!0,v.insert(I[k]),I[k].style+= +M,I[k].value=c(e["Item_"+(k+1)])),null!=e.Icons[k+1]&&null!=I[k]&&("dot"==e.Icons[k+1]?($a[k]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),$a[k].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[k+1]&&($a[k]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),$a[k].geometry.offset=new mxPoint(6.5,-4)),null!=$a[k]&&($a[k].geometry.relative=!0,$a[k].vertex=!0,I[k].insert($a[k]),H=p(e,m),H=H.replace("strokeColor","fillColor"), +""==H&&(H="fillColor=#000000;"),$a[k].style+=H)),null!=e["Shortcut_"+(k+1)]&&(null==M&&(M=""+h(e["Shortcut_"+(k+1)])+f(e["Shortcut_"+(k+1)])+b(e["Shortcut_"+(k+1)])),wb[k]=new mxCell("",new mxGeometry(.6*w,k*t/e.Lines,.4*w,J),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),wb[k].vertex=!0,v.insert(wb[k]),wb[k].style+=M,wb[k].value=c(e["Shortcut_"+(k+1)])),null!=e.Dividers[k+1]&&(I[k]=new mxCell("",new mxGeometry(.05*w,k*t/e.Lines,.9*w,J),"shape=line;strokeWidth=0.25;"),I[k].vertex= +!0,v.insert(I[k]),I[k].style+=p(e,m));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "UI2TooltipSquareBlock":v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+z(e,m)+A(e,m)+p(e,m)+B(e)+F(e)+E(e)+l(e.Tip);v.value=c(e.Tip);break;case "UI2CalloutBlock":v.style+="shape=ellipse;"+z(e,m)+A(e,m)+p(e,m)+B(e)+F(e)+E(e)+l(e.Txt);v.value=c(e.Txt); +break;case "UI2AlertBlock":v.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+E(e)+P(e,m,v)+l(e.Txt);v.value=c(e.Txt);r=new mxCell("",new mxGeometry(0,0,w,30),"part=1;resizeHeight=0;");r.vertex=!0;v.insert(r);r.style+=M+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+l(e.Title);r.value=c(e.Title);x=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");x.geometry.relative=!0;x.geometry.offset=new mxPoint(-25,-10);x.vertex=!0;r.insert(x);for(var tc=45*e.Buttons+ +(10*e.Buttons-1),G=[],k=0;k<e.Buttons;k++)G[k]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),G[k].geometry.relative=!0,G[k].geometry.offset=new mxPoint(.5*-tc+55*k,-40),G[k].vertex=!0,v.insert(G[k]),G[k].style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+l(e["Button_"+(k+1)]),G[k].value=c(e["Button_"+(k+1)]);break;case "UMLClassBlock":if(0==e.Simple){var M=A(e,m),ya=.6*e.TitleHeight,M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ +M+"startSize="+ya+";"+z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+l(e.Title);v.value=c(e.Title);for(var I=[],jc=[],ua=ya/t,k=0;k<=e.Attributes;k++)0<k&&(jc[k]=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),jc[k].vertex=!0,v.insert(jc[k])),J=0,k<e.Attributes?(J=e["Text"+(k+1)+"Percent"],ua+=J):J=1-ua,I[k]=new mxCell("",new mxGeometry(0,0,w,(t- +ya)*J),"part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),I[k].vertex=!0,v.insert(I[k]),I[k].style+=M+z(e,m)+h(e["Text"+(k+1)])+f(e["Text"+(k+1)])+b(e["Text"+(k+1)]),I[k].value=c(e["Text"+(k+1)])}else v.style+=z(e,m)+p(e,m)+A(e,m)+B(e)+F(e)+l(e.Title),v.value=c(e.Title);break;case "ERDEntityBlock":M=A(e,m);ya=.6*e.Name_h;M=M.replace("fillColor","swimlaneFillColor"); +""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+"startSize="+ya+";"+z(e,m)+p(e,m)+B(e)+F(e)+l(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+A(e,m);v.value=c(e.Name);I=[];ua=ya/t;for(k=0;k<e.Fields;k++)J=0,I[k]=new mxCell("",new mxGeometry(0,0,w,.6*e["Field"+(k+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +I[k].vertex=!0,v.insert(I[k]),I[k].style+=M+h(e["Field"+(k+1)])+f(e["Field"+(k+1)])+b(e["Field"+(k+1)]),I[k].style=1==e.AltRows&&0!=k%2?I[k].style+"fillColor=#000000;opacity=5;":I[k].style+("fillColor=none;"+z(e,m)),I[k].value=c(e["Field"+(k+1)]);break;case "ERDEntityBlock2":M=A(e,m);ya=.6*e.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+"startSize="+ya+";"+ +z(e,m)+p(e,m)+B(e)+F(e)+l(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+A(e,m);v.value=c(e.Name);var I=[],ca=[],ua=ya,Da=30;null!=e.Column1&&(Da=.6*e.Column1);for(k=0;k<e.Fields;k++)J=0,ca[k]=new mxCell("",new mxGeometry(0,ua,Da,.6*e["Key"+(k+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),ca[k].vertex=!0,v.insert(ca[k]),ca[k].style+=M+ +h(e["Key"+(k+1)])+f(e["Key"+(k+1)])+b(e["Key"+(k+1)]),ca[k].style=1==e.AltRows&&0!=k%2?ca[k].style+"fillColor=#000000;fillOpacity=5;":ca[k].style+("fillColor=none;"+z(e,m)),ca[k].value=c(e["Key"+(k+1)]),I[k]=new mxCell("",new mxGeometry(Da,ua,w-Da,.6*e["Field"+(k+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),I[k].vertex=!0,v.insert(I[k]), +I[k].style+=M+p(e,m)+B(e)+F(e)+h(e["Field"+(k+1)])+f(e["Field"+(k+1)])+b(e["Field"+(k+1)]),I[k].style=1==e.AltRows&&0!=k%2?I[k].style+"fillColor=#000000;fillOpacity=5;":I[k].style+("fillColor=none;"+z(e,m)),I[k].value=c(e["Field"+(k+1)]),ua+=.6*e["Key"+(k+1)+"_h"];break;case "ERDEntityBlock3":M=A(e,m);ya=.6*e.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+ +"startSize="+ya+";"+z(e,m)+p(e,m)+B(e)+F(e)+l(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+A(e,m);v.value=c(e.Name);I=[];ca=[];ua=ya;Da=30;null!=e.Column1&&(Da=.6*e.Column1);for(k=0;k<e.Fields;k++)J=0,ca[k]=new mxCell("",new mxGeometry(0,ua,Da,.6*e["Field"+(k+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),ca[k].vertex=!0,v.insert(ca[k]), +ca[k].style+=M+h(e["Field"+(k+1)])+f(e["Field"+(k+1)])+b(e["Field"+(k+1)]),ca[k].style=1==e.AltRows&&0!=k%2?ca[k].style+"fillColor=#000000;fillOpacity=5;":ca[k].style+("fillColor=none;"+z(e,m)),ca[k].value=c(e["Field"+(k+1)]),I[k]=new mxCell("",new mxGeometry(Da,ua,w-Da,.6*e["Type"+(k+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +I[k].vertex=!0,v.insert(I[k]),I[k].style+=M+p(e,m)+B(e)+F(e)+h(e["Type"+(k+1)])+f(e["Type"+(k+1)])+b(e["Type"+(k+1)]),I[k].style=1==e.AltRows&&0!=k%2?I[k].style+"fillColor=#000000;fillOpacity=5;":I[k].style+("fillColor=none;"+z(e,m)),I[k].value=c(e["Type"+(k+1)]),ua+=.6*e["Field"+(k+1)+"_h"];break;case "ERDEntityBlock4":M=A(e,m);ya=.6*e.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ +M+"startSize="+ya+";"+z(e,m)+p(e,m)+B(e)+F(e)+l(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+A(e,m);v.value=c(e.Name);var I=[],ca=[],cb=[],ua=ya,Da=30,bc=40;null!=e.Column1&&(Da=.6*e.Column1);null!=e.Column2&&(bc=.6*e.Column2);for(k=0;k<e.Fields;k++)J=0,ca[k]=new mxCell("",new mxGeometry(0,ua,Da,.6*e["Key"+(k+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +ca[k].vertex=!0,v.insert(ca[k]),ca[k].style+=M+h(e["Key"+(k+1)])+f(e["Key"+(k+1)])+b(e["Key"+(k+1)]),ca[k].style=1==e.AltRows&&0!=k%2?ca[k].style+"fillColor=#000000;fillOpacity=5;":ca[k].style+("fillColor=none;"+z(e,m)),ca[k].value=c(e["Key"+(k+1)]),I[k]=new mxCell("",new mxGeometry(Da,ua,w-Da-bc,.6*e["Field"+(k+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +I[k].vertex=!0,v.insert(I[k]),I[k].style+=M+p(e,m)+B(e)+F(e)+h(e["Field"+(k+1)])+f(e["Field"+(k+1)])+b(e["Field"+(k+1)]),I[k].style=1==e.AltRows&&0!=k%2?I[k].style+"fillColor=#000000;fillOpacity=5;":I[k].style+("fillColor=none;"+z(e,m)),I[k].value=c(e["Field"+(k+1)]),cb[k]=new mxCell("",new mxGeometry(w-bc,ua,bc,.6*e["Type"+(k+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +cb[k].vertex=!0,v.insert(cb[k]),cb[k].style+=M+p(e,m)+B(e)+F(e)+h(e["Type"+(k+1)])+f(e["Type"+(k+1)])+b(e["Type"+(k+1)]),cb[k].style=1==e.AltRows&&0!=k%2?cb[k].style+"fillColor=#000000;fillOpacity=5;":cb[k].style+("fillColor=none;"+z(e,m)),cb[k].value=c(e["Type"+(k+1)]),ua+=.6*e["Key"+(k+1)+"_h"]}return v}var Ga=["GSDFDProcessBlock","GSDFDProcessBlock2","RoundedRectangleContainerBlock","UI2ButtonBlock","UMLStateBlock"],Ia=["ProcessBlock","UMLActivationBlock"],Ub="VennPlainColor1 VennPlainColor2 VennPlainColor3 VennPlainColor4 VennPlainColor5 VennPlainColor6 VennPlainColor7 VennPlainColor8 VennGradientColor1 VennGradientColor2 VennGradientColor3 VennGradientColor4 VennGradientColor5 VennGradientColor6 VennGradientColor7 VennGradientColor8 UMLEndBlock DefaultTextBlockNew iOSButton".split(" "), +Ea="AWSAndroidBlock3 AWSiOSBlock3 AWSJavaBlock3 AWSJavaScript AWSNetBlock3 AWSNodeJSBlock3 AWSPHPBlock3 AWSPythonBlock3 AWSRubyBlock3 AWSXamarin AWSCLIBlock3 AWSEclipseToolkitBlock3 AWSVisualStudioToolkitBlock3 AWSWindowsPowershellToolkitBlock3 DefaultTextBlock RectangleContainerBlock UMLStartBlock UMLEndBlock DefaultTextBlockNew UMLHForkJoinBlock iOSButton".split(" "),kb="VennPlainColor1 VennPlainColor2 VennPlainColor3 VennPlainColor4 VennPlainColor5 VennPlainColor6 VennPlainColor7 VennPlainColor8 VennGradientColor1 VennGradientColor2 VennGradientColor3 VennGradientColor4 VennGradientColor5 VennGradientColor6 VennGradientColor7 VennGradientColor8".split(" "), +Vb=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],fb=["fpDoor"],xb={None:"none",Arrow:"block;endFill=1","Hollow Arrow":"block;endFill=0","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10","CFN ERD Many Arrow":"ERmany;startSize=10","CFN ERD Exactly One Arrow":"ERmandOne;startSize=10","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10","CFN ERD One Arrow":"ERone;startSize=16", +Generalization:"block;endFill=0;startSize=12","Big Open Arrow":"open;startSize=10",Asynch1:"openAsync;flipH=1;startSize=10",Asynch2:"openAsync;startSize=10",Aggregation:"diamond;endFill=0;startSize=16",Composition:"diamond;endFill=1;startSize=16",BlockEnd:"none;endFill=1;startSize=16"},lb={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15", HotspotBlock:"strokeColor=none;opacity=50",ImageSearchBlock2:"shape=image",ProcessBlock:"",DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50",PredefinedProcessBlock:"shape=process",DocumentBlock:"shape=document",MultiDocumentBlock:"shape=mxgraph.flowchart.multi-document",ManualInputBlock:"shape=manualInput;size=15",PreparationBlock:"shape=hexagon",DataBlock:"shape=parallelogram",DataBlockNew:"shape=parallelogram",DatabaseBlock:"shape=cylinder",DirectAccessStorageBlock:"shape=mxgraph.flowchart.direct_data", InternalStorageBlock:"shape=internalStorage;dx=10;dy=10",PaperTapeBlock:"shape=tape;size=0.2",ManualOperationBlockNew:"shape=trapezoid;flipV=1",DelayBlock:"shape=delay",StoredDataBlock:"shape=dataStorage",MergeBlock:"triangle;direction=south",ConnectorBlock:"ellipse",OrBlock:"shape=mxgraph.flowchart.summing_function",SummingJunctionBlock:"shape=mxgraph.flowchart.or",DisplayBlock:"shape=display",OffPageLinkBlock:"shape=offPageConnector",BraceNoteBlock:"mxCompositeShape",NoteBlock:"shape=mxgraph.flowchart.annotation_1", AdvancedSwimLaneBlock:"mxCompositeShape",AdvancedSwimLaneBlockRotated:"mxCompositeShape",RectangleContainerBlock:"fillColor=none;container=1",DiamondContainerBlock:"shape=rhombus;fillColor=none;container=1",RoundedRectangleContainerBlock:"fillColor=none;container=1;rounded=1;absoluteArcSize=1;arcSize=24",CircleContainerBlock:"shape=ellipse;fillColor=none;container=1",PillContainerBlock:"arcSize=50;fillColor=none;container=1",IsoscelesTriangleBlock:"triangle;direction=north",RightTriangleBlock:"shape=mxgraph.basic.orthogonal_triangle", @@ -471,8 +472,549 @@ Image_iphone_button_blue:"",Image_iphone_button_grayblue:"",Image_iphone_button_ Image_iphone_sort_handle:"shape=mxgraph.ios7.icons.options",Image_iphone_slider:"shape=mxgraph.ios.iSlider;barPos=60",Image_iphone_dropdown:"shape=mxgraph.ios.iComboBox;buttonText=;fillColor=#dddddd;fillColor2=#3D5565",Image_iphone_email_name:"",Image_iphone_switch_off:"shape=mxgraph.android.switch_off;fillColor=#666666",Image_iphone_keyboard_button_blue:"",Image_iphone_keyboard_letters:"shape=mxgraph.ios.iKeybLett",Image_iphone_keyboard_landscape:"shape=mxgraph.ios.iKeybLett",Image_iphone_large_tabbed_button:"mxCompositeShape", Image_iphone_sort_button:"mxCompositeShape",Image_iphone_tab_bar:"mxCompositeShape",Image_iphone_picker_multi:"mxCompositeShape",Image_iphone_picker_web:"mxCompositeShape",Image_iphone_add_icon_blue:"shape=mxgraph.ios.iAddIcon;fillColor=#8BbEff;fillColor2=#135Ec8;strokeColor=#ffffff",Image_iphone_add_icon_green:"shape=mxgraph.ios.iAddIcon;fillColor=#7AdF78;fillColor2=#1A9917;strokeColor=#ffffff",Image_iphone_remove_icon:"shape=mxgraph.ios.iDeleteIcon;fillColor=#e8878E;fillColor2=#BD1421;strokeColor=#ffffff", Image_iphone_arrow_icon:"shape=mxgraph.ios.iArrowIcon;fillColor=#8BbEff;fillColor2=#135Ec8;strokeColor=#ffffff",Image_iphone_arrow:"shape=mxgraph.ios7.misc.more",Image_iphone_checkmark:"shape=mxgraph.ios7.misc.check",Image_iphone_check_off:"shape=ellipse",Image_iphone_location_dot:"shape=ellipse",Image_iphone_mark_as_read:"shape=ellipse",Image_iphone_pin_green:"shape=mxgraph.ios.iPin;fillColor2=#00dd00;fillColor3=#004400;strokeColor=#006600",Image_iphone_pin_red:"shape=mxgraph.ios.iPin;fillColor2=#dd0000;fillColor3=#440000;strokeColor=#660000", -Image_iphone_radio_off:"shape=ellipse",Image_iphone_checkbox_off:"",Image_iphone_indicator:"fillColor=#e8878E;gradientColor=#BD1421;strokeColor=#ffffff",Image_iphone_thread_count:""},Vb=function(g,k,l){l.includes(g)||l.push(g);if(g in k){var c=k[g];c.id=g;if(null!=c.Members)for(var a in c.Members)l=Vb(a,k,l)}return l};EditorUi.prototype.pasteLucidChart=function(g,k,l,c){var a=this.editor.graph;a.getModel().beginUpdate();try{var m=function(b,c){var g=null!=c.Endpoint1.Block?d[c.Endpoint1.Block]:null, -k=null!=c.Endpoint2.Block?d[c.Endpoint2.Block]:null,l;l=new mxCell("",new mxGeometry(0,0,100,100),"html=1;");l.geometry.relative=!0;l.edge=!0;gc(l,b);var m=cb(b).Properties,n=null!=m?m.TextAreas:b.TextAreas;if(null!=n){for(var p=0;null!=n["t"+p];){var q=n["t"+p];l=db(q,l);p++}for(p=1;null!=n["m"+p];)q=n["m"+p],l=db(q,l,b),p++;null!=n.Text&&(l=db(n,l,b));n=null!=m?m.TextAreas:b.TextAreas;null!=n.Message&&(l=db(n.Message,l,b))}null==g&&null!=c.Endpoint1&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.6* -c.Endpoint1.x),Math.round(.6*c.Endpoint1.y)),!0);null==k&&null!=c.Endpoint2&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.6*c.Endpoint2.x),Math.round(.6*c.Endpoint2.y)),!1);f.push(a.addCell(l,null,null,g,k))},f=[],d={},n=[],p=[],q=0;if(null!=g.Groups)for(var t in g.Groups){var r=g.Groups[t];r.id=t;if(1==r.Hidden&&null!=r.Members){p.includes(t)||p.push(t);for(var z in r.Members)p=Vb(z,g.Groups,p)}}if(null!=g.Blocks)for(t in g.Blocks)r=g.Blocks[t],r.id=t,p.includes(t)||(z=!1,null!=hb[r.Class]&& -"mxCompositeShape"==hb[r.Class]&&(d[r.id]=xc(r,f,a),n.push(r),z=!0),z||(d[r.id]=yb(r),n.push(r)));else for(q=0;q<g.Objects.length;q++)r=g.Objects[q],r.IsBlock&&null!=r.Action&&null!=r.Action.Properties&&(d[r.id]=yb(r)),n.push(r);n.sort(function(a,c){a=cb(a);c=cb(c);return null!=a.Properties&&null!=c.Properties?a.Properties.ZOrder-c.Properties.ZOrder:0});for(q=0;q<n.length;q++){var r=n[q],D=d[r.id];null!=D?f.push(a.addCell(D)):r.IsLine&&null!=r.Action&&null!=r.Action.Properties&&m(r,r.Action.Properties)}if(null!= -g.Lines)for(t in g.Lines)p.includes(t)||(r=g.Lines[t],m(r,r));if(c&&null!=k&&null!=l){a.isGridEnabled()&&(k=a.snap(k),l=a.snap(l));var I=a.getBoundingBoxFromGeometry(f,!0);null!=I&&a.moveCells(f,k-I.x,l-I.y)}a.setSelectionCells(f)}finally{a.getModel().endUpdate()}a.isSelectionEmpty()||(a.scrollCellToVisible(a.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(a.view.getState(a.getSelectionCell())))}})(); \ No newline at end of file +Image_iphone_radio_off:"shape=ellipse",Image_iphone_checkbox_off:"",Image_iphone_indicator:"fillColor=#e8878E;gradientColor=#BD1421;strokeColor=#ffffff",Image_iphone_thread_count:""},Tb=function(a,b,d){d.includes(a)||d.push(a);if(a in b){var g=b[a];g.id=a;if(null!=g.Members)for(var e in g.Members)d=Tb(e,b,d)}return d};EditorUi.prototype.pasteLucidChart=function(a,b,d,g){var e=this.editor.graph;e.getModel().beginUpdate();try{var n=function(a,b){var d=null!=b.Endpoint1.Block?f[b.Endpoint1.Block]:null, +g=null!=b.Endpoint2.Block?f[b.Endpoint2.Block]:null,n;n=new mxCell("",new mxGeometry(0,0,100,100),"html=1;");n.geometry.relative=!0;n.edge=!0;Z(n,a);var C=u(a).Properties,k=null!=C?C.TextAreas:a.TextAreas;if(null!=k){for(var D=0;null!=k["t"+D];){var y=k["t"+D];n=Y(y,n);D++}for(D=1;null!=k["m"+D];)y=k["m"+D],n=Y(y,n,a),D++;null!=k.Text&&(n=Y(k,n,a));k=null!=C?C.TextAreas:a.TextAreas;null!=k.Message&&(n=Y(k.Message,n,a))}null==d&&null!=b.Endpoint1&&n.geometry.setTerminalPoint(new mxPoint(Math.round(.6* +b.Endpoint1.x),Math.round(.6*b.Endpoint1.y)),!0);null==g&&null!=b.Endpoint2&&n.geometry.setTerminalPoint(new mxPoint(Math.round(.6*b.Endpoint2.x),Math.round(.6*b.Endpoint2.y)),!1);c.push(e.addCell(n,null,null,d,g))},c=[],f={},C=[],D=[],y=0;if(null!=a.Groups)for(var p in a.Groups){var m=a.Groups[p];m.id=p;if(1==m.Hidden&&null!=m.Members){D.includes(p)||D.push(p);for(var h in m.Members)D=Tb(h,a.Groups,D)}}if(null!=a.Blocks)for(p in a.Blocks)m=a.Blocks[p],m.id=p,D.includes(p)||(h=!1,null!=lb[m.Class]&& +"mxCompositeShape"==lb[m.Class]&&(f[m.id]=na(m,c,e),C.push(m),h=!0),h||(f[m.id]=K(m),C.push(m)));else for(y=0;y<a.Objects.length;y++)m=a.Objects[y],m.IsBlock&&null!=m.Action&&null!=m.Action.Properties&&(f[m.id]=K(m)),C.push(m);C.sort(function(a,b){a=u(a);b=u(b);return null!=a.Properties&&null!=b.Properties?a.Properties.ZOrder-b.Properties.ZOrder:0});for(y=0;y<C.length;y++){var m=C[y],l=f[m.id];null!=l?c.push(e.addCell(l)):m.IsLine&&null!=m.Action&&null!=m.Action.Properties&&n(m,m.Action.Properties)}if(null!= +a.Lines)for(p in a.Lines)D.includes(p)||(m=a.Lines[p],n(m,m));if(g&&null!=b&&null!=d){e.isGridEnabled()&&(b=e.snap(b),d=e.snap(d));var z=e.getBoundingBoxFromGeometry(c,!0);null!=z&&e.moveCells(c,b-z.x,d-z.y)}e.setSelectionCells(c)}finally{e.getModel().endUpdate()}e.isSelectionEmpty()||(e.scrollCellToVisible(e.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(e.view.getState(e.getSelectionCell())))}})();function VsdxExport(c){function u(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>", +"_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>", +"docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>", +"docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>", +"visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>", +"visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>", +"visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"}, +g;for(g in d)if(1<b&&g==E.CONTENT_TYPES_XML){for(var n=mxUtils.parseXml(d[g]),c=n.documentElement,f=c.children,C=null,D=0;D<f.length;D++){var y=f[D];"/visio/pages/page1.xml"==y.getAttribute(E.PART_NAME)&&(C=y)}for(D=2;D<=b;D++)f=C.cloneNode(),f.setAttribute(E.PART_NAME,"/visio/pages/page"+D+".xml"),c.appendChild(f);z(a,g,n,!0)}else a.file(g,d[g])}function q(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function l(a){var b=F[a];null==b&&(b=B++,F[a]=b);return b}function h(a){var b= +{};try{var d=a.getGraphBounds().clone(),g=a.view.scale,n=a.view.translate,c=Math.round(d.x/g)-n.x,f=Math.round(d.y/g)-n.y,C=a.pageFormat.width,D=a.pageFormat.height;0>c&&(c+=Math.ceil((n.x-d.x/g)/C)*C);0>f&&(f+=Math.ceil((n.y-d.y/g)/D)*D);var y=Math.max(1,Math.ceil((d.width/g+c)/C)),p=Math.max(1,Math.ceil((d.height/g+f)/D));b.gridEnabled=a.gridEnabled;b.gridSize=a.gridSize;b.guidesEnabled=a.graphHandler.guidesEnabled;b.pageVisible=a.pageVisible;b.pageScale=a.pageScale;b.pageWidth=a.pageFormat.width* +y;b.pageHeight=a.pageFormat.height*p;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(Ea){}return b}function f(a,d,g,n){return b(a,d/E.CONVERSION_FACTOR,g,n)}function b(a,b,d,g){d=q(d,E.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);g&&d.setAttribute("F",g);return d}function a(a,b,d,g,n){var c=q(n,E.XMLNS,"Row");c.setAttribute("T",a);c.setAttribute("IX",b);c.appendChild(f("X",d,n));c.appendChild(f("Y",g,n));return c}function d(a,d,g){var n= +a.style[mxConstants.STYLE_FILLCOLOR];if(n&&"none"!=n){if(d.appendChild(b("FillForegnd",n,g)),(n=a.style[mxConstants.STYLE_GRADIENTCOLOR])&&"none"!=n){d.appendChild(b("FillBkgnd",n,g));var n=a.style[mxConstants.STYLE_GRADIENT_DIRECTION],c=28;if(n)switch(n){case mxConstants.DIRECTION_EAST:c=25;break;case mxConstants.DIRECTION_WEST:c=27;break;case mxConstants.DIRECTION_NORTH:c=30}d.appendChild(b("FillPattern",c,g))}}else d.appendChild(b("FillPattern",0,g));(n=a.style[mxConstants.STYLE_STROKECOLOR])&& +"none"!=n?d.appendChild(b("LineColor",n,g)):d.appendChild(b("LinePattern",0,g));(n=a.style[mxConstants.STYLE_STROKEWIDTH])&&d.appendChild(f("LineWeight",n,g));(c=a.style[mxConstants.STYLE_OPACITY])?n=c:(n=a.style[mxConstants.STYLE_FILL_OPACITY],c=a.style[mxConstants.STYLE_STROKE_OPACITY]);n&&d.appendChild(b("FillForegndTrans",1-parseInt(n)/100,g));c&&d.appendChild(b("LineColorTrans",1-parseInt(c)/100,g));if(1==a.style[mxConstants.STYLE_DASHED]){n=a.style[mxConstants.STYLE_DASH_PATTERN];c=9;if(n)switch(n){case "1 1":c= +10;break;case "1 2":c=3;break;case "1 4":c=17}d.appendChild(b("LinePattern",c,g))}1==a.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(b("ShdwPattern",1,g)),d.appendChild(b("ShdwForegnd","#000000",g)),d.appendChild(b("ShdwForegndTrans",.6,g)),d.appendChild(b("ShapeShdwType",1,g)),d.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",g)),d.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",g)),d.appendChild(b("ShapeShdwScaleFactor","1",g)),d.appendChild(b("ShapeShdwBlur","0.05555555555555555", +g)),d.appendChild(b("ShapeShdwShow",2,g)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,g));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,g));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(f("Rounding",.1*a.cell.geometry.width,g));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,g))}function g(a,b,d,g){var n=q(d,E.XMLNS,"Shape");n.setAttribute("ID",a);n.setAttribute("NameU","Shape"+a);n.setAttribute("LineStyle","0");n.setAttribute("FillStyle", +"0");n.setAttribute("TextStyle","0");a=b.width/2;var c=b.height/2;n.appendChild(f("PinX",b.x+a+A.shiftX,d));n.appendChild(f("PinY",g-b.y-c-A.shiftY,d));n.appendChild(f("Width",b.width,d));n.appendChild(f("Height",b.height,d));n.appendChild(f("LocPinX",a,d));n.appendChild(f("LocPinY",c,d));return n}function n(a,b){var d=E.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function C(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?3:9>=a?4:22>=a?5:6}function D(g,c,D,y){var p=c.view.getState(g); +c=q(D,E.XMLNS,"Shape");var h=l(g.id);c.setAttribute("ID",h);c.setAttribute("NameU","Dynamic connector."+h);c.setAttribute("Name","Dynamic connector."+h);c.setAttribute("Type","Shape");c.setAttribute("Master","4");var z=A.state,h=p.absolutePoints,W=p.cellBounds,u=W.width/2,P=W.height/2;c.appendChild(f("PinX",W.x+u,D));c.appendChild(f("PinY",y-W.y-P,D));c.appendChild(f("Width",W.width,D));c.appendChild(f("Height",W.height,D));c.appendChild(f("LocPinX",u,D));c.appendChild(f("LocPinY",P,D));A.newEdge(c, +p,D);u=function(a,b){var d=a.x,g=a.y,d=d*z.scale-W.x+z.dx+A.shiftX,g=(b?0:W.height)-g*z.scale+W.y-z.dy-A.shiftY;return{x:d,y:g}};P=u(h[0],!0);c.appendChild(f("BeginX",W.x+P.x,D,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));c.appendChild(f("BeginY",y-W.y+P.y,D,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));P=u(h[h.length-1],!0);c.appendChild(f("EndX",W.x+P.x,D,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(f("EndY",y-W.y+P.y,D,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)")); +c.appendChild(b("BegTrigger","2",D,g.source?"_XFTRIGGER(Sheet."+l(g.source.id)+"!EventXFMod)":null));c.appendChild(b("EndTrigger","2",D,g.target?"_XFTRIGGER(Sheet."+l(g.target.id)+"!EventXFMod)":null));c.appendChild(b("ConFixedCode","6",D));c.appendChild(b("LayerMember","0",D));d(p,c,D);y=p.style[mxConstants.STYLE_STARTSIZE];g=n(p.style[mxConstants.STYLE_STARTARROW],p.style[mxConstants.STYLE_STARTFILL]);c.appendChild(b("BeginArrow",g,D));c.appendChild(b("BeginArrowSize",C(y),D));y=p.style[mxConstants.STYLE_ENDSIZE]; +g=n(p.style[mxConstants.STYLE_ENDARROW],p.style[mxConstants.STYLE_ENDFILL]);c.appendChild(b("EndArrow",g,D));c.appendChild(b("EndArrowSize",C(y),D));null!=p.text&&p.text.checkBounds()&&(A.save(),p.text.paint(A),A.restore());p=q(D,E.XMLNS,"Section");p.setAttribute("N","Geometry");p.setAttribute("IX","0");for(g=0;g<h.length;g++)y=u(h[g]),p.appendChild(a(0==g?"MoveTo":"LineTo",g+1,y.x,y.y,D));p.appendChild(b("NoFill","1",D));p.appendChild(b("NoLine","0",D));c.appendChild(p);return c}function y(a,b,n, +c,f){var C=a.geometry;if(null!=C){C.relative&&f&&(C=C.clone(),C.x*=f.width,C.y*=f.height,C.relative=0);f=l(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){c=g(f+"10000",C,n,c);c.setAttribute("Type","Group");f=q(n,E.XMLNS,"Shapes");A.save();A.translate(-C.x,-C.y);var p=C.clone();p.x=0;p.y=0;a.setGeometry(p);a.treatAsSingle=!0;p=y(a,b,n,C.height,C);a.treatAsSingle=!1;a.setGeometry(C);f.appendChild(p);for(var h=0;h<a.children.length;h++)p=y(a.children[h],b,n,C.height,C),f.appendChild(p);c.appendChild(f); +A.restore();return c}return a.vertex?(c=g(f,C,n,c),a=b.view.getState(a),d(a,c,n),A.newShape(c,a,n),null!=a.text&&a.text.checkBounds()&&(A.save(),a.text.paint(A),A.restore()),null!=a.shape&&a.shape.checkBounds()&&(A.save(),a.shape.paint(A),A.restore()),c.appendChild(A.getShapeGeo()),A.endShape(),c.setAttribute("Type",A.getShapeType()),c):D(a,b,n,c)}return null}function p(a,b){var d=mxUtils.createXmlDocument(),g=q(d,E.XMLNS,"PageContents");g.setAttribute("xmlns:r",E.XMLNS_R);g.setAttribute("xml:space", +E.XML_SPACE);var n=q(d,E.XMLNS,"Shapes");g.appendChild(n);var c=a.model,f=a.view.translate,C=a.view.scale,D=a.getGraphBounds();A.shiftX=0;A.shiftY=0;if(D.x/C<f.x||D.y/C<f.y)A.shiftX=Math.ceil((f.x-D.x/C)/a.pageFormat.width)*a.pageFormat.width,A.shiftY=Math.ceil((f.y-D.y/C)/a.pageFormat.height)*a.pageFormat.height;A.save();A.translate(-f.x,-f.y);A.scale(1/C);A.newPage();var C=a.getDefaultParent(),p;for(p in c.cells)f=c.cells[p],f.parent==C&&(f=y(f,a,d,b.pageHeight),null!=f&&n.appendChild(f));n=q(d, +E.XMLNS,"Connects");g.appendChild(n);for(p in c.cells)f=c.cells[p],f.edge&&(f.source&&(C=q(d,E.XMLNS,"Connect"),C.setAttribute("FromSheet",l(f.id)),C.setAttribute("FromCell","BeginX"),C.setAttribute("ToSheet",l(f.source.id)),n.appendChild(C)),f.target&&(C=q(d,E.XMLNS,"Connect"),C.setAttribute("FromSheet",l(f.id)),C.setAttribute("FromCell","EndX"),C.setAttribute("ToSheet",l(f.target.id)),n.appendChild(C)));d.appendChild(g);A.restore();return d}function z(a,b,d,g){a.file(b,(g?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+ +mxUtils.getXml(d))}function W(a,d,g){var n=mxUtils.createXmlDocument(),c=mxUtils.createXmlDocument(),C=q(n,E.XMLNS,"Pages");C.setAttribute("xmlns:r",E.XMLNS_R);C.setAttribute("xml:space",E.XML_SPACE);var D=q(c,E.RELS_XMLNS,"Relationships"),y=1,p;for(p in d){var h="page"+y+".xml",l=q(n,E.XMLNS,"Page");l.setAttribute("ID",y-1);l.setAttribute("NameU",p);l.setAttribute("Name",p);var W=q(n,E.XMLNS,"PageSheet"),u=g[p];W.appendChild(f("PageWidth",u.pageWidth,n));W.appendChild(f("PageHeight",u.pageHeight, +n));W.appendChild(b("PageScale",u.pageScale,n));W.appendChild(b("DrawingScale",1,n));u=q(n,E.XMLNS,"Rel");u.setAttribute("r:id","rId"+y);var P=q(n,E.XMLNS,"Section");P.setAttribute("N","Layer");var A=q(n,E.XMLNS,"Row");A.setAttribute("IX","0");P.appendChild(A);A.appendChild(b("Name","Connector",n));A.appendChild(b("Color","255",n));A.appendChild(b("Status","0",n));A.appendChild(b("Visible","1",n));A.appendChild(b("Print","1",n));A.appendChild(b("Active","0",n));A.appendChild(b("Lock","0",n));A.appendChild(b("Snap", +"1",n));A.appendChild(b("Glue","1",n));A.appendChild(b("NameUniv","Connector",n));A.appendChild(b("ColorTrans","0",n));W.appendChild(P);l.appendChild(W);l.appendChild(u);C.appendChild(l);l=q(c,E.RELS_XMLNS,"Relationship");l.setAttribute("Id","rId"+y);l.setAttribute("Type",E.PAGES_TYPE);l.setAttribute("Target",h);D.appendChild(l);z(a,E.VISIO_PAGES+h,d[p]);y++}n.appendChild(C);c.appendChild(D);z(a,E.VISIO_PAGES+"pages.xml",n);z(a,E.VISIO_PAGES+"_rels/pages.xml.rels",c)}function P(a,b){var d=E.VISIO_PAGES_RELS+ +"page"+b+".xml.rels",g=mxUtils.createXmlDocument(),n=q(g,E.RELS_XMLNS,"Relationships"),c=q(g,E.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");n.appendChild(c);var f=A.images;if(0<f.length)for(var C=0;C<f.length;C++)c=q(g,E.RELS_XMLNS,"Relationship"),c.setAttribute("Type",E.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(C+2)),c.setAttribute("Target","../media/"+ +f[C]),n.appendChild(c);g.appendChild(n);z(a,d,g)}var E=this,A=new mxVsdxCanvas2D,F={},B=1;this.exportCurrentDiagrams=function(){try{if(c.spinner.spin(document.body,mxResources.get("exporting"))){var a=new JSZip;A.init(a);F={};B=1;var b={},d={},g=null!=c.pages?c.pages.length:1;if(null!=c.pages){for(var n=c.editor.graph.getSelectionCells(),f=c.currentPage,C=0;C<c.pages.length;C++){var D=c.pages[C];c.currentPage!=D&&c.selectPage(D,!0);var y=D.getName(),l=c.editor.graph,z=h(l);b[y]=p(l,z);P(a,C+1);d[y]= +z}f!=c.currentPage&&c.selectPage(f,!0);c.editor.graph.setSelectionCells(n)}else l=c.editor.graph,z=h(l),y="Page1",b[y]=p(l,z),P(a,1),d[y]=z;u(a,g);W(a,b,d);b=function(){a.generateAsync({type:"base64"}).then(function(a){c.spinner.stop();var b=c.getBaseFilename();c.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<A.filesLoading?A.onFilesLoaded=b:b()}return!0}catch(Ea){return console.log(Ea),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page"; +VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1"; +VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/"; +VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(c){this.filesLoading=0;this.zip=c};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(c){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,c):this.xmlDoc.createElement(c)}; +mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var c=this.createElt("Section");c.setAttribute("N","Geometry");c.setAttribute("IX",this.geoIndex++);this.geoSec=c;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(c,u,q){this.geoIndex=0;this.shape=c;this.cellState=u;this.xmGeo=u.cell.geometry;this.xmlDoc=q;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()}; +mxVsdxCanvas2D.prototype.newEdge=function(c,u,q){this.shape=c;this.cellState=u;this.xmGeo=u.cellBounds;this.xmlDoc=q};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec}; +mxVsdxCanvas2D.prototype.createCellElemScaled=function(c,u,q){return this.createCellElem(c,u/VsdxExport.prototype.CONVERSION_FACTOR,q)};mxVsdxCanvas2D.prototype.createCellElem=function(c,u,q){var l=this.createElt("Cell");l.setAttribute("N",c);l.setAttribute("V",u);q&&l.setAttribute("F",q);return l}; +mxVsdxCanvas2D.prototype.createRowScaled=function(c,u,q,l,h,f,b,a,d,g,n,C,D,y){return this.createRowRel(c,u,q/VsdxExport.prototype.CONVERSION_FACTOR,l/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,f/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,d,g,n,C,D,y)}; +mxVsdxCanvas2D.prototype.createRowRel=function(c,u,q,l,h,f,b,a,d,g,n,C,D,y){var p=this.createElt("Row");p.setAttribute("T",c);p.setAttribute("IX",u);p.appendChild(this.createCellElem("X",q,d));p.appendChild(this.createCellElem("Y",l,g));null!=h&&p.appendChild(this.createCellElem("A",h,n));null!=f&&p.appendChild(this.createCellElem("B",f,C));null!=b&&p.appendChild(this.createCellElem("C",b,D));null!=a&&p.appendChild(this.createCellElem("D",a,y));return p}; +mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()}; +mxVsdxCanvas2D.prototype.rect=function(c,u,q,l){1<this.geoStepIndex&&this.createGeoSec();var h=this.state;q*=h.scale;l*=h.scale;var f=this.xmGeo;c=(c-f.x+h.dx)*h.scale/q;u=(f.height-u+f.y-h.dy)*h.scale/l;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,c,u));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c+1,u));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c+1,u-1));this.geoSec.appendChild(this.createRowRel("RelLineTo", +this.geoStepIndex++,c,u-1));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c,u))};mxVsdxCanvas2D.prototype.roundrect=function(c,u,q,l,h,f){this.rect(c,u,q,l);this.shape.appendChild(this.createCellElemScaled("Rounding",h))}; +mxVsdxCanvas2D.prototype.ellipse=function(c,u,q,l){1<this.geoStepIndex&&this.createGeoSec();var h=this.state;q*=h.scale;l*=h.scale;var f=this.xmGeo,b=f.height*h.scale,a=f.width*h.scale;c=(c-f.x+h.dx)*h.scale;u=b+(-u+f.y-h.dy)*h.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,c+q/2,u-l/2,c,u-l/2,c+q/2,u,"Width*"+(c+q/2)/a,"Height*"+(u-l/2)/b,"Width*"+c/a,"Height*"+(u-l/2)/b,"Width*"+(c+q/2)/a,"Height*"+u/b))}; +mxVsdxCanvas2D.prototype.moveTo=function(c,u){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=c;this.lastMoveToY=u;this.lastX=c;this.lastY=u;var q=this.xmGeo,l=this.state;c=(c-q.x+l.dx)*l.scale;u=(q.height-u+q.y-l.dy)*l.scale;var h=q.height*l.scale,q=q.width*l.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,c/q,u/h))}; +mxVsdxCanvas2D.prototype.lineTo=function(c,u){this.lastX=c;this.lastY=u;var q=this.xmGeo,l=this.state;c=(c-q.x+l.dx)*l.scale;u=(q.height-u+q.y-l.dy)*l.scale;var h=q.height*l.scale,q=q.width*l.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,c/q,u/h))}; +mxVsdxCanvas2D.prototype.quadTo=function(c,u,q,l){this.lastX=q;this.lastY=l;var h=this.state,f=this.xmGeo,b=f.height*h.scale,a=f.width*h.scale;c=(c-f.x+h.dx)*h.scale;u=(f.height-u+f.y-h.dy)*h.scale;q=(q-f.x+h.dx)*h.scale;l=(f.height-l+f.y-h.dy)*h.scale;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,q/a,l/b,c/a,u/b))}; +mxVsdxCanvas2D.prototype.curveTo=function(c,u,q,l,h,f){this.lastX=h;this.lastY=f;var b=this.state,a=this.xmGeo,d=a.height*b.scale,g=a.width*b.scale;c=(c-a.x+b.dx)*b.scale;u=(a.height-u+a.y-b.dy)*b.scale;q=(q-a.x+b.dx)*b.scale;l=(a.height-l+a.y-b.dy)*b.scale;h=(h-a.x+b.dx)*b.scale;f=(a.height-f+a.y-b.dy)*b.scale;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,h/g,f/d,c/g,u/d,q/g,l/d))}; +mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(c,u){var q=this.createElt("ForeignData");q.setAttribute("ForeignType","Bitmap");c=c.toUpperCase();"BMP"!=c&&q.setAttribute("CompressionType",c);var l=this.createElt("Rel");l.setAttribute("r:id","rId"+u);q.appendChild(l);this.shape.appendChild(q);this.shapeType="Foreign"}; +mxVsdxCanvas2D.prototype.convertSvg2Png=function(c,u,q){var l=this;this.filesLoading++;try{var h=document.createElement("canvas"),f=h.getContext("2d");u||(c=String.fromCharCode.apply(null,new Uint8Array(c)),c=window.btoa?btoa(c):Base64.encode(c,!0));u="data:image/svg+xml;base64,"+c;img=new Image;img.onload=function(){h.width=this.width;h.height=this.height;f.drawImage(this,0,0);try{q(h.toDataURL("image/png"))}catch(b){}l.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed"); +try{q(c)}catch(b){}l.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()};img.src=u}catch(b){console.log("SVG2PNG conversion failed"+b.message);try{q(c)}catch(a){}this.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()}}; +mxVsdxCanvas2D.prototype.image=function(c,u,q,l,h,f,b,a){var d=this,g="image"+(this.images.length+1)+".",n;if(0==h.indexOf("data:"))n=h.indexOf("base64,"),f=h.substring(n+7),n=h.substring(11,n-1),0==n.indexOf("svg")?(n="png",g+=n,this.convertSvg2Png(f,!0,function(a){d.zip.file("visio/media/"+g,a.substring(22),{base64:!0})})):(g+=n,this.zip.file("visio/media/"+g,f,{base64:!0}));else if(window.XMLHttpRequest){h=this.converter.convert(h);this.filesLoading++;n=h.lastIndexOf(".");n=h.substring(n+1);var C= +!1;0==n.indexOf("svg")&&(n="png",C=!0);g+=n;f=new XMLHttpRequest;f.open("GET",h,!0);f.responseType="arraybuffer";f.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(C?d.convertSvg2Png(this.response,!1,function(a){d.zip.file("visio/media/"+g,a.substring(22),{base64:!0})}):d.zip.file("visio/media/"+g,this.response)),d.filesLoading--,0==d.filesLoading))d.onFilesLoaded()};f.send()}this.images.push(g);this.shapeImg={type:n,id:this.images.length+1};h=this.state;q*=h.scale;l*=h.scale; +n=this.xmGeo;c=(c-n.x+h.dx)*h.scale;u=(n.height-u+n.y-h.dy)*h.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",c));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",u-l));this.shape.appendChild(this.createCellElemScaled("ImgWidth",q));this.shape.appendChild(this.createCellElemScaled("ImgHeight",l))}; +mxVsdxCanvas2D.prototype.text=function(c,u,q,l,h,f,b,a,d,g,n,C,D){var y=this;if(this.textEnabled&&null!=h){mxUtils.isNode(h)&&(h=mxUtils.getOuterHtml(h));"html"==d&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(h=h.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=h,h=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));g=this.state;n=this.xmGeo;q*=g.scale;l*=g.scale;var p=this.createElt("Section"); +p.setAttribute("N","Character");var z=this.createElt("Section");z.setAttribute("N","Paragraph");var W=this.createElt("Text"),P=0,E=0,A=0,F=0,B=0,Z=0,K=function(b,d,g,n,c){g=b.fontSize;var f=b.fontFamily,C=mxUtils.getSizeForString(c,g,f);a&&C.width>q&&(C=mxUtils.getSizeForString(c,g,f,q));b.blockElem?(F+=C.width,E=Math.min(Math.max(E,F),q),F=0,B=Math.max(B,C.height),A+=B+Z,Z=B,B=0):(F+=C.width,E=Math.min(Math.max(E,F),q),B=Math.max(B,C.height),A=Math.max(A,B));C=y.createElt("Row");C.setAttribute("IX", +P);b.fontColor&&C.appendChild(y.createCellElem("Color",b.fontColor));g&&C.appendChild(y.createCellElemScaled("Size",.97*g));f&&C.appendChild(y.createCellElem("Font",f));g=0;b.bold&&(g|=17);b.italic&&(g|=34);b.underline&&(g|=4);C.appendChild(y.createCellElem("Style",g));C.appendChild(y.createCellElem("Case","0"));C.appendChild(y.createCellElem("Pos","0"));C.appendChild(y.createCellElem("FontScale","1"));C.appendChild(y.createCellElem("Letterspace","0"));d.appendChild(C);d=y.createElt("cp");d.setAttribute("IX", +P++);n.appendChild(d);b=y.xmlDoc.createTextNode(c+(b.blockElem?"\n":""));n.appendChild(b)},Y=function(a,b){b=b||{};for(var d=0;d<a.length;d++)if(3==a[d].nodeType){var g={fontColor:b.fontColor||y.cellState.style.fontColor,fontSize:b.fontSize||y.cellState.style.fontSize,fontFamily:b.fontFamily||y.cellState.style.fontFamily,align:b.align||y.cellState.style.align,bold:b.bold,italic:b.italic,underline:b.underline};K(g,p,z,W,a[d].textContent)}else if(1==a[d].nodeType){var g=a[d].nodeName.toUpperCase(), +n=a[d].childNodes.length,c=window.getComputedStyle(a[d],null),f="bold"==c.getPropertyValue("font-weight")||b.bold,C="italic"==c.getPropertyValue("font-style")||b.italic,D=0<=c.getPropertyValue("text-decoration").indexOf("underline")||b.underline,h=c.getPropertyValue("text-align"),l;l=c.getPropertyValue("color");l=(l=l.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===l.length?"#"+("0"+parseInt(l[1],10).toString(16)).slice(-2)+("0"+parseInt(l[2],10).toString(16)).slice(-2)+ +("0"+parseInt(l[3],10).toString(16)).slice(-2):"";g={bold:f,italic:C,underline:D,align:h,fontColor:l,fontSize:parseFloat(c.getPropertyValue("font-size")),fontFamily:c.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==c.getPropertyValue("display")||"BR"==g||"LI"==g};0<n?(K(g,p,z,W,""),Y(a[d].childNodes,g)):K(g,p,z,W,a[d].textContent)}};"html"==d&&mxClient.IS_SVG?(h=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1].childNodes,Y(h,{})):K({fontColor:y.cellState.style.fontColor, +fontSize:y.cellState.style.fontSize,fontFamily:y.cellState.style.fontFamily},p,z,W,h);d=h=0;switch(f){case "right":h=E/2;break;case "center":h=0;break;case "left":h=-E/2}switch(b){case "top":d=A/2;break;case "middle":d=0;break;case "bottom":d=-A/2}l=Math.max(l,A);q=Math.max(q,E);c=(c-n.x+g.dx)*g.scale;u=(n.height-u+n.y-g.dy)*g.scale;f=q/2;b=l/2;this.shape.appendChild(this.createCellElemScaled("TxtPinX",c));this.shape.appendChild(this.createCellElemScaled("TxtPinY",u));this.shape.appendChild(this.createCellElemScaled("TxtWidth", +q));this.shape.appendChild(this.createCellElemScaled("TxtHeight",l));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",f+h));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",b+d));0!=C&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-C)*Math.PI/180));this.shape.appendChild(p);this.shape.appendChild(W)}}; +mxVsdxCanvas2D.prototype.rotate=function(c,u,q,l,h){0!=c&&(u=this.state,l+=u.dx,h+=u.dy,l*=u.scale,h*=u.scale,this.shape.appendChild(this.createCellElem("Angle",(360-c)*Math.PI/180)),u.rotation+=c,u.rotationCx=l,u.rotationCy=h)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))}; +mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(c,u){this.pos=0;this.buffer=c;this.is_with_alpha=!!u;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()} +BmpDecoder.prototype.parseHeader=function(){var c=this.buffer;this.fileSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.reserved=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.offset=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.headerSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.width=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos]; +this.pos+=4;this.height=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.planes=c[this.pos+1]<<8|c[this.pos];this.pos+=2;this.bitPP=c[this.pos+1]<<8|c[this.pos];this.pos+=2;this.compress=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.rawSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.hr=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.vr=c[this.pos+3]<<24|c[this.pos+ +2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.colors=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.importantColors=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){c=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(c);for(var u=0;u<c;u++){var q=this.buffer[this.pos++],l=this.buffer[this.pos++],h=this.buffer[this.pos++],f=this.buffer[this.pos++]; +this.palette[u]={red:h,green:l,blue:q,quad:f}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var c="bit"+this.bitPP,u=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=u;this.data=u.data;this[c]()}catch(q){console.log("bit decode error:"+q)}}; +BmpDecoder.prototype.bit1=function(){for(var c=Math.ceil(this.width/8),u=c%4,q=this.height-1;0<=q;q--){for(var l=0;l<c;l++)for(var h=this.buffer[this.pos++],f=q*this.width*4+32*l,b=0;8>b;b++)if(8*l+b<this.width){var a=this.palette[h>>7-b&1];this.data[f+4*b]=a.red;this.data[f+4*b+1]=a.green;this.data[f+4*b+2]=a.blue;this.data[f+4*b+3]=255}else break;0!=u&&(this.pos+=4-u)}}; +BmpDecoder.prototype.bit4=function(){for(var c=Math.ceil(this.width/2),u=c%4,q=this.height-1;0<=q;q--){for(var l=0;l<c;l++){var h=this.buffer[this.pos++],f=q*this.width*4+8*l,b=h&15,h=this.palette[h>>4];this.data[f]=h.red;this.data[f+1]=h.green;this.data[f+2]=h.blue;this.data[f+3]=255;if(2*l+1>=this.width)break;h=this.palette[b];this.data[f+4]=h.red;this.data[f+4+1]=h.green;this.data[f+4+2]=h.blue;this.data[f+4+3]=255}0!=u&&(this.pos+=4-u)}}; +BmpDecoder.prototype.bit8=function(){for(var c=this.width%4,u=this.height-1;0<=u;u--){for(var q=0;q<this.width;q++){var l=this.buffer[this.pos++],h=u*this.width*4+4*q;l<this.palette.length?(l=this.palette[l],this.data[h]=l.red,this.data[h+1]=l.green,this.data[h+2]=l.blue):(this.data[h]=255,this.data[h+1]=255,this.data[h+2]=255);this.data[h+3]=255}0!=c&&(this.pos+=4-c)}}; +BmpDecoder.prototype.bit15=function(){var c=2*this.width%4;0!=c&&(c=4-c);for(var u=this.height-1;0<=u;u--){for(var q=0;q<this.width;q++){var l=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var h=(l&31)/31*255|0,f=(l>>5&31)/31*255|0,b=l>>15?255:0,a=u*this.width*4+4*q;this.data[a]=(l>>10&31)/31*255|0;this.data[a+1]=f;this.data[a+2]=h;this.data[a+3]=b}this.pos+=c}}; +BmpDecoder.prototype.bit16=function(){var c=2*this.width%4;0!=c&&(c=4-c);for(var u=this.height-1;0<=u;u--){for(var q=0;q<this.width;q++){var l=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var h=(l&31)/31*255|0,f=(l>>5&31)/31*255|0,b=u*this.width*4+4*q;this.data[b]=(l>>10&31)/31*255|0;this.data[b+1]=f;this.data[b+2]=h;this.data[b+3]=255}this.pos+=c}}; +BmpDecoder.prototype.bit24=function(){var c=3*this.width%4;0!=c&&(c=4-c);for(var u=this.height-1;0<=u;u--){for(var q=0;q<this.width;q++){var l=this.buffer[this.pos++],h=this.buffer[this.pos++],f=this.buffer[this.pos++],b=u*this.width*4+4*q;this.data[b]=f;this.data[b+1]=h;this.data[b+2]=l;this.data[b+3]=255}this.pos+=c}}; +BmpDecoder.prototype.bit32=function(){for(var c=this.height-1;0<=c;c--)for(var u=0;u<this.width;u++){var q=this.buffer[this.pos++],l=this.buffer[this.pos++],h=this.buffer[this.pos++],f=this.buffer[this.pos++],b=c*this.width*4+4*u;this.data[b]=h;this.data[b+1]=l;this.data[b+2]=q;this.data[b+3]=f}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(c,u){function q(){this.constructor=c}for(var l in u)u.hasOwnProperty(l)&&(c[l]=u[l]);c.prototype=null===u?Object.create(u):(q.prototype=u.prototype,new q)},com; +(function(c){(function(u){(function(q){var l=function(){function h(){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.debugPaths=!1;this.vsdxModel=null}h.vsdxPlaceholder_$LI$=function(){null==h.vsdxPlaceholder&&(h.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return h.vsdxPlaceholder}; +h.prototype.decodeVsdx=function(f,b,a,d){var g=this,n={},C={},D=function(){for(var a=h.vsdxPlaceholder+"/document.xml",d=n[a]?n[a]:null,f=d.firstChild;null!=f&&1!=f.nodeType;)f=f.nextSibling;if(null!=f&&1==f.nodeType)g.importNodes(d,f,a,n);else return null;g.vsdxModel=new c.mxgraph.io.vsdx.mxVsdxModel(d,n,C);for(var a=g.vsdxModel.getPages(),D=g.RESPONSE_HEADER,y=function(a){null==a.entries&&(a.entries=[]);return a.entries}(a),a=function(a){a=y[a].getValue();if(!a.isBackground()){var b=p.createMxGraph(); +b.getModel().beginUpdate();p.importPage(a,b,b.getDefaultParent());var d=a.getBackPage();if(null!=d){b.getModel().setValue(b.getDefaultParent(),a.getPageName());var n=new mxCell(d.getPageName());b.addCell(n,b.getModel().getRoot(),0,null,null);p.importPage(d,b,b.getDefaultParent())}d=a.getPageScale()/a.getDrawingScale();if(1!==d){var n=b.getModel(),c;for(c in n.cells){var f=n.cells[c],C=n.getGeometry(f);if(null!=C&&(p.scaleRect(C,d),p.scaleRect(C.alternateBounds,d),n.isEdge(f)&&(p.scalePoint(C.sourcePoint, +d),p.scalePoint(C.targetPoint,d),p.scalePoint(C.offset,d),f=C.points,null!=f)))for(C=0;C<f.length;C++)p.scalePoint(f[C],d)}}b.getModel().endUpdate();D=D.concat(g.RESPONSE_DIAGRAM_START);D=D.concat(g.processPage(b,a));D=D.concat(g.RESPONSE_DIAGRAM_END)}},p=g,d=0;d<y.length;d++)a(d);D=D.concat(g.RESPONSE_END);b&&b(D)},y=0,p=0,l=function(){p==y&&D()};JSZip.loadAsync(f).then(function(a){a.forEach(function(a,b){var d=b.name,f=d.toLowerCase(),D=f.length;f.indexOf(".xml")==D-4||f.indexOf(".xml.rels")==D- +9?(y++,b.async("string").then(function(a){if(0!==a.length){var b=void 0;void 0===b&&(b=0);""===a.substr(b,3)&&(a=a.substring(3));a=mxUtils.parseXml(a);a.vsdxFileName=d;n[d]=a}p++;l()})):0===f.indexOf(h.vsdxPlaceholder+"/media")&&(y++,function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".emf")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){for(var b=!1,n="",f=0;f<a.length-8;f++)if(g.isPng(a,f)||g.isJpg(a,f)){n=c.mxgraph.online.mxBase64.encodeToString(a, +f);b=!0;break}b&&(C[d]=n);p++;l()}):function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=new BmpDecoder(a);var b=document.createElement("canvas");b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");C[d]=a.substr(23);p++;l()}):b.async("base64").then(function(a){C[d]=a;p++;l()}))})},function(a){null!=d&&d(a)})};h.prototype.createMxGraph=function(){var c= +new mxGraph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};h.prototype.processPage=function(c,b){var a=(new mxCodec).encode(c.getModel());a.setAttribute("style","default-style2");var a=mxUtils.getXml(a),d="";if(null!=b)var g=mxUtils.htmlEntities(b.getPageName()),d=d+('<diagram name="'+g+'">');return d+=Graph.prototype.compress(a)};h.prototype.isJpg=function(c,b){return 255===c[b]&&216===c[b+1]&&255===c[b+ +2]};h.prototype.isPng=function(c,b){return 137===c[b]&&80===c[b+1]&&78===c[b+2]&&71===c[b+3]&&13===c[b+4]&&10===c[b+5]&&26===c[b+6]&&10===c[b+7]};h.prototype.scalePoint=function(c,b){null!=c&&(c.x*=b,c.y*=b);return c};h.prototype.scaleRect=function(c,b){null!=c&&(c.x*=b,c.y*=b,c.height*=b,c.width*=b);return c};h.prototype.importNodes=function(c,b,a,d){var g=a.lastIndexOf("/"),n=a,f=a;if(-1!==g&&(n=a.substring(0,g),f=a.substring(g+1,a.length),a=function(a,b){return a[b]?a[b]:null}(d,n+"/_rels/"+f+ +".rels"),null!=a)){var D=a.getElementsByTagName("Relationship");a={};for(g=0;g<D.length;g++){var f=D.item(g),y=f.getAttribute("Id"),f=f.getAttribute("Target");a[y]=f}b=b.getElementsByTagName("Rel");for(g=0;g<b.length;g++)if(D=b.item(g),f=function(a,b){return a[b]?a[b]:null}(a,D.getAttribute("r:id")),f=n+"/"+f,null!=f&&(y=d[f]?d[f]:null,null!=y)){D=D.parentNode;for(y=y.firstChild;null!=y&&1!=y.nodeType;)y=y.nextSibling;if(null!=y&&1==y.nodeType)for(y=y.firstChild;null!=y;){if(null!=y&&1==y.nodeType){var p= +D.appendChild(c.importNode(y,!0));this.importNodes(c,p,f,d)}y=y.nextSibling}}}};h.prototype.importPage=function(c,b,a){for(var d=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(c.getShapes())),g=c.getPageDimensions().y,n=c.getId();d.hasNext();){var f=d.next();this.addShape(b,f.getValue(),a,n,g)}for(c=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null}, +hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(c.getConnects()));c.hasNext();)f=c.next(),f=this.addConnectedEdge(b,f.getValue(),n,g),null!=f&&function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries.splice(d,1)[0]}(this.edgeShapeMap,f);for(f=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b< +a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(this.edgeShapeMap));f.hasNext();)c=f.next(),c.getKey().getPageNumber()===n&&this.addUnconnectedEdge(b,function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,c.getKey()),c.getValue(),g);this.sanitiseGraph(b);return g};h.prototype.addShape=function(f,b,a,d,g){b.parentHeight= +g;var n=c.mxgraph.io.vsdx.VsdxShape.getType(b.getShape());if(null!=n&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){n=b.getId();if(b.isVertex()){var C=null,C=b.isGroup()?this.addGroup(f,b,a,d,g):this.addVertex(f,b,a,d,g);(function(a,b,d){null==a.entries&& +(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,n),b);return C}b.setShapeIndex(f.getModel().getChildCount(a));(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&& +a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,n),b);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(d,n),a)}return null};h.prototype.addGroup=function(f,b,a,d,g){var n=b.getDimensions(),C=b.getMaster(),D=b.getStyleFromShape(),y=b.getGeomList();y.isNoFill()&&(D[mxConstants.STYLE_FILLCOLOR]="none",D[mxConstants.STYLE_GRADIENTCOLOR]="none");y.isNoLine()&&(D[mxConstants.STYLE_STROKECOLOR]="none");D.html="1";D[mxConstants.STYLE_WHITE_SPACE]="wrap";var p=c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"="),D=null, +h=b.getChildShapes(),D=null!=h&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(h),y=b.isDisplacedLabel()||b.isRotatedLabel()||D,D=b.getOriginPoint(g,!0);if(y)D=f.insertVertex(a,null,null,Math.floor(Math.round(100*D.x)/100),Math.floor(Math.round(100*D.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),p);else var l=b.getTextLabel(),D=f.insertVertex(a,null,l,Math.floor(Math.round(100*D.x)/100),Math.floor(Math.round(100*D.y)/100),Math.floor(Math.round(100* +n.x)/100),Math.floor(Math.round(100*n.y)/100),p);for(a=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(h));a.hasNext();)p=a.next().getValue(),h=p.getId(),p.isVertex()?(l=c.mxgraph.io.vsdx.VsdxShape.getType(p.getShape()),null!=l&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(l,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b): +a===b}(l,c.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(l,c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&p.isVertex()&&(p.propagateRotation(b.getRotation()),p.isGroup()?this.addGroup(f,p,D,d,n.y):this.addVertex(f,p,D,d,n.y)),null==C&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b, +value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d,h),p)):null==C?(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new c.mxgraph.io.vsdx.ShapePageId(d, +h),p),function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(d,h),D)):this.addUnconnectedEdge(f,D,p,g);y&&b.createLabelSubShape(f,D);f=b.getRotation();if(0!==f)for(d=D.getGeometry(),b=d.width/2,d=d.height/ +2,g=0;g<D.getChildCount();g++)n=D.getChildAt(g),c.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),f,b,d);return D};h.rotatedEdgePoint=function(c,b,a,d){b=b*Math.PI/180;var g=Math.cos(b);b=Math.sin(b);var n=c.x-a,f=c.y-d;c.x=Math.round(n*g-f*b+a);c.y=Math.round(f*g+n*b+d)};h.prototype.addVertex=function(f,b,a,d,g){var n="",C=b.isDisplacedLabel()||b.isRotatedLabel();C||(n=b.getTextLabel());var D=b.getDimensions(),y=b.getStyleFromShape();y.html="1";var p=y.hasOwnProperty(mxConstants.STYLE_SHAPE)|| +y.hasOwnProperty("stencil");y.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&p||(y[mxConstants.STYLE_FILLCOLOR]="none");p||(y[mxConstants.STYLE_STROKECOLOR]="none");y.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&p||(y[mxConstants.STYLE_GRADIENTCOLOR]="none");y[mxConstants.STYLE_WHITE_SPACE]="wrap";g=b.getOriginPoint(g,!0);return p||null!=n?(y=c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y,"="),p=null,p=C?f.insertVertex(a,null,null,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/ +100),Math.floor(Math.round(100*D.x)/100),Math.floor(Math.round(100*D.y)/100),y):f.insertVertex(a,null,n,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/100),Math.floor(Math.round(100*D.x)/100),Math.floor(Math.round(100*D.y)/100),y),function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key}, +getValue:function(){return this.value}})}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(d,b.getId()),p),b.setLabelOffset(p,y),C&&b.createLabelSubShape(f,p),p):null};h.prototype.addConnectedEdge=function(f,b,a,d){var g=b.getFromSheet(),g=new c.mxgraph.io.vsdx.ShapePageId(a,g),n=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.edgeShapeMap, +g);if(null==n)return null;var C=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,new c.mxgraph.io.vsdx.ShapePageId(a,n.getId()));if(null!=C){var D=f.getModel().getGeometry(C);null!=D&&(d=D.height)}var y=n.getStartXY(d),p=n.getEndXY(d),D=n.getRoutingPoints(d,y,n.getRotation());this.rotateChildEdge(f.getModel(),C,y,p,D);var h=b.getSourceToSheet(), +h=null!=h?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(a,h)):null;null==h&&(h=f.insertVertex(C,null,null,Math.floor(Math.round(100*y.x)/100),Math.floor(Math.round(100*y.y)/100),0,0));b=b.getTargetToSheet();y=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new c.mxgraph.io.vsdx.ShapePageId(a,b)):null;null==y&&(y=f.insertVertex(C,null,null,Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),0,0));a=n.getStyleFromEdgeShape(d);b=n.getRotation();0!==b?(C=f.insertEdge(C,null,null,h,y,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),h=n.createLabelSubShape(f,C),null!=h&&(h.setStyle(h.getStyle()+";rotation="+ +(60<b&&240>b?(b+180)%360:b)),b=h.getGeometry(),b.x=0,b.y=0,b.relative=!0,b.offset=new mxPoint(-b.width/2,-b.height/2))):(C=f.insertEdge(C,null,n.getTextLabel(),h,y,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),b=n.getLblEdgeOffset(f.getView(),D),C.getGeometry().offset=b);b=f.getModel().getGeometry(C);b.points=D;a.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(a,"curved"),"1")&&(b=f.getModel().getGeometry(C),f=n.getControlPoints(d), +b.points=f);return g};h.prototype.addUnconnectedEdge=function(f,b,a,d){if(null!=b){var g=f.getModel().getGeometry(b);null!=g&&(d=g.height)}var n=a.getStartXY(d),C=a.getEndXY(d),D=a.getStyleFromEdgeShape(d),y=a.getRoutingPoints(d,n,a.getRotation()),p=a.getRotation();if(0!==p){0===a.getShapeIndex()?g=f.insertEdge(b,null,null,null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"=")):(g=f.createEdge(b,null,null,null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"=")),g=f.addEdge(g,b,null,null, +a.getShapeIndex()));var h=a.createLabelSubShape(f,g);null!=h&&(h.setStyle(h.getStyle()+";rotation="+(60<p&&240>p?(p+180)%360:p)),p=h.getGeometry(),p.x=0,p.y=0,p.relative=!0,p.offset=new mxPoint(-p.width/2,-p.height/2))}else 0===a.getShapeIndex()?g=f.insertEdge(b,null,a.getTextLabel(),null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"=")):(g=f.createEdge(b,null,a.getTextLabel(),null,null,c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(D,"=")),g=f.addEdge(g,b,null,null,a.getShapeIndex())),p=a.getLblEdgeOffset(f.getView(), +y),g.getGeometry().offset=p;this.rotateChildEdge(f.getModel(),b,n,C,y);b=f.getModel().getGeometry(g);b.points=y;b.setTerminalPoint(n,!0);b.setTerminalPoint(C,!1);D.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(D,"curved"),"1")&&(b=f.getModel().getGeometry(g),f=a.getControlPoints(d),b.points=f);return g};h.prototype.rotateChildEdge=function(c,b,a,d,g){if(null!=b){var n=c.getGeometry(b);c=c.getStyle(b);if(null!=n&&null!=c&&(b=c.indexOf("rotation="), +-1<b))for(c=parseFloat(c.substring(b+9,c.indexOf(";",b))),b=n.width/2,n=n.height/2,h.rotatedEdgePoint(a,c,b,n),h.rotatedEdgePoint(d,c,b,n),a=0;a<g.length;a++)h.rotatedEdgePoint(g[a],c,b,n)}};h.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this.sanitiseCell(c,b)};h.prototype.sanitiseCell=function(c,b){for(var a=c.getModel(),d=a.getChildCount(b),g=[],n=0;n<d;n++){var f=a.getChildAt(b,n);this.sanitiseCell(c,f)&&0<g.push(f)}for(n=0;n<g.length;n++)a.remove(g[n]);0<d&&(d=a.getChildCount(b)); +g=(new String(a.getValue(b))).toString();n=a.getStyle(b);return 0!==d||!a.isVertex(b)||null!=a.getValue(b)&&0!==g.length||null==n||-1==n.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==n.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=n.indexOf("image=")?!1:!0};return h}();q.mxVsdxCodec=l;l.__class="com.mxgraph.io.mxVsdxCodec"})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){var l=function(h){function f(){var b=h.call(this)||this;b.RESPONSE_END="";b.RESPONSE_DIAGRAM_START="";b.RESPONSE_DIAGRAM_END="";b.RESPONSE_HEADER="";return b}__extends(f,h);f.prototype.decodeVssx=function(b,a,d){var g=this,n="<mxlibrary>[";this.decodeVsdx(b,function(b){n=n.concat(b);var d=g.vsdxModel.getMasterShapes(),f=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b=[];null== +a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(g.vsdxModel.getPages())).next();if(null!=d){var C={str:"",toString:function(){return this.str}},l=0===b.length?"":",",q=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=q[a];var b=u.createMxGraph(),g=a.getMasterShape().getShape(),n=new c.mxgraph.io.vsdx.VsdxShape(f,g,!f.isEdge(g),d,null,u.vsdxModel),g=null;if(n.isVertex()){u.edgeShapeMap.entries=[];u.parentsMap.entries= +[];for(var g=u.addShape(b,n,b.getDefaultParent(),0,1169),n=function(a){null==a.entries&&(a.entries=[]);return a.entries}(u.edgeShapeMap),D=0;D<n.length;D++){var y=n[D],p=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(u.parentsMap,y.getKey());u.addUnconnectedEdge(b,p,y.getValue(),1169)}}else g=u.addUnconnectedEdge(b,null,n,1169);if(null!=g){C.str= +C.str.concat(l);C.str=C.str.concat('{"xml":"');g=u.normalizeGeo(g);u.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";b=h.prototype.processPage.call(u,b,null);C.str=C.str.concat(b);C.str=C.str.concat('","w":');C.str=C.str.concat(g.width);C.str=C.str.concat(',"h":');C.str=C.str.concat(g.height);C.str=C.str.concat(',"title":"');a=a.getName();null!=a&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(a));C.str=C.str.concat(a);C.str=C.str.concat('"}');l=","}};for(var u= +g,E=0;E<q.length;E++)b(E);n=n.concat(C)}n=n.concat("]</mxlibrary>");a&&a(n)},d)};f.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint,d);this.transPoint(a.offset,d);b=a.points;if(null!=b)for(var g=0;g<b.length;g++)this.transPoint(b[g],d);this.transPoint(d,d)}return a};f.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};f.prototype.processPage=function(b,a){var d=b.getModel(),g="",n="",f;for(f in d.cells){var D= +d.cells[f];if(b.getDefaultParent()===d.getParent(D)){var g=g.concat(n),g=g.concat('{"xml":"'),y=this.createMxGraph();y.addCell(D);this.sanitiseGraph(y);if(0===y.getModel().getChildCount(y.getDefaultParent()))return"continue";n=this.normalizeGeo(D);y=h.prototype.processPage.call(this,y,null);g=g.concat(y);g=g.concat('","w":');g=g.concat(n.width);g=g.concat(',"h":');g=g.concat(n.height);g=g.concat(',"title":"');n=d.getStyle(D);D="";if(null!=n&&(y=n.indexOf(c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID), +0<=y)){y+=c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;f=parseInt(n.substring(y,n.indexOf(";",y)));a:{n=this.vertexShapeMap;y=new c.mxgraph.io.vsdx.ShapePageId(a.getId(),f);null==n.entries&&(n.entries=[]);for(var p=0;p<n.entries.length;p++)if(null!=n.entries[p].key.equals&&n.entries[p].key.equals(y)||n.entries[p].key===y){n=n.entries[p].value;break a}n=null}null!=n&&(D=n.getName())}g=g.concat(D);g=g.concat('"}');n=","}}this.RESPONSE_DIAGRAM_START=0<g.length?",":"";return g};return f}(c.mxgraph.io.mxVsdxCodec); +q.mxVssxCodec=l;l.__class="com.mxgraph.io.mxVssxCodec"})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){(function(c){var f=function(){function b(a,b,g){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=g}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA= +function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();c.Row=f;f.__class="com.mxgraph.io.vsdx.geometry.Row"})(c.geometry||(c.geometry={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length)return parseFloat(a)}catch(d){}return null};b.getRowObj=function(a,d){var g=a.getAttribute("T"),n=b.getIndex(a),f;f=(f=a.getAttribute("Del"))&&f.equals?f.equals("1"):"1"===f;if(!f){var D=null;n<=d.length&&(D=d[n-1]);var y=f=null,p=null,h=null,l=null,q=null,u=null, +A=null;null!=D&&(f=D.x,y=D.y,p=D.getA(),h=D.getB(),l=D.getC(),q=D.getD(),A=D.getFormulaA(),u=D.getFormulaE());for(var D=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),F=0;F<D.length;F++){var B=D[F],Z=B.getAttribute("N"),K=B.getAttribute("V");switch(Z){case "X":f=b.getDoubleVal(K);break;case "Y":y=b.getDoubleVal(K);break;case "A":p=b.getDoubleVal(K);A=B.getAttribute("V");break;case "B":h=b.getDoubleVal(K);break;case "C":l=b.getDoubleVal(K);break;case "D":q=b.getDoubleVal(K);break;case "E":u= +K}}switch(g){case "MoveTo":return new c.mxgraph.io.vsdx.geometry.MoveTo(n,f,y);case "LineTo":return new c.mxgraph.io.vsdx.geometry.LineTo(n,f,y);case "ArcTo":return new c.mxgraph.io.vsdx.geometry.ArcTo(n,f,y,p);case "Ellipse":return new c.mxgraph.io.vsdx.geometry.Ellipse(n,f,y,p,h,l,q);case "EllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.EllipticalArcTo(n,f,y,p,h,l,q);case "InfiniteLine":return new c.mxgraph.io.vsdx.geometry.InfiniteLine(n,f,y,p,h);case "NURBSTo":return new c.mxgraph.io.vsdx.geometry.NURBSTo(n, +f,y,p,h,l,q,u);case "PolylineTo":return new c.mxgraph.io.vsdx.geometry.PolylineTo(n,f,y,A);case "RelCubBezTo":return new c.mxgraph.io.vsdx.geometry.RelCubBezTo(n,f,y,p,h,l,q);case "RelEllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(n,f,y,p,h,l,q);case "RelLineTo":return new c.mxgraph.io.vsdx.geometry.RelLineTo(n,f,y);case "RelMoveTo":return new c.mxgraph.io.vsdx.geometry.RelMoveTo(n,f,y);case "RelQuadBezTo":return new c.mxgraph.io.vsdx.geometry.RelQuadBezTo(n,f,y,p,h);case "SplineKnot":return new c.mxgraph.io.vsdx.geometry.SplineKnot(n, +f,y,p);case "SplineStart":return new c.mxgraph.io.vsdx.geometry.SplineStart(n,f,y,p,h,l,q)}}return new c.mxgraph.io.vsdx.geometry.DelRow(n)};return b}();h.RowFactory=f;f.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(){this.colorElementMap={};this.fontElementMap={}}f.__static_initialize=function(){f.__static_initialized||(f.__static_initialized=!0,f.__static_initializer_0())};f.defaultColors_$LI$=function(){f.__static_initialize();null==f.defaultColors&&(f.defaultColors={});return f.defaultColors};f.__static_initializer_0=function(){f.defaultColors_$LI$()["0"]="#000000";f.defaultColors_$LI$()["1"]="#FFFFFF";f.defaultColors_$LI$()["2"]= +"#FF0000";f.defaultColors_$LI$()["3"]="#00FF00";f.defaultColors_$LI$()["4"]="#0000FF";f.defaultColors_$LI$()["5"]="#FFFF00";f.defaultColors_$LI$()["6"]="#FF00FF";f.defaultColors_$LI$()["7"]="#00FFFF";f.defaultColors_$LI$()["8"]="#800000";f.defaultColors_$LI$()["9"]="#008000";f.defaultColors_$LI$()["10"]="#000080";f.defaultColors_$LI$()["11"]="#808000";f.defaultColors_$LI$()["12"]="#800080";f.defaultColors_$LI$()["13"]="#008080";f.defaultColors_$LI$()["14"]="#C0C0C0";f.defaultColors_$LI$()["15"]="#E6E6E6"; +f.defaultColors_$LI$()["16"]="#CDCDCD";f.defaultColors_$LI$()["17"]="#B3B3B3";f.defaultColors_$LI$()["18"]="#9A9A9A";f.defaultColors_$LI$()["19"]="#808080";f.defaultColors_$LI$()["20"]="#666666";f.defaultColors_$LI$()["21"]="#4D4D4D";f.defaultColors_$LI$()["22"]="#333333";f.defaultColors_$LI$()["23"]="#1A1A1A"};f.prototype.initialise=function(b,a){if(null!=b){var d=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<d.length)for(var g=d.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY), +n=g.length,d=0;d<n;d++){var f=g.item(d),D=f.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.INDEX),f=f.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[D]=f}d=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<d.length)for(g=d.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),n=g.length,d=0;d<n;d++)f=g.item(d),D=f.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID),f=f.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),this.fontElementMap[D]= +f}};f.prototype.getColor=function(b){var a=function(a,b){return a[b]?a[b]:null}(this.colorElementMap,b);return null==a&&(a=function(a,b){return a[b]?a[b]:null}(f.defaultColors_$LI$(),b),null==a)?"":a};f.prototype.getFont=function(b){var a=this.fontElementMap;b=a[b]?a[b]:null;return null==b?"":b};return f}();h.__static_initialized=!1;l.mxPropertiesManager=h;h.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)}f.prototype.addFromCell=function(b,a){var d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET), +g=!0;null!=a&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=d&&0!==d.length?parseFloat(d):-1,g=!0):null!=a&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,c.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=d&&0!==d.length?parseFloat(d):-1,g=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=d&&0!==d.length?parseFloat(d):-1,g=!0):null==this.targetToSheet&&(this.targetToSheet=null!=d&&0!==d.length? +parseFloat(d):-1,g=!1);this.findToPart(b,g)};f.prototype.findToPart=function(b,a){var d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TO_PART),d=null!=d&&0!==d.length?parseFloat(d):-1;a?this.sourceToPart=d:this.targetToPart=d};f.prototype.getFromSheet=function(){return this.fromSheet};f.prototype.getSourceToSheet=function(){return this.sourceToSheet};f.prototype.getTargetToSheet=function(){return this.targetToSheet};f.prototype.getSourceToPart=function(){return this.sourceToPart};f.prototype.getTargetToPart= +function(){return this.targetToPart};f.prototype.addConnect=function(b){this.endShape=b;var a=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)};return f}();l.mxVsdxConnect=h;h.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){var h=function(){function c(){}c.SET_VALUES_$LI$=function(){null==c.SET_VALUES&&(c.SET_VALUES=["a","b"]);return c.SET_VALUES};c.MY_SET_$LI$=function(){null==c.MY_SET&&(c.MY_SET=c.SET_VALUES_$LI$().slice(0).slice(0));return c.MY_SET};return c}();h.ANGLE="Angle";h.ARC_TO="ArcTo";h.BACKGROUND="Background";h.BACK_PAGE="BackPage";h.BEGIN_ARROW="BeginArrow";h.BEGIN_ARROW_SIZE="BeginArrowSize";h.BEGIN_X="BeginX";h.BEGIN_Y="BeginY";h.BOTTOM_MARGIN="BottomMargin"; +h.BULLET="Bullet";h.CASE="Case";h.CHARACTER="Character";h.COLOR="Color";h.COLOR_ENTRY="ColorEntry";h.COLORS="Colors";h.COLOR_TRANS="ColorTrans";h.CONNECT="Connect";h.CONNECTS="Connects";h.CONNECTION="Connection";h.CONTROL="Control";h.DELETED="Del";h.DOCUMENT_SHEET="DocumentSheet";h.ELLIPSE="Ellipse";h.ELLIPTICAL_ARC_TO="EllipticalArcTo";h.END_ARROW="EndArrow";h.END_ARROW_SIZE="EndArrowSize";h.END_X="EndX";h.END_Y="EndY";h.FACE_NAME="FaceName";h.FACE_NAMES="FaceNames";h.FALSE="0";h.FILL="Fill";h.FILL_BKGND= +"FillBkgnd";h.FILL_BKGND_TRANS="FillBkgndTrans";h.FILL_FOREGND="FillForegnd";h.FILL_FOREGND_TRANS="FillForegndTrans";h.FILL_PATTERN="FillPattern";h.FILL_STYLE="FillStyle";h.FILL_GRADIENT_ENABLED="FillGradientEnabled";h.FLAGS="Flags";h.FLIP_X="FlipX";h.FLIP_Y="FlipY";h.FONT="Font";h.FONT_NAME="Name";h.FOREIGN="Foreign";h.FROM_CELL="FromCell";h.FROM_SHEET="FromSheet";h.GEOM="Geom";h.HEIGHT="Height";h.HORIZONTAL_ALIGN="HorzAlign";h.ID="ID";h.INDENT_FIRST="IndFirst";h.INDENT_LEFT="IndLeft";h.INDENT_RIGHT= +"IndRight";h.INDEX="IX";h.LEFT_MARGIN="LeftMargin";h.LETTER_SPACE="Letterspace";h.LINE="Line";h.LINE_COLOR="LineColor";h.LINE_COLOR_TRANS="LineColorTrans";h.LINE_PATTERN="LinePattern";h.LINE_STYLE="LineStyle";h.LINE_TO="LineTo";h.LINE_WEIGHT="LineWeight";h.LOC_PIN_X="LocPinX";h.LOC_PIN_Y="LocPinY";h.MASTER="Master";h.MASTER_SHAPE="MasterShape";h.MASTERS="Masters";h.MOVE_TO="MoveTo";h.NAME="Name";h.NAME_U="NameU";h.NO_LINE="NoLine";h.NURBS_TO="NURBSTo";h.PAGE="Page";h.PAGE_HEIGHT="PageHeight";h.PAGE_WIDTH= +"PageWidth";h.PAGES="Pages";h.PARAGRAPH="Paragraph";h.PIN_X="PinX";h.PIN_Y="PinY";h.POS="Pos";h.RGB="RGB";h.RIGHT_MARGIN="RightMargin";h.ROUNDING="Rounding";h.RTL_TEXT="RTLText";h.SIZE="Size";h.SHAPE="Shape";h.SHAPES="Shapes";h.SHAPE_SHDW_SHOW="ShapeShdwShow";h.SHDW_PATTERN="ShdwPattern";h.SPACE_AFTER="SpAfter";h.SPACE_BEFORE="SpBefore";h.SPACE_LINE="SpLine";h.STRIKETHRU="Strikethru";h.STYLE="Style";h.STYLE_SHEET="StyleSheet";h.STYLE_SHEETS="StyleSheets";h.TEXT="Text";h.TEXT_BKGND="TextBkgnd";h.TEXT_BLOCK= +"TextBlock";h.TEXT_STYLE="TextStyle";h.TO_PART="ToPart";h.TO_SHEET="ToSheet";h.TOP_MARGIN="TopMargin";h.TRUE="1";h.TXT_ANGLE="TxtAngle";h.TXT_HEIGHT="TxtHeight";h.TXT_LOC_PIN_X="TxtLocPinX";h.TXT_LOC_PIN_Y="TxtLocPinY";h.TXT_PIN_X="TxtPinX";h.TXT_PIN_Y="TxtPinY";h.TXT_WIDTH="TxtWidth";h.TYPE="Type";h.TYPE_GROUP="Group";h.TYPE_SHAPE="Shape";h.UNIQUE_ID="UniqueID";h.VERTICAL_ALIGN="VerticalAlign";h.WIDTH="Width";h.X_CON="XCon";h.X_DYN="XDyn";h.X="X";h.Y_CON="YCon";h.Y_DYN="YDyn";h.Y="Y";h.HIDE_TEXT= +"HideText";h.VSDX_ID="vsdxID";h.CONNECT_TO_PART_WHOLE_SHAPE=3;c.mxVsdxConstants=h;h.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=b&&1==b.nodeType||null===b)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]), +this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}f.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))}catch(a){return 0}};f.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType|| +null===b)return this.getIndex$org_w3c_dom_Element(b);if(void 0===b)return this.getIndex$();throw Error("invalid overload");};f.prototype.processGeoElem=function(b){var a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell");b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Row");if(null==this.rows){this.rows=[];for(var d=0;d<b.length;d++)0<this.rows.push(null)}for(d=0;d<a.length;d++){var g=a[d],n=g.getAttribute("N"),g=g.getAttribute("V");switch(n){case "NoFill":this.noFill= +function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoLine":this.noLine=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoShow":this.noShow=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoSnap":this.noSnap=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g);break;case "NoQuickDrag":this.noQuickDrag=function(a,b){return a&&a.equals?a.equals(b):a===b}("1",g)}}a=this.rows.length;d=!1;for(n=0;n<b.length;n++)g=c.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(b[n], +this.rows),g.getIndex()>a?(0<this.rows.push(g),d=!0):this.rows[g.getIndex()-1]=g;d&&function(a,b){b.compare?a.sort(function(a,d){return b.compare(a,d)}):a.sort(b)}(this.rows,new f.mxVsdxGeometry$0(this))};f.prototype.inheritGeo=function(b){this.noFill=b.noFill;this.noLine=b.noLine;this.noShow=b.noShow;this.noSnap=b.noSnap;this.noQuickDrag=b.noQuickDrag;var a=this.rows=[];a.push.apply(a,b.rows)};f.prototype.getIndex$=function(){return this.index};f.prototype.isNoFill=function(){return this.noFill}; +f.prototype.isNoLine=function(){return this.noLine};f.prototype.isNoShow=function(){return this.noShow};f.prototype.isNoSnap=function(){return this.noSnap};f.prototype.isNoQuickDrag=function(){return this.noQuickDrag};f.prototype.getRows=function(){return this.rows};f.prototype.getPathXML=function(b,a){if(this.noShow)return"";for(var d="",g=0;g<this.rows.length;g++)d=d.concat(this.rows[g].handle(b,a));return d};return f}();l.mxVsdxGeometry=h;h.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(c){var b= +function(){function a(a){this.__parent=a}a.prototype.compare=function(a,b){return a.getIndex()-b.getIndex()};return a}();c.mxVsdxGeometry$0=b;b.__interfaces=["java.util.Comparator"]})(h=l.mxVsdxGeometry||(l.mxVsdxGeometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}f.prototype.addGeometry=function(b){b=new c.mxgraph.io.vsdx.mxVsdxGeometry(b,this.parentGeomList);b.getIndex()<this.geomList.length?this.geomList[b.getIndex()]=b:(0<this.geomList.push(b),this.sortNeeded=!0)};f.prototype.sort=function(){this.sortNeeded&&(function(b,a){a.compare? +b.sort(function(b,g){return a.compare(b,g)}):b.sort(a)}(this.geomList,new f.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};f.prototype.isNoShow=function(){for(var b=0;b<this.geomList.length;b++)if(!this.geomList[b].isNoShow())return!1;return!0};f.prototype.isNoFill=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};f.prototype.isNoLine=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&& +!a.isNoLine())return!1}return!0};f.prototype.hasGeom=function(){return 0!=this.geomList.length};f.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};f.prototype.rotatedPoint=function(b,a,d){var g=b.y*a+b.x*d;b.x=b.x*a-b.y*d;b.y=g};f.prototype.getRoutingPoints=function(b,a,d){this.sort();b=[];0<b.push(a.clone());for(var g=0,n=0,f=0;f<this.geomList.length;f++){var D=this.geomList[f];if(!D.isNoShow())for(var D=D.getRows(),y=0;y<D.length;y++){var p= +D[y];if(0==y&&null!=p&&p instanceof c.mxgraph.io.vsdx.geometry.MoveTo)g=null!=p.x?p.x:0,n=null!=p.y?p.y:0;else if(null!=p&&p instanceof c.mxgraph.io.vsdx.geometry.LineTo){var h=null!=p.x?p.x:0,p=null!=p.y?p.y:0,l=new mxPoint(h,p);0!==d&&(d=(360-d)*Math.PI/180,this.rotatedPoint(l,Math.cos(d),Math.sin(d)));h=(l.x-g)*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();h+=a.x;p=(l.y-n)*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;p+=a.y;h=Math.round(100*h)/100;p=Math.round(100*p)/100;l.x= +h;l.y=p;0<b.push(l)}}}return b};f.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),d={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},g=d.str.length,n;n=this.processGeo(b,a,d,-1,!0);n=this.processGeo(b,a,d,n,!1);if(d.str.length===g)return"";this.closePath(d,n);d.str=d.str.concat("</foreground></shape>");return d.str};f.prototype.processGeo=function(b,a,d,g,n){for(var c=0;c<this.geomList.length;c++){var f=this.geomList[c];if(n!==f.isNoFill()){var y=f.getPathXML(a, +b);0!==y.length&&(f=this.getGeoStyle(f),-1===g?d.str=d.str.concat("<path>"):g!==f&&(this.closePath(d,g),d.str=d.str.concat("<path>")),d.str=d.str.concat(y),g=f)}}return g};f.prototype.getGeoStyle=function(b){var a=0;b.isNoLine()||b.isNoFill()?b.isNoFill()?b.isNoLine()||(a=3):a=2:a=1;return a};f.prototype.closePath=function(b,a){b.str=b.str.concat("</path>");1===a?b.str=b.str.concat("<fillstroke/>"):2===a?b.str=b.str.concat("<fill/>"):3===a&&(b.str=b.str.concat("<stroke/>"))};return f}();l.mxVsdxGeometryList= +h;h.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(c){var b=function(){function a(a){this.__parent=a}a.prototype.compare=function(a,b){return a.getIndex()-b.getIndex()};return a}();c.mxVsdxGeometryList$0=b;b.__interfaces=["java.util.Comparator"]})(h=l.mxVsdxGeometryList||(l.mxVsdxGeometryList={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a){this.masterShape=this.Id=null;this.childShapes={};this.master=b;this.Id=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}f.prototype.processMasterShapes=function(b){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a.nodeName,"Rel")){var d=b.getRelationship(a.getAttribute("r:id"),c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+ +"/masters/_rels/masters.xml.rels"),g=d.getAttribute("Target"),d=d.getAttribute("Type"),n=null;null!=d&&function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(d,"master")&&(n=b.getXmlDoc(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+g));if(null!=n)for(g=n.firstChild;null!=g;){if(null!=g&&1==g.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(g.nodeName,"MasterContents")){this.processMasterShape(g,b);break}g=g.nextSibling}}a=a.nextSibling}};f.prototype.processMasterShape= +function(b,a){for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(d.nodeName,"Shapes")){for(d=d.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(d.nodeName,"Shape")){var g=d,n=g.getAttribute("ID"),f=new c.mxgraph.io.vsdx.Shape(g,a);this.masterShape=null==this.masterShape?f:this.masterShape;this.childShapes[n]=f;this.processMasterShape(g,a)}d=d.nextSibling}break}d=d.nextSibling}};f.prototype.getMasterShape= +function(){return this.masterShape};f.prototype.getSubShape=function(b){var a=this.childShapes;return a[b]?a[b]:null};f.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};f.prototype.getName=function(){return this.master.getAttribute("Name")||""};f.prototype.getUniqueID=function(){var b="";this.master.hasAttribute("UniqueID")&&(b=this.master.getAttribute("UniqueID"));return b};f.prototype.getId=function(){return this.Id};f.prototype.getMasterElement=function(){return this.master}; +return f}();l.mxVsdxMaster=h;h.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a,d){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=d;for(b=b.firstChild;null!=b;){if(a=null!=b&&1==b.nodeType)a=b.tagName.toLowerCase(),d=c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(d):a===d;if(a){this.rootElement=b;break}b=b.nextSibling}this.pm=new c.mxgraph.io.vsdx.mxPropertiesManager; +this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}f.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var b=!0,a=1;b;){var d=function(a,b){return a[b]?a[b]:null}(this.xmlDocs,c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=d){for(d=d.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(d.tagName,"a:theme")){d=new c.mxgraph.io.vsdx.mxVsdxTheme(d);0> +d.getThemeIndex()&&d.processTheme();var g=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.themes,d.getThemeIndex());null!=g&&g.isPure()||function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b, +value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,d.getThemeIndex(),d);break}d=d.nextSibling}a++}else b=!1}};f.prototype.initStylesheets=function(){var b=this.rootElement.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<b.length)for(var b=b.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET),a=b.length,d=0;d<a;d++){var g=b.item(d),n=g.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID),g=new c.mxgraph.io.vsdx.Style(g, +this);this.stylesheets[n]=g}for(b=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){return Object.keys(a).map(function(b){return a[b]})}(this.stylesheets));b.hasNext();)g=b.next(),g.stylesheetRefs(this)};f.prototype.initMasters=function(){if(null!=this.xmlDocs){var b=function(a,b){return a[b]?a[b]:null}(this.xmlDocs,c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!= +b&&1==b.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.tagName,c.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.tagName,"Master")){var a=new c.mxgraph.io.vsdx.mxVsdxMaster(b,this);this.masters[a.getId()]=a}b=b.nextSibling}break}b=b.nextSibling}}};f.prototype.initPages=function(){if(null!=this.xmlDocs){var b=function(a,b){return a[b]?a[b]:null}(this.xmlDocs,c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+ +"/pages/pages.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.tagName,c.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};for(var b={},d=a.length,g=0;g<d;g++){var n=a.item(g),n=this.createPage(n);n.isBackground()&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&& +a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(b,n.getId(),n);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages, +n.getId(),n)}a=function(a){null==a.entries&&(a.entries=[]);return a.entries}(this.pages);for(d=0;d<a.length;d++)n=a[d].getValue(),n.isBackground()||(g=n.getBackPageId(),null!=g&&(g=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(b,g),n.setBackPage(g)))}break}b=b.nextSibling}}};f.prototype.getPages=function(){return this.pages};f.prototype.getThemes= +function(){return this.themes};f.prototype.getRelationship=function(b,a){var d=function(a,b){return a[b]?a[b]:null}(this.xmlDocs,a);if(null==d||null==b||0===b.length)return null;for(var d=d.getElementsByTagName("Relationship"),g=0;g<d.length;g++){var n=d.item(g);if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n.getAttribute("Id"),b))return n}return null};f.prototype.getMaster=function(b){var a=this.masters;return a[b]?a[b]:null};f.prototype.createPage=function(b){return new c.mxgraph.io.vsdx.mxVsdxPage(b, +this)};f.prototype.getPropertiesManager=function(){return this.pm};f.prototype.setPropertiesManager=function(b){this.pm=b};f.prototype.getMasterShapes=function(){return this.masters};f.prototype.setMasterShapes=function(b){this.masters=b};f.prototype.getStylesheet=function(b){var a=this.stylesheets;return a[b]?a[b]:null};f.prototype.getXmlDoc=function(b){var a=this.xmlDocs;return a[b]?a[b]:null};f.prototype.getMedia=function(b){var a=this.media;return a[b]?a[b]:null};return f}();l.mxVsdxModel=h;h.__class= +"com.mxgraph.io.vsdx.mxVsdxModel"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a){this.pageName=this.Id=null;this.__isBackground=!1;this.pageSheet=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.cellElements={};this.model=a;this.pageElement=b;var d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),g;if(g=null!=d)g=c.mxgraph.io.vsdx.mxVsdxConstants.TRUE,g=d&&d.equals?d.equals(g):d===g;this.__isBackground=g?!0:!1;d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE); +!this.__isBackground&&null!=d&&0<d.length&&(this.backPageId=parseFloat(d));this.Id=parseFloat(b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"PageSheet");if(0<d.length)for(d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d[0],"Cell"),g=0;g<d.length;g++){var n=d[g],f=n.getAttribute("N");this.cellElements[f]=n}this.parseNodes(b,a,"pages")}f.prototype.parseNodes= +function(b,a,d){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var g=b,n=g.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Rel"))this.resolveRel(g,a,d);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Shapes"))this.shapes=this.parseShapes(g,null,!1);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Connects"))for(g=g.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),g=null!=g&&0<g.length?g.item(0):null;null!=g;){if(null!=g&&1==g.nodeType){var n= +g,f=new c.mxgraph.io.vsdx.mxVsdxConnect(n),h=f.getFromSheet(),h=null!=h&&-1<h?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.connects,h):null;null!=h?h.addConnect(n):function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value= +d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,f.getFromSheet(),f)}g=g.nextSibling}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(n,"PageSheet")&&(this.pageSheet=g)}b=b.nextSibling}};f.prototype.resolveRel=function(b,a,d){d=a.getRelationship(b.getAttribute("r:id"),c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+d+".xml.rels");b=d.getAttribute("Target");d=d.getAttribute("Type");if(function(a,b){var d= +a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}((new String(d)).toString(),"page")){var g=null;null!=d&&function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(d,"page")&&(g=a.getXmlDoc(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+b));if(null!=g)for(d=g.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(d.tagName,"PageContents")){g=b.indexOf(".");-1!==g&&this.parseNodes(d,a,b.substring(0,g));break}d=d.nextSibling}}}; +f.prototype.parseShapes=function(b,a,d){d={};b=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(b=null!=b&&0<b.length?b.item(0):null;null!=b;){if(null!=b&&1==b.nodeType){var g=b,n=a;if(null==n){var f=g.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER);null==f||function(a,b){return a&&a.equals?a.equals(b):a===b}(f,"")||(n=this.model.getMaster(f))}f=this.isEdge(g);if(!f&&null!=n){var f=g.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),h=n.getMasterElement();null== +f||function(a,b){return a&&a.equals?a.equals(b):a===b}(f,"")||(h=n.getSubShape(f).getShape());f=this.isEdge(h)}g=this.createCell(g,!f,n);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(d,g.getId(),g)}b=b.nextSibling}return d};f.prototype.createCell= +function(b,a,d){return new c.mxgraph.io.vsdx.VsdxShape(this,b,a,this.model.getMasterShapes(),d,this.model)};f.prototype.isEdge=function(b){if(null!=b&&(b=b.childNodes,null!=b))for(b=b.item(0);null!=b;){if(null!=b&&1==b.nodeType){var a=b;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"BeginX")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"BeginY")||function(a,b){return a&&a.equals?a.equals(b): +a===b}(a,"EndY")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"EndX")))return!0}b=b.nextSibling}return!1};f.prototype.getPageDimensions=function(){var b=0,a=0,d=function(a,b){return a[b]?a[b]:null}(this.cellElements,"PageHeight"),g=function(a,b){return a[b]?a[b]:null}(this.cellElements,"PageWidth");null!=d&&(b=parseFloat(d.getAttribute("V"))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),b=Math.round(100*b)/100);null!=g&&(a=parseFloat(g.getAttribute("V"))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +a=Math.round(100*a)/100);return new mxPoint(a,b)};f.prototype.getDrawingScale=function(){var b;b=this.cellElements;b=b.DrawingScale?b.DrawingScale:null;return null!=b?parseFloat(b.getAttribute("V"))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};f.prototype.getPageScale=function(){var b;b=this.cellElements;b=b.PageScale?b.PageScale:null;return null!=b?parseFloat(b.getAttribute("V"))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};f.prototype.getCellValue=function(b){var a=this.cellElements; +b=a[b]?a[b]:null;return null!=b?b.getAttribute("V")||"":null};f.prototype.getCellIntValue=function(b,a){var d=this.getCellValue(b);return null!=d?parseInt(d):a};f.prototype.getId=function(){return this.Id};f.prototype.getPageName=function(){return this.pageName};f.prototype.getShapes=function(){return this.shapes};f.prototype.getConnects=function(){return this.connects};f.prototype.isBackground=function(){return this.__isBackground};f.prototype.getBackPageId=function(){return this.backPageId};f.prototype.setBackPage= +function(b){this.backPage=b};f.prototype.getBackPage=function(){return this.backPage};return f}();l.mxVsdxPage=h;h.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var b=function(a){if(0!=a.length){for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1)));return d}};return b(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new c.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new c.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new c.mxgraph.io.vsdx.theme.LineStyle; +this.fillStyles=[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var b=function(a){if(0==a.length)return 0;for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1)));return d};return b(a)}([4,4]);this.variantLineIdx=function(a){var b=function(a){if(0==a.length)return 0;for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1))); +return d};return b(a)}([4,4]);this.variantEffectIdx=function(a){var b=function(a){if(0==a.length)return 0;for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1)));return d};return b(a)}([4,4]);this.variantFontIdx=function(a){var b=function(a){if(0==a.length)return 0;for(var d=[],g=0;g<a[0];g++)d.push(b(a.slice(1)));return d};return b(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=b;this.name=b.getAttribute("name")||"";b=function(a,b){return a[b]?a[b]: +null}(f.themesIds_$LI$(),this.name);null!=b&&(this.themeIndex=b)}f.__static_initialize=function(){f.__static_initialized||(f.__static_initialized=!0,f.__static_initializer_0(),f.__static_initializer_1())};f.themesIds_$LI$=function(){f.__static_initialize();null==f.themesIds&&(f.themesIds={});return f.themesIds};f.__static_initializer_0=function(){f.themesIds_$LI$().Office=33;f.themesIds_$LI$().Linear=34;f.themesIds_$LI$().Zephyr=35;f.themesIds_$LI$().Integral=36;f.themesIds_$LI$().Simple=37;f.themesIds_$LI$().Whisp= +38;f.themesIds_$LI$().Daybreak=39;f.themesIds_$LI$().Parallel=40;f.themesIds_$LI$().Sequence=41;f.themesIds_$LI$().Slice=42;f.themesIds_$LI$().Ion=43;f.themesIds_$LI$().Retrospect=44;f.themesIds_$LI$().Organic=45;f.themesIds_$LI$().Bubble=46;f.themesIds_$LI$().Clouds=47;f.themesIds_$LI$().Gemstone=48;f.themesIds_$LI$().Lines=49;f.themesIds_$LI$().Facet=50;f.themesIds_$LI$().Prominence=51;f.themesIds_$LI$().Smoke=52;f.themesIds_$LI$().Radiance=53;f.themesIds_$LI$().Shade=54;f.themesIds_$LI$().Pencil= +55;f.themesIds_$LI$().Pen=56;f.themesIds_$LI$().Marker=57;f.themesIds_$LI$().Whiteboard=58};f.colorIds_$LI$=function(){f.__static_initialize();null==f.colorIds&&(f.colorIds={});return f.colorIds};f.__static_initializer_1=function(){(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(), +0,"dk1");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),1,"lt1");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key=== +a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),2,"accent1");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),3,"accent2"); +(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),4,"accent3");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value= +d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),5,"accent4");(function(b,a,d){null==b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),6,"accent5");(function(b,a,d){null== +b.entries&&(b.entries=[]);for(var g=0;g<b.entries.length;g++)if(null!=b.entries[g].key.equals&&b.entries[g].key.equals(a)||b.entries[g].key===a){b.entries[g].value=d;return}b.entries.push({key:a,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(f.colorIds_$LI$(),7,"accent6")};f.prototype.getThemeIndex=function(){return this.themeIndex};f.prototype.setVariant=function(b){this.themeVariant=b};f.prototype.isPure=function(){return this.__isPure};f.prototype.processTheme= +function(){if(!this.isProcessed){try{for(var b=this.theme.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.nodeName,"a:themeElements"))for(var a=b.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var d=a,g=d.nodeName;(function(a,b){return a&&a.equals?a.equals(b):a===b})(g,"a:clrScheme")?(function(a,b){return a&&a.equals?a.equals(b):a===b}(this.name,d.getAttribute("name"))||(this.__isPure=!1),this.processColors(d)):function(a,b){return a&&a.equals? +a.equals(b):a===b}(g,"a:fontScheme")?(function(a,b){return a&&a.equals?a.equals(b):a===b}(this.name,d.getAttribute("name"))||(this.__isPure=!1),this.processFonts(d)):function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"a:fmtScheme")?(function(a,b){return a&&a.equals?a.equals(b):a===b}(this.name,d.getAttribute("name"))||(this.__isPure=!1),this.processFormats(d)):function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"a:extLst")&&this.processExtras(d)}a=a.nextSibling}b=b.nextSibling}}catch(n){console.error(n.message, +n)}this.isProcessed=!0}};f.prototype.processExtras=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b[a]);switch(d.nodeName){case "vt:fmtConnectorScheme":var g;g=this.name;var n=d.getAttribute("name");g=g&&g.equals?g.equals(n):g===n;g||(this.__isPure=!1);d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d);for(g=0;g<d.length;g++)switch(n=d[g],n.nodeName){case "a:fillStyleLst":for(var n= +c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(n),f=0;f<n.length;f++)0<this.connFillStyles.push(c.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(n[f]));break;case "a:lnStyleLst":for(n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(n),f=0;f<n.length;f++)0<this.connLineStyles.push(new c.mxgraph.io.vsdx.theme.LineStyle(n[f]))}break;case "vt:lineStyles":d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d);for(g=0;g<d.length;g++)switch(n=d[g],n.nodeName){case "vt:fmtConnectorSchemeLineStyles":n= +c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(n);for(f=0;f<n.length;f++)0<this.connLineStylesExt.push(new c.mxgraph.io.vsdx.theme.LineStyleExt(n[f]));break;case "vt:fmtSchemeLineStyles":for(n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(n),f=0;f<n.length;f++)0<this.lineStylesExt.push(new c.mxgraph.io.vsdx.theme.LineStyleExt(n[f]))}break;case "vt:fontStylesGroup":d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d);for(g=0;g<d.length;g++)switch(n=d[g],n.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(n, +this.connFontColors,this.connFontStyles);break;case "vt:fontStyles":this.fillFontStyles(n,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),n=g=0;n<d.length;n++){f=d[n];this.variantEmbellishment[g]=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"embellishment");for(var f=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),h=0,y=0;y<f.length;y++){var p=f[y];this.variantFillIdx[g][h]= +c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"fillIdx");this.variantLineIdx[g][h]=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"lineIdx");this.variantEffectIdx[g][h]=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"effectIdx");this.variantFontIdx[g][h]=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"fontIdx");h++}g++}}}};f.prototype.fillFontStyles=function(b,a,d){b= +c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var g=0;g<b.length;g++){var n=b[g];0<d.push(c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"style"));n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n);null!=n&&0<a.push(c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n)))}};f.prototype.processFormats=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a= +0;a<b.length;a++){var d=b[a];switch(d.nodeName){case "a:fillStyleLst":for(var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),g=0;g<d.length;g++)0<this.fillStyles.push(c.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(d[g]));break;case "a:lnStyleLst":for(d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),g=0;g<d.length;g++)0<this.lineStyles.push(new c.mxgraph.io.vsdx.theme.LineStyle(d[g]))}}};f.prototype.processFonts=function(b){};f.prototype.processColors=function(b){for(b=b.firstChild;null!= +b;){if(null!=b&&1==b.nodeType){var a=b,d=a.nodeName,a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),g;g=(g=d)&&g.equals?g.equals("a:extLst"):"a:extLst"===g;g?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(d=d.substring(2),0<a.length&&this.addBasicColor(d,a[0]))}b=b.nextSibling}};f.prototype.addVariantColors=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);if(null!=b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b); +for(var a=0,d=0;d<b.length;d++){var g=b[d];this.addVariantColorsSet(a++,g)}}};f.prototype.addVariantColorsSet=function(b,a){var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[b]=a.hasAttribute("monotone");for(var g=0;g<d.length;g++){var n=d[g];switch(n.nodeName){case "vt:varColor1":this.variantsColors[b][0]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor2":this.variantsColors[b][1]= +c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor3":this.variantsColors[b][2]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor4":this.variantsColors[b][3]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor5":this.variantsColors[b][4]= +c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor6":this.variantsColors[b][5]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n));break;case "vt:varColor7":this.variantsColors[b][6]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(n))}}};f.prototype.addBkgndColor=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b); +null!=b&&(this.bkgndColor=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b)))};f.prototype.extractThemeIndex=function(b){b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.themeIndex=parseInt(b.getAttribute("schemeEnum")))};f.prototype.addBasicColor=function(b,a){this.baseColors[b]=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};f.prototype.getSchemeColor=function(b){this.processTheme();var a=this.baseColors; +b=a[b]?a[b]:null;return null!=b?b.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};f.prototype.getStyleColor=function(b){this.processTheme();if(8>b){var a=function(a,b){return a[b]?a[b]:null}(this.baseColors,function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(f.colorIds_$LI$(),b));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8=== +b){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{var a=null,d=0;200<=b?d=b-200:100<=b&&(d=b-100);0<=d&&6>=d&&(a=this.variantsColors[this.themeVariant][d]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};f.prototype.getFillGraientColor=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!0)};f.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b, +!1)};f.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=function(b,a){this.processTheme();var d=b.getQuickStyleFillColor(),g=null;switch(b.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:g=this.fillStyles[b.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(d=100),g=b.getQuickStyleFillMatrix()-100,g=this.fillStyles[this.variantFillIdx[this.themeVariant][g]-1]}d=null!=g?a?null!=g&&g instanceof +c.mxgraph.io.vsdx.theme.GradFill?g.applyStyle(d,this).getGradientClr():null:g.applyStyle(d,this):a?null:this.getStyleColor(d);g=b.getQuickStyleVariation();null!=d&&0<(g&8)&&(d=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b));return d};f.prototype.getFillColor=function(b,a){if(!(null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)||"boolean"!==typeof a&&null!==a){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b); +throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,a)};f.prototype.getLineStyle=function(b,a){this.processTheme();var d=null;switch(b){case 1:case 2:case 3:case 4:case 5:case 6:d=a[b-1];break;case 100:case 101:case 102:case 103:d=a===this.lineStyles?this.lineStyles[this.variantLineIdx[this.themeVariant][b-100]-1]:this.defaultLineStyle}return d};f.prototype.getLineStyleExt=function(b,a){this.processTheme();var d=null;switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:d= +a[b]}return d};f.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var d=b.getQuickStyleLineColor(),g=this.getLineStyle(b.getQuickStyleLineMatrix(),a);switch(b.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(d=100)}d=null!=g?g.getLineColor(d,this):this.getStyleColor(d);0<(b.getQuickStyleVariation()&4)&&(d=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b));return d}; +f.prototype.getLineColor=function(b,a){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};f.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals= +function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};f.prototype.getConnLineColor=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};f.prototype.getDefaultLineClr=function(){return this.defaultLineClr};f.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(b,a,d){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(), +a);if(null!=a)return a.isDashed();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?b.isDashed():!1};f.prototype.isLineDashed=function(b,a,d){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=d&&d instanceof Array||null===d))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,a,d);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null=== +b)&&void 0===a&&void 0===d)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};f.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};f.prototype.isConnLineDashed=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b, +this.connLineStylesExt,this.connLineStyles)};f.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(b,a,d){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?b.getLineDashPattern():null};f.prototype.getLineDashPattern=function(b,a,d){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof +Array||null===a)&&(null!=d&&d instanceof Array||null===d))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,a,d);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===d)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};f.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b, +this.lineStylesExt,this.lineStyles)};f.prototype.getConnLineDashPattern=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.connLineStylesExt,this.connLineStyles)};f.prototype.getArrowSize=function(b,a,d,g){d=this.getLineStyleExt(b.getQuickStyleLineMatrix(),d);if(null!=d)return a?d.getStartSize():d.getEndSize();b=this.getLineStyle(b.getQuickStyleLineMatrix(),g);return null!=b?a?b.getStartSize():b.getEndSize():4};f.prototype.getStartSize= +function(b){return this.getArrowSize(b,!0,this.lineStylesExt,this.lineStyles)};f.prototype.getConnStartSize=function(b){return this.getArrowSize(b,!0,this.connLineStylesExt,this.connLineStyles)};f.prototype.getEndSize=function(b){return this.getArrowSize(b,!1,this.lineStylesExt,this.lineStyles)};f.prototype.getConnEndSize=function(b){return this.getArrowSize(b,!1,this.connLineStylesExt,this.connLineStyles)};f.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b, +a){this.processTheme();var d=b.getQuickStyleFontColor(),g=null;switch(b.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:g=a[b.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(d=100),g=b.getQuickStyleFontMatrix()-100,a!==this.fontColors?(g=this.baseColors,g=g.dk1?g.dk1:null):g=a[this.variantFontIdx[this.themeVariant][g]-1]}d=null!=g?g.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(d,this):this.getStyleColor(d);if(0< +(b.getQuickStyleVariation()&2))var d=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b),g=d.toHsl(),n=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b),c=n.toHsl(),d=g.getLum()<c.getLum()?d:n;return d};f.prototype.getFontColor=function(b,a){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals|| +null===b)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};f.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.fontColors)};f.prototype.getConnFontColor=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connFontColors)};f.prototype.getArrowType=function(b,a,d,g){d= +this.getLineStyleExt(b.getQuickStyleLineMatrix(),d);if(null!=d)return a?d.getStart():d.getEnd();b=this.getLineStyle(b.getQuickStyleLineMatrix(),g);return null!=b?a?b.getStart():b.getEnd():0};f.prototype.getEdgeMarker=function(b,a){return this.getArrowType(a,b,this.lineStylesExt,this.lineStyles)};f.prototype.getConnEdgeMarker=function(b,a){return this.getArrowType(a,b,this.connLineStylesExt,this.connLineStyles)};f.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList= +function(b,a){var d=this.getLineStyle(b.getQuickStyleLineMatrix(),a);return null!=d?d.getLineWidth():0};f.prototype.getLineWidth=function(b,a){if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof c.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(b); +throw Error("invalid overload");};f.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};f.prototype.getConnLineWidth=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};return f}();h.__static_initialized=!1;l.mxVsdxTheme=h;h.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io= +{}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(){}f.conversionFactor_$LI$=function(){null==f.conversionFactor&&(f.conversionFactor=f.screenCoordinatesPerCm*f.CENTIMETERS_PER_INCHES);return f.conversionFactor};f.getDirectChildNamedElements=function(b,a){for(var d=[],g=b.firstChild;null!=g;g=g.nextSibling){var n;if(n=null!=g&&1==g.nodeType){n=a;var c=g.nodeName;n=n&&n.equals?n.equals(c):n===c}n&&0<d.push(g)}return d};f.getDirectChildElements=function(b){var a=[];for(b= +b.firstChild;null!=b;b=b.nextSibling)null!=b&&1==b.nodeType&&0<a.push(b);return a};f.getDirectFirstChildElement=function(b){for(b=b.firstChild;null!=b;b=b.nextSibling)if(null!=b&&1==b.nodeType)return b;return null};f.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(b,a,d){try{var g=b.getAttribute(a);if(null!=g)return parseInt(g)}catch(n){}return d};f.getIntAttr=function(b,a,d){if((null==b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||"number"!==typeof d&&null!==d){if((null== +b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||void 0!==d)throw Error("invalid overload");return c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(b,a)}return c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,d)};f.getIntAttr$org_w3c_dom_Element$java_lang_String=function(b,a){return f.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,0)};f.getStyleString=function(b,a){for(var d="",g=function(a){var b=0;return{next:function(){return b< +a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){return Object.keys(a).map(function(b){return a[b]})}(b)),n=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(Object.keys(b));n.hasNext();){var c=n.next(),f=g.next();if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(c,mxConstants.STYLE_SHAPE)||!function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(b[c]?b[c]:null,"image")&&!function(a,b,d){void 0=== +d&&(d=0);return a.substr(d,b.length)===b}(b[c]?b[c]:null,"rounded="))try{d=d+c+a}catch(y){console.error("mxVsdxUtils.getStyleString,"+y+",style.length="+d.length+",key.length="+c.length+",asig.length="+a.length)}d=d+f+";"}return d};f.surroundByTags=function(b,a){return"<"+a+">"+b+"</"+a+">"};f.htmlEntities=function(b){return b.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};f.toInitialCapital= +function(b){b=b.split(" ");for(var a="",d=0;d<b.length;d++)var g=b[d],n=g.substring(0,1),g=g.substring(1),n=n.toUpperCase(),a=a+(n+g);return a.substring(0,a.length)};f.toSmallCaps=function(b,a){var d="",g=d;if(a&&a.equals?a.equals(g):a===g)d=b;else for(var g=b.split(""),n=0;n<g.length;n++){var c=g[n];(null==c.charCodeAt?c:c.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==c.charCodeAt?c:c.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(c=(new String(c)).toString(),c=c.toUpperCase(),d+='<font style="font-size:'+ +parseFloat(a)/1.28+'px">'+c+"</font>"):d+=c}return d};f.getStyleMap=function(b,a){for(var d={},g=b.split(";"),n=0;n<g.length;n++){var c=g[n],f=c.indexOf(a),h=c.substring(0,f),c=c.substring(f+1);d[h]=c}return d};f.isInsideTriangle=function(b,a,d,g,n,c,f,h){n-=d;c-=g;f-=d;h-=g;g=n*h-f*c;d=(b*(c-h)+a*(f-n)+n*h-f*c)/g;f=(b*h-a*f)/g;b=(a*n-b*c)/g;return 0<d&&1>d&&0<f&&1>f&&0<b&&1>b?!0:!1};return f}();h.screenCoordinatesPerCm=40;h.CENTIMETERS_PER_INCHES=2.54;l.mxVsdxUtils=h;h.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(q.vsdx|| +(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){var h=function(){function c(b,a,d,g){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];0<this.values.push(b);this.charIndices=[];0<this.charIndices.push(a);this.fields=[];0<this.fields.push(g);this.paraIndex=d}c.prototype.addText=function(b,a,d){0<this.values.push(b);0<this.charIndices.push(a);0<this.fields.push(d)};c.prototype.getParagraphIndex=function(){return this.paraIndex};c.prototype.getValue=function(b){return this.values[b]}; +c.prototype.numValues=function(){return this.values.length};c.prototype.getChar=function(b){return this.charIndices[b]};c.prototype.getField=function(b){return this.fields[b]};return c}();c.Paragraph=h;h.__class="com.mxgraph.io.vsdx.Paragraph"})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b){this.elem=b}f.prototype.getIndexedCell=function(b,a){for(var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),g=0;g<d.length;g++){var n=d[g],f=n.getAttribute("IX");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(f,b)||null==b)for(var n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n,"Cell"),h=0;h<n.length;h++){var y=n[h],f=y.getAttribute("N");if(function(a,b){return a&& +a.equals?a.equals(b):a===b}(f,a))return y}}return null};return f}();l.Section=h;h.__class="com.mxgraph.io.vsdx.Section"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){var h=function(){function c(b,a){this.pageNumber=0;this.pageNumber=b;this.Id=a}c.prototype.getId=function(){return this.Id};c.prototype.getPageNumber=function(){return this.pageNumber};c.prototype.equals=function(b){return null==b||this.constructor!==b.constructor||this.pageNumber!==b.pageNumber||this.Id!==b.Id?!1:!0};c.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return c}();c.ShapePageId=h;h.__class="com.mxgraph.io.vsdx.ShapePageId"})(c.vsdx|| +(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a,b,g){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=g}b.NONE_$LI$=function(){null==b.NONE&&(b.NONE=new b(-1,-1,-1));return b.NONE};b.prototype.getRed=function(){return this.red};b.prototype.setRed=function(a){this.red=a};b.prototype.getGreen=function(){return this.green};b.prototype.setGreen=function(a){this.green=a};b.prototype.getBlue=function(){return this.blue}; +b.prototype.setBlue=function(a){this.blue=a};b.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,g=this.getBlue()/255,n=Math.max(a,Math.max(b,g)),f=Math.min(a,Math.min(b,g)),h=(n+f)/2;if(n===f)a=f=0;else var y=n-f,f=.5<h?y/(2-n-f):y/(n+f),a=(n===a?(b-g)/y+(b<g?6:0):n===b?(g-a)/y+2:(a-b)/y+4)/6;return new c.mxgraph.io.vsdx.theme.HSLColor(a,f,h)};b.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,g=this.getBlue()/255,n=Math.max(a,Math.max(b,g)),f=Math.min(a, +Math.min(b,g)),h=n-f,a=n===f?0:(n===a?(b-g)/h+(b<g?6:0):n===b?(g-a)/h+2:(a-b)/h+4)/6;return new c.mxgraph.io.vsdx.theme.HSVColor(a,0===n?0:h/n,n)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16),a=1==a.length?"0"+a:a,b=this.green.toString(16),b=1==b.length?"0"+b:b,g=this.blue.toString(16),g=1==g.length?"0"+g:g;return"#"+a+b+g};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr= +function(a){this.gradientClr=a};return b}();h.Color=f;f.__class="com.mxgraph.io.vsdx.theme.Color"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){}b.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new c.mxgraph.io.vsdx.theme.SolidFillStyle(c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new c.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new c.mxgraph.io.vsdx.theme.GradFill(a)}return b};return b}();h.FillStyleFactory= +f;f.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a){this.color2=this.color1=null;a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=c.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length- +1]))));null==this.color1&&(this.color1=this.color2=new c.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}b.prototype.applyStyle=function(a,b){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b));return d};return b}();h.GradFill=f;f.__class="com.mxgraph.io.vsdx.theme.GradFill";f.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph= +{}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a,b,g){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=g}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,b,g){0>g&&(g+=1);1<g&&--g;return g<1/6? +a+6*(b-a)*g:.5>g?b:g<2/3?a+(b-a)*(2/3-g)*6:a};b.prototype.toRgb=function(){var a,b,g;g=this.hue;b=this.sat;a=this.lum;if(0===b)a=b=g=a;else{var n=.5>a?a*(1+b):a+b-a*b,f=2*a-n;a=this.hue2rgb(f,n,g+1/3);b=this.hue2rgb(f,n,g);g=this.hue2rgb(f,n,g-1/3)}return new c.mxgraph.io.vsdx.theme.Color(255*a|0,255*b|0,255*g|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*= +a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();h.HSLColor=f;f.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a,b,g){this.h=a;this.s=b;this.v=g}b.prototype.toRgb=function(){var a=6*this.h,b=this.s,g=Math.floor(a),n=a-g,a=this.v*(1-b),f=this.v*(1-n*b),b=this.v*(1-(1-n)*b),g=(g|0)%6;return new c.mxgraph.io.vsdx.theme.Color(255*[this.v,f,a,a,b,this.v][g]|0,255*[b,this.v,this.v,f,a,a][g]|0,255*[a,a,b,this.v,this.v,f][g]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*= +1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();h.HSVColor=f;f.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx= +{}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin= +this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var d=a.getAttribute("cap");if(null!=d)switch(d){case "rnd":this.lineCap=b.LineCapType.ROUND;break;case "sq":this.lineCap=b.LineCapType.SQUARE;break;case "flat":this.lineCap=b.LineCapType.FLAT}d= +a.getAttribute("cmpd");if(null!=d)switch(d){case "sng":this.lineComp=b.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=b.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=b.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=b.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=b.CompoundLineType.THIN_THICK_THIN_TRIPLE}for(var d=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),g=0;g<d.length;g++){var n=d[g];switch(n.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle= +c.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(n);break;case "a:prstDash":n=n.getAttribute("val");this.isLineDashed=!0;switch(n){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);break;case "lgDash":0<this.lineDashPattern.push(12);0<this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":0<this.lineDashPattern.push(8);0<this.lineDashPattern.push(4);0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4); +break;case "lgDashDot":0<this.lineDashPattern.push(12);0<this.lineDashPattern.push(4);0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":0<this.lineDashPattern.push(12),0<this.lineDashPattern.push(4),0<this.lineDashPattern.push(1),0<this.lineDashPattern.push(4),0<this.lineDashPattern.push(1),0<this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;for(var n=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n,"a:ds"), +f=0;f<n.length;f++){var h=n[f],y=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(h,"d"),h=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(h,"sp");0<this.lineDashPattern.push(y/1E4);0<this.lineDashPattern.push(h/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType= +this.getLineEndType(n);this.headEndWidth=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"w");this.headEndLen=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(n),this.tailEndWidth=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"w"),this.tailEndLen=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"len")}}}else if(void 0=== +a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload"); +}b.prototype.getLineEndType=function(a){var d=null;switch(a.getAttribute("type")){case "none":d=b.LineEndType.NONE;break;case "triangle":d=b.LineEndType.TRIANGLE;break;case "stealth":d=b.LineEndType.STEALTH;break;case "diamond":d=b.LineEndType.DIAMOND;break;case "oval":d=b.LineEndType.OVAL;break;case "arrow":d=b.LineEndType.ARROW}return d};b.prototype.getLineColor=function(a,b){return null!=this.fillStyle?this.fillStyle.applyStyle(a,b):b.getDefaultLineClr()};b.prototype.isDashed=function(){return this.isLineDashed}; +b.prototype.getLineDashPattern=function(){return this.lineDashPattern};b.prototype.getStartSize=function(){return 4};b.prototype.getEndSize=function(){return 4};b.prototype.getStart=function(){return 0};b.prototype.getEnd=function(){return 0};b.prototype.getLineWidth=function(){return this.lineWidth};return b}();h.LineStyle=f;f.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(b){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(b.LineCapType||(b.LineCapType={})); +(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(b.CompoundLineType||(b.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(b.LineEndType||(b.LineEndType={}))})(f=h.LineStyle||(h.LineStyle={}))})(l.theme||(l.theme={}))})(q.vsdx|| +(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a, +"startSize");this.end=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=c.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=c.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}b.prototype.getRndg=function(){return this.rndg};b.prototype.getStart=function(){return this.start};b.prototype.getStartSize= +function(){return this.startSize};b.prototype.getEnd=function(){return this.end};b.prototype.getEndSize=function(){return this.endSize};b.prototype.isDashed=function(){return 1<this.pattern};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};return b}();h.LineStyleExt=f;f.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){}b.prototype.applyStyle=function(a,b){return c.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return b}();h.NoFillStyle=f;f.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";f.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}b.prototype.calcColor= +function(a,b){if(this.hasEffects){var d=this.color.toHsv();0!==this.tint&&d.tint(this.tint);0!==this.shade&&d.shade(this.shade);0!==this.satMod&&d.satMod(this.satMod);0!==this.lumMod&&d.lumMod(this.lumMod);0!==this.hueMod&&d.hueMod(this.hueMod);this.color=d.toRgb()}};b.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,b){if(this.isDynamic||!this.isInitialized)this.calcColor(a,b),this.isInitialized=!0;return this.color};b.prototype.getColor=function(a,b){if("number"!==typeof a&&null!== +a||!(null!=b&&b instanceof c.mxgraph.io.vsdx.mxVsdxTheme||null===b)){if((null!=a&&a instanceof c.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===b)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};b.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};b.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};b.prototype.setShade= +function(a){this.shade=a;this.hasEffects=!0};b.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};b.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};b.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};b.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};b.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};b.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};b.prototype.setHue=function(a){this.hue=a;this.hasEffects= +!0};b.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};b.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};b.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};b.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};b.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};b.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};b.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};b.prototype.setLumMod=function(a){this.lumMod= +a;this.hasEffects=!0};b.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};b.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};b.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};b.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};b.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};b.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};b.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};b.prototype.setBlueOff= +function(a){this.blueOff=a;this.hasEffects=!0};b.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};b.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};b.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return b}();h.OoxmlColor=f;f.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(){function b(){}b.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new c.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new c.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new c.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")), +parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new c.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new c.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new c.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var g=0;g<a.length;g++){var n=a[g],f=parseInt(n.getAttribute("val"))/1E3|0;switch(n.nodeName){case "a:tint":b.setTint(f);break; +case "a:shade":b.setShade(f);break;case "a:satMod":b.setSatMod(f);break;case "a:lumMod":b.setLumMod(f);break;case "a:hueMod":b.setHueMod(f)}}return b};return b}();h.OoxmlColorFactory=f;f.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){(function(c){var f=function(){function b(a,b,g,c,f,h,y,p,l,q){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=g;this.quickStyleFontColor=c;this.quickStyleFontMatrix=f;this.quickStyleLineColor= +h;this.quickStyleLineMatrix=y;this.quickStyleShadowColor=p;this.quickStyleType=l;this.quickStyleVariation=q}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix}; +b.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};b.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};b.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};b.prototype.getQuickStyleType=function(){return this.quickStyleType};b.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};b.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};b.prototype.setQuickStyleFillColor= +function(a){this.quickStyleFillColor=a};b.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};b.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};b.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};b.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};b.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};b.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};b.prototype.setQuickStyleType= +function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();c.QuickStyleVals=f;f.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(c.theme||(c.theme={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){(function(c){(function(c){var f=function(){function b(a){this.color=null;this.color=a}b.prototype.applyStyle=function(a,b){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};return b}();c.SolidFillStyle=f;f.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";f.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(c.theme||(c.theme={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){var l=function(){function c(){}c.MAX_AREA_$LI$=function(){null==c.MAX_AREA&&(c.MAX_AREA=1E8);return c.MAX_AREA};return c}();l.MAX_REQUEST_SIZE=52428800;l.IMAGE_DOMAIN="http://img.diagramly.com/";c.Constants=l;l.__class="com.mxgraph.online.Constants"})(c.online||(c.online={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(c){(function(c){var l=function(){function c(){}c.getRotatedPoint=function(c,b,a,d){var g=c.x-d.x;c=c.y-d.y;return new mxPoint(g*b-c*a+d.x,c*b+g*a+d.y)};c.rotatedGeometry=function(c,b,a,d){b=b*Math.PI/180;var g=Math.cos(b);b=Math.sin(b);var n=c.getCenterX()-a,f=c.getCenterY()-d;c.x=Math.round(n*g-f*b+a-c.width/2);c.y=Math.round(f*g+n*b+d-c.height/2)};return c}();l.CHARSET_FOR_URL_ENCODING="ISO-8859-1";c.Utils=l;l.__class="com.mxgraph.online.Utils"})(c.online||(c.online={}))})(c.mxgraph|| +(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f){a=b.call(this,a,g,c)||this;a.a=f;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=b.getHeight(),g=b.getWidth(),f=Math.floor(Math.round(b.getLastX()*g)/100),h=Math.floor(Math.round(b.getLastY()*d)/100),p=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.a* +c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=Math.abs(p-f),h=Math.abs(l-h),f=h=.5*q+(f*f+h*h)/(8*q),u=Math.abs(h),h=Math.round(100*h/g*100)/100,f=Math.round(100*f/d*100)/100,p=Math.round(100*p/g*100)/100,l=Math.round(100*l/d*100)/100,q=Math.round(100*q)/100,h=Math.abs(h),f=Math.abs(f),d=0>q?"1":"0",q=u<Math.abs(q)?"1":"0";b.setLastX(p);b.setLastY(l);return'<arc rx="'+(new String(h)).toString()+'" ry="'+(new String(f)).toString()+'" x="'+(new String(p)).toString()+'" y="'+(new String(l)).toString()+ +'" x-axis-rotation="0" large-arc-flag="'+q+'" sweep-flag="'+d+'"/>'}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.ArcTo=f;f.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a){return b.call(this,a,null,null)||this}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.DelRow=f;f.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,y,p){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=y;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),g=b.getWidth(),f=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=d-h,p=this.a*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +l=this.b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.c*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),u=this.d*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=Math.abs(p-f),l=Math.abs(l-h),l=Math.sqrt(p*p+l*l),q=Math.abs(q-f),u=Math.abs(d-u-h),f=100*f/g,u=Math.round(100*Math.sqrt(q*q+u*u)/d/2*100)/100,g=Math.round(100*l/g/2*100)/100,q=Math.round(100*(f-2*g))/100,f=Math.round(100*(f+2*g))/100,d=Math.round(100*h/d*100)/100;return'<move x="'+(new String(q)).toString()+ +'" y="'+(new String(d)).toString()+'"/><arc rx="'+(new String(g)).toString()+'" ry="'+(new String(u)).toString()+'" x="'+(new String(f)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(g)).toString()+'" ry="'+(new String(u)).toString()+'" x="'+(new String(q)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.Ellipse= +f;f.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),g=b.getWidth(),f=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=d-h,p=this.a*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +l=this.b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.c,u=this.d,f=100*f/g,h=100*h/d,E=b.getLastX()*g/100,A=b.getLastY()*d/100,F=f*g/100,B=h*d/100,Z=d-l,K=-q,q=Math.sqrt(E*E+A*A)*Math.cos(Math.atan2(A,E)-K),l=Math.sqrt(E*E+A*A)*Math.sin(Math.atan2(A,E)-K),Y=Math.sqrt(F*F+B*B)*Math.cos(Math.atan2(B,F)-K),L=Math.sqrt(F*F+B*B)*Math.sin(Math.atan2(B,F)-K),fa=Math.sqrt(p*p+Z*Z)*Math.cos(Math.atan2(Z,p)-K),ka=Math.sqrt(p*p+Z*Z)*Math.sin(Math.atan2(Z,p)-K),ea=((q-Y)*(q+Y)*(L-ka)-(Y-fa)*(Y+ +fa)*(l-L)+u*u*(l-L)*(L-ka)*(l-ka))/(2*((q-Y)*(L-ka)-(Y-fa)*(l-L))),na=((q-Y)*(Y-fa)*(q-fa)/(u*u)+(Y-fa)*(l-L)*(l+L)-(q-Y)*(L-ka)*(L+ka))/(2*((Y-fa)*(l-L)-(q-Y)*(L-ka))),Ga=q-ea,Ia=l-na,Ga=Math.sqrt(Ga*Ga+Ia*Ia*u*u),u=Ga/u,K=180*K/Math.PI,f=Math.round(100*f)/100,h=Math.round(100*h)/100,Ga=Math.round(100*Ga/g*100)/100,u=Math.round(100*u/d*100)/100,K=Math.round(100*K)/100,d=0<(F-E)*(Z-A)-(B-A)*(p-E)?"0":"1",g="0";c.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ea,na,q,l,Y,L,fa,ka)&&this.isReflexAngle(ea, +na,q,l,Y,L,fa,ka)&&(g="1");b.setLastX(f);b.setLastY(h);return'<arc rx="'+(new String(Ga)).toString()+'" ry="'+(new String(u)).toString()+'" x="'+(new String(f)).toString()+'" y="'+(new String(h)).toString()+'" x-axis-rotation="'+(new String(K)).toString()+'" large-arc-flag="'+g+'" sweep-flag="'+d+'"/>'}return""};a.prototype.isReflexAngle=function(a,b,c,f,h,l,p,q){c-=a;f-=b;l-=b;h=p-a;q-=b;b=a=0;c=180*(Math.atan2(f,c)-Math.atan2(b,a))/Math.PI;h=180*(Math.atan2(l,h)-Math.atan2(b,a))/Math.PI;a=180*(Math.atan2(q, +p)-Math.atan2(b,a))/Math.PI;c=(c-a)%360;h=(h-a)%360;180<c?c-=360:-180>c&&(c+=360);180<h?h-=360:-180>h&&(h+=360);return(0<c&&0>h||0>c&&0<h)&&180<Math.abs(c-h)?!0:!1};return a}(c.mxgraph.io.vsdx.geometry.Row);h.EllipticalArcTo=f;f.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;return a}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.InfiniteLine=f;f.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c){return b.call(this,a,g,c)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,g=a.y,f=b.getHeight(),h=b.getWidth();null!=this.x&&null!=this.y&&(d=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());d=Math.round(100*d/h*100)/100;g=Math.round(100*(100-100*g/f))/100;a.x=d;a.y=g;b.setLastX(d);b.setLastY(g);return'<line x="'+ +(new String(d)).toString()+'" y="'+(new String(g)).toString()+'"/>'};return a}(c.mxgraph.io.vsdx.geometry.Row);h.LineTo=f;f.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c){return b.call(this,a,g,c)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,g=a.y,f=b.getHeight(),h=b.getWidth();null!=this.x&&null!=this.y&&(d=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());d=Math.round(100*d/h*100)/100;g=Math.round(100*(100-100*g/f))/100;a.x=d;a.y=g;b.setLastX(d);b.setLastY(g);b.setLastMoveX(d); +b.setLastMoveY(g);return'<move x="'+(new String(d)).toString()+'" y="'+(new String(g)).toString()+'"/>'};return a}(c.mxgraph.io.vsdx.geometry.Row);h.MoveTo=f;f.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p,q){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=l;a.d=p;a.formulaE=q;return a}__extends(a,b);a.prototype.handle=function(b,g){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var d=g.getHeight(),f=g.getWidth(),h=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.formulaE.split("NURBS(").join(""),p=p.split(")").join(""), +p=new a.Nurbs(this,p,f,d);if(2<=p.getSize()){var q=p.getX(0),u=p.getY(0),P=p.getX(1),E=p.getY(1),h=Math.round(100*h/f*100)/100,l=Math.round(100*(100-100*l/d))/100,q=Math.round(100*q)/100,u=Math.round(100*u)/100,P=Math.round(100*P)/100,E=Math.round(100*E)/100;g.setLastX(h);g.setLastY(l);if(3===p.getDegree()&&p.isOrderedByThree(this.getA())){d=[];f=[];q=[];P=p.getSize();for(u=0;u<P-1;u+=3)0<d.push(new mxPoint(p.getX(u),p.getY(u))),0<f.push(new mxPoint(p.getX(u+1),p.getY(u+1))),u<P-2?0<q.push(new mxPoint(p.getX(u+ +2),p.getY(u+2))):0<q.push(new mxPoint(h,l));h="";for(u=0;u<d.length;u++)h+='<curve x1="'+d[u].x+'" y1="'+d[u].y+'" x2="'+f[u].x+'" y2="'+f[u].y+'" x3="'+q[u].x+'" y3="'+q[u].y+'"/>\n';return h}return'<curve x1="'+(new String(q)).toString()+'" y1="'+(new String(u)).toString()+'" x2="'+(new String(P)).toString()+'" y2="'+(new String(E)).toString()+'" x3="'+(new String(h)).toString()+'" y3="'+(new String(l)).toString()+'"/>'}}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.NURBSTo=f;f.__class= +"com.mxgraph.io.vsdx.geometry.NURBSTo";(function(b){var a=function(){function a(a,b,d,c){this.__parent=a;this.nurbsValues=[];a=b.split(/\s*,\s*/).slice(0);for(b=0;b<a.length;b++)3<b&&0===b%4?0<this.nurbsValues.push(100*parseFloat(a[b])):3<b&&1===b%4?0<this.nurbsValues.push(100-100*parseFloat(a[b])):0<this.nurbsValues.push(parseFloat(a[b]))}a.prototype.isOrderedByThree=function(a){for(var b=0;b+2<this.getSize();b+=3){var d=Math.round(100*this.getKnot(b))/100,g=Math.round(100*this.getKnot(b+1))/100, +c=Math.round(100*this.getKnot(b+2))/100;if(d!==g||d!==c||g!==c)return!1}b=Math.round(10*this.getKnot(this.getSize()-2))/10;d=Math.round(10*this.getKnot(this.getSize()-1))/10;a=Math.round(10*a)/10;return b!==d||b!==a||d!==a?!1:!0};a.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};a.prototype.getKnotLast=function(){return this.nurbsValues[0]};a.prototype.getDegree=function(){return this.nurbsValues[1]};a.prototype.getXType=function(){return this.nurbsValues[2]};a.prototype.getYType= +function(){return this.nurbsValues[3]};a.prototype.getX=function(a){return this.nurbsValues[4*(a+1)]};a.prototype.getY=function(a){return this.nurbsValues[4*(a+1)+1]};a.prototype.getKnot=function(a){return this.nurbsValues[4*(a+1)+2]};a.prototype.getWeight=function(a){return this.nurbsValues[4*(a+1)+3]};return a}();b.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(f=h.NURBSTo||(h.NURBSTo={}))})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph= +{}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f){a=b.call(this,a,g,c)||this;a.formulaA=f;return a}__extends(a,b);a.prototype.handle=function(a,b){var d="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var g=b.getHeight(),f=b.getWidth(),h=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),h=Math.round(100*h/f*100)/100,p=Math.round(100*(100-100*p/g))/100,l=this.formulaA.replace(RegExp("\\s", +"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),""),q;q=l&&l.equals?l.equals("inh"):"inh"===l;if(q)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});l=l.split(",").slice(0).slice(0);q=parseFloat(l.splice(0,1));parseFloat(l.splice(0,1));for(var u,E;0<l.length;)u=parseFloat(l.splice(0,1))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +E=parseFloat(l.splice(0,1))*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===q&&(u=100*u/f),1===q&&(E=100*E/g),E=100-E,u=Math.round(100*u)/100,E=Math.round(100*E)/100,b.setLastX(u),b.setLastY(E),d+='<line x="'+(new String(u)).toString()+'" y="'+(new String(E)).toString()+'"/>';d+='<line x="'+(new String(h)).toString()+'" y="'+(new String(p)).toString()+'"/>';b.getLastMoveX()===h&&b.getLastMoveY()===p&&(d+="<close/>")}return d};return a}(c.mxgraph.io.vsdx.geometry.Row);h.PolylineTo=f;f.__class= +"com.mxgraph.io.vsdx.geometry.PolylineTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=100*this.x,g=100-100*this.y,c=100*this.a,f=100-100*this.b,h=100*this.c,l=100-100*this.d,d=Math.round(100*d)/100,g=Math.round(100*g)/100,c=Math.round(100*c)/100,f=Math.round(100*f)/100,h=Math.round(100* +h)/100,l=Math.round(100*l)/100;b.setLastX(d);b.setLastY(g);return'<curve x1="'+(new String(c)).toString()+'" y1="'+(new String(f)).toString()+'" x2="'+(new String(h)).toString()+'" y2="'+(new String(l)).toString()+'" x3="'+(new String(d)).toString()+'" y3="'+(new String(g)).toString()+'"/>'}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.RelCubBezTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph= +{}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c){return b.call(this,a,g,c)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,g=a.y;null!=this.x&&null!=this.y&&(d=100*this.x,g=100-100*this.y);d=Math.round(100*d)/100;g=Math.round(100*g)/100;a.x=d;a.y=g;b.setLastX(d);b.setLastY(g);return'<line x="'+(new String(d)).toString()+'" y="'+(new String(g)).toString()+'"/>'};return a}(c.mxgraph.io.vsdx.geometry.Row);h.RelLineTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(l.geometry|| +(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c){return b.call(this,a,g,c)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,g=a.y;null!=this.x&&null!=this.y&&(d=100*this.x,g=100-100*this.y);d=Math.round(100*d)/100;g=Math.round(100*g)/100;a.x=d;a.y=g;b.setLastX(d);b.setLastY(g);b.setLastMoveX(d);b.setLastMoveY(g);return'<move x="'+(new String(d)).toString()+'" y="'+(new String(g)).toString()+'"/>'};return a}(c.mxgraph.io.vsdx.geometry.Row); +h.RelMoveTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){var d=100*this.x,g=100-100*this.y,c=100*this.a,f=100-100*this.b,d=Math.round(100*d)/100,g=Math.round(100*g)/100,c=Math.round(100*c)/100,f=Math.round(100*f)/100;b.setLastX(d);b.setLastY(g);return'<quad x1="'+(new String(c)).toString()+'" y1="'+ +(new String(f)).toString()+'" x2="'+(new String(d)).toString()+'" y2="'+(new String(g)).toString()+'"/>'}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.RelQuadBezTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f){a=b.call(this,a,g,c)||this;a.a=f;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),d=Math.round(100*d)/100,g=Math.round(100*(100-g))/100;b.setLastX(d);b.setLastY(g)}return""};return a}(c.mxgraph.io.vsdx.geometry.Row); +h.SplineKnot=f;f.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p){a=b.call(this,a,g,c)||this;a.a=f;a.b=h;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b.getHeight();b.getWidth();var d=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b.setLastKnot(this.c);d=Math.round(100*d)/ +100;g=Math.round(100*(100-g))/100;b.getLastX();b.getLastY();b.setLastX(d);b.setLastY(g);return"<curve "}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);h.SplineStart=f;f.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(){function f(b,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=b;this.pm=a.getPropertiesManager();var d=b.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=d&&0!==d.length?parseFloat(d):-1}catch(g){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}f.__static_initialize=function(){f.__static_initialized||(f.__static_initialized=!0,f.__static_initializer_0(), +f.__static_initializer_1())};f.styleTypes_$LI$=function(){f.__static_initialize();null==f.styleTypes&&(f.styleTypes={});return f.styleTypes};f.__static_initializer_0=function(){f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE; +f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN]=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]= +c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$().QuickStyleFillColor=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$().QuickStyleFillMatrix=c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN]= +c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$().QuickStyleLineColor=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$().QuickStyleLineMatrix= +c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE]=c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE; +f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH]=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$()[c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER]= +c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$().QuickStyleFontColor=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;f.styleTypes_$LI$().QuickStyleFontMatrix=c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};f.prototype.getTheme=function(){return null};f.prototype.getQuickStyleVals=function(){return null};f.prototype.isVertex=function(){return!1};f.prototype.styleDebug=function(b){f.vsdxStyleDebug&&console.info(b)};f.prototype.stylesheetRefs=function(b){this.styleParents[c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]= +b.getStylesheet(this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=b.getStylesheet(this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=b.getStylesheet(this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=b.getStylesheet("0")};f.prototype.cacheCells=function(b){if(null!=this.shape){var a=this.shape.childNodes; +if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,b),a=a.nextSibling}};f.prototype.parseShapeElem=function(b,a){var d=b.nodeName;(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"Cell")?this.cellElements[b.getAttribute("N")]=b:function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Section")&&this.parseSection(b)};f.prototype.parseSection=function(b){var a=new c.mxgraph.io.vsdx.Section(b);this.sections[b.getAttribute("N")]=a};f.prototype.hasProperty=function(b, +a){return this.cellElements.hasOwnProperty(a)};f.prototype.getValue=function(b,a){return null!=b?b.getAttribute("V")||"":a};f.prototype.getValueAsDouble=function(b,a){if(null!=b){var d=b.getAttribute("V");if(null!=d){if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Themed"))return 0;try{var g=parseFloat(d);(function(a,b){return a&&a.equals?a.equals(b):a===b})(b.getAttribute("U"),"PT")&&(g*=c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*g)/100}catch(n){console.error(n.message, +n)}}}return a};f.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=function(b,a){if(null!=b){var d=b.getAttribute("V");if(null!=d)try{var g=parseFloat(d);return this.getScreenNumericalValue$double(g)}catch(n){console.error(n.message,n)}}return a};f.prototype.getScreenNumericalValue=function(b,a){if((null==b||1!=b.nodeType)&&null!==b||"number"!==typeof a&&null!==a){if("number"!==typeof b&&null!==b||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(b)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(b, +a)};f.prototype.getScreenNumericalValue$double=function(b){return b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};f.prototype.getAttribute=function(b,a,d){var g=this.cellElements;b=g[b]?g[b]:null;null!=b&&(d=b.getAttribute(a)||"");return d};f.prototype.getChildValues=function(b,a){for(var d={},g=b.firstChild;null!=g;){if(null!=g&&1==g.nodeType){var c=g,f,h;((f=c.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f)?(f=c.getAttribute("N")||"",h=c.getAttribute("V")||""):(f=c.nodeName,h=c.textContent); +if(null!=a){var l=a[f]?a[f]:null;null!=l&&(h=c.getAttribute(l)||"")}d[f]=h}g=g.nextSibling}return d};f.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(b,a,d){var g=function(a,b){return a[b]?a[b]:null}(this.sections,d),n=null,h=!1;null!=g&&(n=g.getIndexedCell(a,b));if(null!=n){var g=n.getAttribute("F"),l=n.getAttribute("V");if(null!=g&&null!=l)if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"Inh")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(l, +"Themed"))h=!0;else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"THEMEVAL()")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(l,"Themed")&&null!=this.style){if(function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR,b))return n;g=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,d);if(null!=g)return g}}if(null==n||h)if(h=function(a,b){return a[b]?a[b]:null}(f.styleTypes_$LI$(),d),h=function(a,b){return a[b]?a[b]: +null}(this.styleParents,h),null!=h&&(b=h.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,d),null!=b))return b;return n};f.prototype.getCellElement=function(b,a,d){if("string"!==typeof b&&null!==b||"string"!==typeof a&&null!==a||"string"!==typeof d&&null!==d){if("string"!==typeof b&&null!==b||void 0!==a||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(b)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,d)}; +f.prototype.getCellElement$java_lang_String=function(b){var a=function(a,b){return a[b]?a[b]:null}(this.cellElements,b),d=!1;if(null!=a){var g=a.getAttribute("F"),n=a.getAttribute("V");if(null!=g&&null!=n)if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"Inh")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Themed"))d=!0;else if(-1!=g.indexOf("THEMEVAL()")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Themed")&&null!=this.style){if(function(a,b){return a&&a.equals?a.equals(b): +a===b}("FillForegnd",b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW, +b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,b)||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,b))return a;g=this.style.getCellElement$java_lang_String(b);if(null!=g)return g}}if(null==a||d)if(d=function(a,b){return a[b]?a[b]:null}(f.styleTypes_$LI$(),b),d=function(a,b){return a[b]?a[b]:null}(this.styleParents,d),null!=d&&(b=d.getCellElement$java_lang_String(b),null!=b))return b;return a};f.prototype.getStrokeColor= +function(){var b="";(function(a,b){return a&&a.equals?a.equals(b):a===b})(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"1"),"0")?b="none":(b=this.getColor(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,b){return a&&a.equals?a.equals(b):a===b}("Themed",b)&&(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineColor(this.getQuickStyleVals())).toHexStr(): +""));return b};f.prototype.getFillColor=function(){if(function(a,b){return a&&a.equals?a.equals(b):a===b}("1",this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var b=function(a,b){return a[b]?a[b]:null}(this.sections,"FillGradient");if(null!=b&&(b=this.getColor(b.getIndexedCell("0","GradientStopColor")),null!=b&&0!==b.length))return b}b=this.getColor(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND)); +(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",b)&&(b=this.getTheme(),null!=b?(b=b.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),b=b.toHexStr()):b="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");return null!=a&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")?"none":b};f.prototype.getColor=function(b){b=this.getValue(b,"");(function(a,b){return a&&a.equals?a.equals(b): +a===b})("Themed",b)||function(a,b,g){void 0===g&&(g=0);return a.substr(g,b.length)===b}(b,"#")||(b=this.pm.getColor(b));return b};f.prototype.getTextBkgndColor=function(b){b=this.getValue(b,"");return function(a,b,g){void 0===g&&(g=0);return a.substr(g,b.length)===b}(b,"#")?b:function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"255")||0===b.length?"none":this.pm.getColor((new String(parseInt(b)-1)).toString())};f.prototype.getLineWeight= +function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};f.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),0)};f.prototype.getNameU=function(){return this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};f.prototype.getName=function(){return this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME)|| +""};f.prototype.getUniqueID=function(){return this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};f.prototype.getId=function(){return this.Id};f.prototype.getTextColor=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=this.getValue(b,"#000000");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",b)?(b=this.getTheme(),b=null!=b?(this.isVertex()? +b.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,b,g){void 0===g&&(g=0);return a.substr(g,b.length)===b}(b,"#")||(b=this.pm.getColor(b));return b};f.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),0)};f.prototype.getTextBottomMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN), +0)};f.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};f.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),0)};f.prototype.getTextStyle=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.STYLE, +b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};f.prototype.getTextFont=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FONT,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};f.prototype.getTextPos=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.POS,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b, +"")};f.prototype.getTextStrike=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=(b=this.getValue(b,""))&&b.equals?b.equals("1"):"1"===b;return b};f.prototype.getTextCase=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.CASE,b,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};f.prototype.getHorizontalAlign= +function(b,a){var d;d=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(d,"")){case "0":d=a?"left":mxConstants.ALIGN_LEFT;break;case "2":d=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":d=a?"justify":mxConstants.ALIGN_CENTER;break;default:d=a?"center":mxConstants.ALIGN_CENTER}return d};f.prototype.getIndentFirst=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST, +b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};f.prototype.getIndentLeft=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};f.prototype.getIndentRight=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT, +b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};f.prototype.getSpBefore=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};f.prototype.getSpAfter=function(b){b= +this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};f.prototype.getSpLine=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);b=this.getValue(b,"");var a;a=b&& +b.equals?b.equals(""):""===b;return a?0:parseFloat(b)};f.prototype.getFlags=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};f.prototype.getLetterSpace=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b, +0))).toString()};f.prototype.getBullet=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BULLET,b,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};f.prototype.getShape=function(){return this.shape};f.prototype.setShape=function(b){this.shape=b};f.lineDashPatterns_$LI$=function(){f.__static_initialize();null==f.lineDashPatterns&&(f.lineDashPatterns=[]);return f.lineDashPatterns};f.__static_initializer_1=function(){0< +f.lineDashPatterns_$LI$().push([]);0<f.lineDashPatterns_$LI$().push([]);0<f.lineDashPatterns_$LI$().push([]);var b=[];0<b.push(f.DOT);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DASH);0<b.push(f.SPACE);0<b.push(f.DOT);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DASH);0<b.push(f.SPACE);0<b.push(f.DOT);0<b.push(f.SPACE);0<b.push(f.DOT);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DASH);0<b.push(f.SPACE);0<b.push(f.DASH);0< +b.push(f.SPACE);0<b.push(f.DOT);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DOT);0<b.push(f.SHORT_SPACE); +0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.DOT);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.DOT);0<b.push(f.SHORT_SPACE);0<b.push(f.DOT);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.DOT);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b); +b=[];0<b.push(f.DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<b.push(f.SHORT_DASH);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE); +0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.LONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DOT);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.XLONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DASH);0<b.push(f.LONG_SPACE);0< +f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.XLONG_DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DASH);0<b.push(f.LONG_SPACE);0<b.push(f.DASH);0<b.push(f.LONG_SPACE);0<f.lineDashPatterns_$LI$().push(b);b=[];0<b.push(f.XSHORT_DASH);0<b.push(f.SHORT_SPACE);0<f.lineDashPatterns_$LI$().push(b)};f.getLineDashPattern=function(b){return 0<=b&&23>=b?f.lineDashPatterns_$LI$()[b]:f.lineDashPatterns_$LI$()[0]};return f}();h.__static_initialized=!1;h.vsdxStyleDebug=!1;h.SPACE=4;h.SHORT_SPACE=2;h.LONG_SPACE=6; +h.DOT=1;h.DASH=8;h.LONG_DASH=12;h.SHORT_DASH=4;h.XLONG_DASH=20;h.XSHORT_DASH=2;l.Style=h;h.__class="com.mxgraph.io.vsdx.Style"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,f){var d=b.call(this)||this;d.__com_mxgraph_io_vsdx_theme_HslClr_hue=a/360;d.__com_mxgraph_io_vsdx_theme_HslClr_sat=g/100;d.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;d.color=(new c.mxgraph.io.vsdx.theme.HSLColor(a,g,f)).toRgb();return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.HslClr=f;f.__class="com.mxgraph.io.vsdx.theme.HslClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io|| +(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a){var d=b.call(this)||this;d.val=a;d.color=new c.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.PrstClr=f;f.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a){var d=b.call(this)||this;d.isDynamic=!0;d.val=a;return d}__extends(a,b);a.prototype.calcColor=function(a,g){var d;d=this.val;d="phClr".equals?"phClr".equals(d):"phClr"===d;d?this.color=g.getStyleColor(a):(this.color=g.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,a,g)};return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.SchemeClr=f;f.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(l.theme|| +(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,f){var d=b.call(this)||this;d.r=0;d.g=0;d.b=0;d.r=a;d.g=g;d.b=f;d.color=new c.mxgraph.io.vsdx.theme.Color(a,g,f);return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.ScrgbClr=f;f.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a){var d=b.call(this)||this;d.hexVal=null;d.hexVal=a;d.color=c.mxgraph.io.vsdx.theme.Color.decodeColorHex(a);return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.SrgbClr=f;f.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g){var d=b.call(this)||this;d.lastClr=null;d.val=a;var f=d.lastClr=g;if(null==f)switch(a){case "windowText":f="000000";break;case "window":f="FFFFFF";break;default:f="FFFFFF"}d.color=c.mxgraph.io.vsdx.theme.Color.decodeColorHex(f);return d}__extends(a,b);return a}(c.mxgraph.io.vsdx.theme.OoxmlColor);h.SysClr=f;f.__class="com.mxgraph.io.vsdx.theme.SysClr"})(l.theme||(l.theme={}))})(q.vsdx||(q.vsdx={}))})(u.io|| +(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){(function(h){var f=function(b){function a(a,g,c,f,h,l,p){return b.call(this,a,g,c,f,h,l,p)||this}__extends(a,b);a.prototype.handle=function(a,g){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=g.getHeight()/c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=g.getWidth()/c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=f;this.y*=d;this.a*=f;this.b*=d}return b.prototype.handle.call(this, +a,g)};return a}(c.mxgraph.io.vsdx.geometry.EllipticalArcTo);h.RelEllipticalArcTo=f;f.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(l.geometry||(l.geometry={}))})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(f){function b(a,b){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=f.call(this,a,b)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(a, +b){return a[b]?a[b]:null}(d.cellElements,c.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(a,b){return a[b]?a[b]:null}(d.cellElements,c.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(b,f);b.UNICODE_LINE_SEP_$LI$=function(){null==b.UNICODE_LINE_SEP&&(b.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==", +b.UNICODE_LINE_SEP=String.fromCharCode(8232));return b.UNICODE_LINE_SEP};b.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};b.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};b.prototype.getQuickStyleVals=function(){return this.quickStyleVals};b.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new c.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]); +this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){f.prototype.parseShapeElem.call(this,a,d);var g=a.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"ForeignData")){var n=a.ownerDocument.vsdxFileName,h=a.getAttribute("ForeignType"),g=a.getAttribute("CompressionType")||"";if(function(a,b){return a&&a.equals?a.equals(b):a===b}(h,"Bitmap"))g=g.toLowerCase();else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(h,"MetaFile"))g="x-wmf";else if(function(a,b){return a&& +a.equals?a.equals(b):a===b}(h,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(h,"EnhMetaFile"))g="x-emf";else return;h=a.firstChild;if(null!=h){if(null!=h&&1==h.nodeType){var l=h;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(l.nodeName.toLowerCase(),"rel")&&(l=l.getAttribute("r:id"),null!=l&&0!==l.length)){var h=n.lastIndexOf("/"),y="",p="";try{y=n.substring(0,h),p=n.substring(h,n.length)}catch(z){return}h=d.getRelationship(l,y+"/_rels"+p+".rels");if(null!=h){n= +h.getAttribute("Target")||"";l=h.getAttribute("Type");h=n.lastIndexOf("/");try{n=n.substring(h+1,n.length)}catch(z){return}null!=l&&function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(l,"image")&&(this.imageData={},(h=d.getMedia(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+n))?(this.imageData.iData=h,function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(n.toLowerCase(),".bmp")?g="jpg":function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!== +c&&c===d}(n.toLowerCase(),".emf")&&(g=function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(h,"iVBORw0K")?"png":function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(h,"/9j/")?"jpg":g),this.imageData.iType=g):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}return}}h=h.nextSibling}}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(g,c.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=a)};b.prototype.parseSection=function(a){var d=a.getAttribute("N"); +if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Geometry"))null==this.geom&&(this.geom=[]),0<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var g=0;g<a.length;g++){var d=a[g],n=d.getAttribute("IX")||"";if(0!==n.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[n]="";else{for(var h=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d, +"Cell"),l="",y="",p=0;p<h.length;p++){var q=h[p],d=q.getAttribute("N"),q=q.getAttribute("V");switch(d){case "Value":l=q;break;case "Format":y=q}}if(0!==l.length){try{(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(y,"{{")&&(l=(new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(l)))).toString())}catch(W){}this.fields[n]=l}}}}else f.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText= +function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)}; +b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.textToList=function(a,b){if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"")){var d=this.getBullet(b);if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"0")){var f=a.split("\n");f[f.length-1]||f.pop();for(var h="",l=0;l<f.length;l++)h+=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(f[l],"li");h=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(h,"ul");f={};(function(a,b){return a&&a.equals? +a.equals(b):a===b})(d,"4")?f["list-style-type"]="square":f["list-style-type"]="disc";return h=this.insertAttributes(h,f)}}return a};b.prototype.getTextParagraphFormated=function(a){var b="",c={};c.align=this.getHorizontalAlign(this.pp,!0);c["margin-left"]=this.getIndentLeft(this.pp);c["margin-right"]=this.getIndentRight(this.pp);c["margin-top"]=this.getSpBefore(this.pp)+"px";c["margin-bottom"]=this.getSpAfter(this.pp)+"px";c["text-indent"]=this.getIndentFirst(this.pp);c.valign=this.getAlignVertical(); +c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",g="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",h="direction:"+this.getRtlText(this.cp)+";",l="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",y="line-height:"+this.getSpcLine(this.pp),p=";opacity:"+this.getTextOpacity(this.cp),q=this.getTextPos(this.cp), +u=this.getTextCase(this.cp);(function(a,b){return a&&a.equals?a.equals(b):a===b})(u,"1")?a=a.toUpperCase():function(a,b){return a&&a.equals?a.equals(b):a===b}(u,"2")&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(a,b){return a&&a.equals?a.equals(b):a===b})(q,"1")?a=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(a,b){return a&&a.equals?a.equals(b):a===b}(q,"2")&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a, +"b"):a;a=this.isItalic(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"i"):a;a=this.isUnderline(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return""+('<font style="'+g+f+b+h+l+y+p+'">'+a+"</font>")};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(a,b){return a&&a.equals? +a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d),d=a.substring(0, +d),h=' style="'+c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return d+h+f}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var b= +!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};b.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};b.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a); +(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};b.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS, +a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.floor(Math.round(100*a)/100)};b.prototype.getAlignVertical=function(){var a= +mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot= +function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};return b}(c.mxgraph.io.vsdx.Style);h.VSDX_START_TIME=-22091688E5;l.Shape=h;h.__class="com.mxgraph.io.vsdx.Shape"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){(function(l){var h=function(f){function b(a,b,g,n,h,l){var d=this;d.masterShape=null;d.master=null;d.parentHeight=0;d=f.call(this,b,l)||this;d.htmlLabels=!0;d.rootShape=d;d.shapeName=null;d.shapeIndex=0;d.vertex=!0;d.childShapes={};var p=d.getMasterId(),C=d.getShapeMasterId();d.master=null!=p?n[p]?n[p]:null:h;null!=d.master&&(d.masterShape=null==p&&null!=C?d.master.getSubShape(C):d.master.getMasterShape());n=d.getNameU();h=n.lastIndexOf(".");-1!==h&&(n=n.substring(0, +h));d.shapeName=n;b=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),d.childShapes=a.parseShapes(b,d.master,!1));b=d.calcRotation();d.rotation=100*b/100;d.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(d.getValue(d.getCellElement$java_lang_String("ThemeIndex"),"0")));l=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key=== +b)return a.entries[d].value;return null}(l.getThemes(),b);a=a.getCellIntValue("VariationColorIndex",0);d.setThemeAndVariant(l,a);b=function(a){null==a.entries&&(a.entries=[]);return a.entries}(d.childShapes);for(n=0;n<b.length;n++)h=b[n].getValue(),h.setRootShape(d),null==h.theme&&h.setThemeAndVariant(l,a);d.quickStyleVals=new c.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillColor"), +"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleShadowColor"), +"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=d.masterShape?(d.masterShape.processGeomList(null),d.processGeomList(d.masterShape.getGeomList()),0===d.width&&(d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===d.height&&(d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT), +0))):d.processGeomList(null);d.vertex=g||null!=d.childShapes&&!function(a){null==a.entries&&(a.entries=[]);return 0==a.entries.length}(d.childShapes)||null!=d.geomList&&(!d.geomList.isNoFill()||1<d.geomList.getGeoCount());return d}__extends(b,f);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())};b.OFFSET_ARRAY_$LI$=function(){b.__static_initialize();null==b.OFFSET_ARRAY&&(b.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0)); +return b.OFFSET_ARRAY};b.arrowSizes_$LI$=function(){b.__static_initialize();null==b.arrowSizes&&(b.arrowSizes=[2,3,5,7,9,22,45]);return b.arrowSizes};b.arrowTypes_$LI$=function(){b.__static_initialize();return b.arrowTypes};b.__static_initializer_0=function(){b.arrowTypes={};(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c, +getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&& +(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),2,"blockThin");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,c){null== +a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value= +c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK); +(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),14,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)|| +a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),17,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(), +20,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),22,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),23,"dash");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),24,"ERone");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),25,"ERmandOne");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),27,"ERmany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d< +a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),9,"openAsync");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),11,"diamond");(function(a,b,c){null==a.entries&&(a.entries= +[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),15,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),16,b.ARROW_NO_FILL_MARKER+ +mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),18,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&& +a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),19,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),21,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d< +a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),31,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),32,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),33,b.ARROW_NO_FILL_MARKER+ +mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),34,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&& +a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(), +36,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)|| +a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(), +39,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),40,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&& +a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),41,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key}, +getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d< +a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b, +value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){b.__static_initialize();null==b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};b.prototype.getShapeNode=function(a){var b;b=this.cellElements;b=b[a]?b[a]:null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a): +b};b.prototype.getTextLabel=function(){var a;a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");a="1".equals?"1".equals(a):"1"===a;if(a)return null;a=this.getTextChildren();null==a&&null!=this.masterShape&&(a=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=a)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),this.getHtmlTextContent(a)}else return a= +this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};b.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};b.prototype.initLabels=function(a){this.paragraphs={};for(var b=null,g=null,f=null,h=0;h<a.length;h++){var l;l=a.item(h);switch(l.nodeName){case "cp":b=this.getIndex(l);break;case "tp":this.getIndex(l);break;case "pp":g=this.getIndex(l);break;case "fld":f=this.getIndex(l);break;case "#text":l=l.textContent;var q;q=this.paragraphs; +q=q[g]?q[g]:null;null==q?(q=new c.mxgraph.io.vsdx.Paragraph(l,b,g,f),this.paragraphs[g]=q):q.addText(l,b,f)}}};b.prototype.createHybridLabel=function(a){var b=function(a,b){return a[b]?a[b]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]= +this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);this.styleMap.fontFamily=this.getTextFont(a);var c=this.isBold(a)?mxConstants.FONT_BOLD:0,c=c|(this.isItalic(a)?mxConstants.FONT_ITALIC:0),c=c|(this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0);this.styleMap.fontStyle=(new String(c)).toString();a=b.numValues();for(var c=null,f=0;f<a;f++){var h=b.getValue(f);if(0===h.length&& +null!=this.fields){var l=b.getField(f);null!=l&&(h=function(a,b){return a[b]?a[b]:null}(this.fields,l),null==h&&null!=this.masterShape&&null!=this.masterShape.fields&&(h=function(a,b){return a[b]?a[b]:null}(this.masterShape.fields,l)))}null!=h&&(c=null==c?h:c+h)}return c};b.prototype.getHtmlTextContent=function(a){var b="",f=!0;if(null!=a&&0<a.length)for(var n=0;n<a.length;n++){var h=a.item(n);(function(a,b){return a&&a.equals?a.equals(b):a===b})(h.nodeName,"cp")?this.cp=this.getIndex(h):function(a, +b){return a&&a.equals?a.equals(b):a===b}(h.nodeName,"tp")?this.tp=this.getIndex(h):function(a,b){return a&&a.equals?a.equals(b):a===b}(h.nodeName,"pp")?(this.pp=this.getIndex(h),f?f=!1:b+="</p>",b+=this.getTextParagraphFormated("<p>")):function(a,b){return a&&a.equals?a.equals(b):a===b}(h.nodeName,"fld")?(this.fld=this.getIndex(h),h=null,null!=this.fields&&(h=function(a,b){return a[b]?a[b]:null}(this.fields,this.fld)),null==h&&null!=this.masterShape&&null!=this.masterShape.fields&&(h=function(a,b){return a[b]? +a[b]:null}(this.masterShape.fields,this.fld)),null!=h&&(b+=this.processLblTxt(h))):function(a,b){return a&&a.equals?a.equals(b):a===b}(h.nodeName,"#text")&&(h=h.textContent,b+=this.processLblTxt(h))}b+=f?"":"</p>";c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(b,"div");return b};b.prototype.processLblTxt=function(a){a=c.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(a);a=this.textToList(a,this.pp);a=a.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(c.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$(),"g"), +"<br/>");return this.getTextCharFormated(a)};b.prototype.isConnectorBigNameU=function(a){return function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree single")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"45 degree single")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"45 degree double")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree double")||function(a,b,c){void 0===c&&(c=0);return a.substr(c, +b.length)===b}(a,"45 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"45 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Flexi-arrow 2")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Flexi-arrow 1")||function(a,b,c){void 0=== +c&&(c=0);return a.substr(c,b.length)===b}(a,"Flexi-arrow 3")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Double flexi-arrow")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Fancy arrow")};b.prototype.isVertex=function(){return this.vertex};b.prototype.getOriginPoint=function(a,b){var d=this.getPinX(),f=this.getPinY(),h=this.getLocPinY(),l=this.getLocPinX(),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.WIDTH), +0),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0),d=d-l,f=a-(f+(p-h));return!b||h===p/2&&l===q/2||0===this.rotation?new mxPoint(d,f):(l=q/2-l,h-=p/2,p=Math.cos((360-this.rotation)*Math.PI/180),q=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(d+l-(l*p-h*q),l*q+h*p+f-h))};b.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.WIDTH), +0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};b.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),0)};b.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};b.prototype.getLocPinX= +function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};b.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};b.prototype.getOpacity=function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};b.prototype.getGradient=function(){if(function(a, +b){return a&&a.equals?a.equals(b):a===b}("1",this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(a,b){return a[b]?a[b]:null}(this.sections,"FillGradient");if(null!=a){var b=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,"Row"),a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN), +"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};b.prototype.getGradientDirection=function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(b,"25")?a=mxConstants.DIRECTION_EAST:function(a,b){return a&& +a.equals?a.equals(b):a===b}(b,"27")?a=mxConstants.DIRECTION_WEST:function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};b.prototype.calcRotation=function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0")),a=180*a/Math.PI;return 360-a%360*100/100};b.prototype.propagateRotation=function(a){this.rotation+= +a;this.rotation%=360;this.rotation=100*this.rotation/100};b.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};b.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};b.prototype.getLeftSpacing=function(){return 100*(this.getTextLeftMargin()/2-2.8)/100};b.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};b.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),f=parseFloat(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE), +"0")),f=180*f/Math.PI,f=f-b;45>Math.abs(f)||270<Math.abs(f)||(a=!1);return a};b.prototype.getStyleFromShape=function(){this.styleMap[c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]="none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a; +var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=a));a=this.getOpacity(c.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS); +100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(function(a,b){return a[b]?a[b]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]="wrap");for(var f in a)this.styleMap[f]=a[f];this.isDashed()&& +(this.styleMap[mxConstants.STYLE_DASHED]="1",f=this.getDashPattern(),null!=f&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=f));f=this.getStrokeColor();var h=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+f+" , stroke transparency = "+h);(function(a,b){return a&&a.equals?a.equals(b):a===b})(f,"")||1===h||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=f);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]= +c.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]= +a);a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(a,b){return a&&a.equals?a.equals(b):a===b})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(a,b){return a&&a.equals?a.equals(b):a===b})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]="1");this.resolveCommonStyles();return this.styleMap};b.prototype.getDashPattern=function(){var a= +null,b=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineDashPattern(this.getQuickStyleVals()))):a=l.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){for(var b="",f=0;f<a.length;f++)b=b.concat(a[f].toFixed(2)+" ");return b.trim()}return null}; +b.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")&&!function(a,b){return a&&a.equals?a.equals(b): +a===b}(a,"1"))return!0;return!1};b.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),b=1;try{var f;f=a&&a.equals?a.equals("Themed"):"Themed"===a;if(f){var h=this.getTheme();null!=h&&(b=(this.isVertex()?h.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):h.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(C){}1> +b&&(b*=2);return b};b.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var d=4,f;f=a&&a.equals?a.equals("Themed"):"Themed"===a;if(f){var h=this.getTheme();null!=h&&(d=this.isVertex()?h.getStartSize(this.getQuickStyleVals()):h.getConnStartSize(this.getQuickStyleVals()))}else d=parseFloat(a);return b.arrowSizes_$LI$()[d]}catch(C){}return 4};b.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE), +"4");try{var d=4,f;f=a&&a.equals?a.equals("Themed"):"Themed"===a;if(f){var h=this.getTheme();null!=h&&(d=this.isVertex()?h.getEndSize(this.getQuickStyleVals()):h.getConnEndSize(this.getQuickStyleVals()))}else d=parseFloat(a);return b.arrowSizes_$LI$()[d]}catch(C){}return 4};b.prototype.isRounded=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0"),b;b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return 0<parseFloat(a)}; +b.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Themed")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")?!1:!0};b.prototype.getEdgeStyle$java_util_Map=function(a){var b={};(function(a,b){return a&&a.equals?a.equals(b):a===b})(function(a,b){return a[b]?a[b]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")? +b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};b.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};b.prototype.getMasterId=function(){return this.shape.hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};b.prototype.getShapeMasterId= +function(){return this.shape.hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};b.prototype.isGroup=function(){var a;a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};b.getType=function(a){return a.getAttribute("Type")};b.prototype.getMaster=function(){return this.master};b.prototype.getNameU=function(){var a=this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)|| +"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};b.prototype.getName=function(){var a=this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&& +(d=this.shape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,"Organizational unit")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f,"Organizational unit")){var h= +this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0),d=null,d="0.0",f=null,f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(a,b){return a&& +a.equals?a.equals(b):a===b})(d,"Inh")&&(d="0.0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");for(var l=b.split(";"),q="",p=0;p<l.length;p++){var u=l[p],u=u.trim();(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(u,"tabHeight=")&&(q=u.split("tabHeight=").join(""))}(function(a,b){return a&&a.equals?a.equals(b):a===b})(q,"")&&(q="20");l=parseFloat(q);d=parseFloat(d);f=parseFloat(f);q=h.height;d=.1*h.width+100*d; +d=new mxPoint(d,q-q*f-l/2);a.getGeometry().offset=d}else if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,"Domain 3D")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f,"Domain 3D")){h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=h&&(d=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F"),f=h.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0), +f=f.getAttribute("F"));h=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(d,""))d="0.0";if(function(a,b){return a&&a.equals?a.equals(b):a===b}(f,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);q=h.height;d=.1*h.width+100*d;d=new mxPoint(d, +q-q*f);a.getGeometry().offset=d}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var d=b.getType(this.getShape());this.styleDebug("shape type = "+d);if(null!=this.imageData||function(a,b){return a&&a.equals?a.equals(b):a===b}(c.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,d)&&null!=this.masterShape&&null!=this.masterShape.imageData){var f=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var h=function(a,b){return a[b]?a[b]:null}(f,"iType"), +l=function(a,b){return a[b]?a[b]:null}(f,"iData");a.image="data:image/"+h+","+l;return a}var q=this.parseGeom();if(function(a,b){return a&&a.equals?a.equals(b):a===b}(q,""))return this.styleDebug("No geom found"),a;var u=Graph.prototype.compress(q);a[mxConstants.STYLE_SHAPE]="stencil("+u+")"}catch(p){console.error(p.message,p)}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Off-page reference")|| +function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a;a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+this.shapeName);if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")){if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1"))return mxConstants.DIRECTION_SOUTH; +if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};b.prototype.isSubproces=function(){var a;a=(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes= +function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),f=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F",""),h=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X, +"F","");if(""===b||function(a,b){return a&&a.equals?a.equals(b):a===b}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===f||function(a,b){return a&&a.equals?a.equals(b):a===b}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===h||function(a,b){return a&&a.equals?a.equals(b):a===b}(h.toLowerCase(),"inh"))h=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT, +"F","")}return function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"width*0.5")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.toLowerCase(),"height*0.5")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(f.toLowerCase(),"width*1")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(h.toLowerCase(),"height*1")||!(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(a.toLowerCase(),"width*")&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)=== +b}(b.toLowerCase(),"height*")&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(f.toLowerCase(),"width*")&&function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(h.toLowerCase(),"height*")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(a.toLowerCase(),"controls.row_")||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(b.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isRotatedLabel=function(){var a=this.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE, +"V","");null!=this.masterShape&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")&&(a=this.masterShape.getAttribute(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0.0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY= +function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_X), +0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getRoutingPoints=function(a,b,c){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,c):null};b.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var f=[];if(null!=this.shape){var h=this.shape.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.GEOM); +if(0<h.length&&(h=h.item(0).getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=h)){for(var h=h.getAttribute("F"),h=h.replace(RegExp("NURBS\\(","g"),""),h=h.replace(RegExp("\\)","g"),""),h=h.replace(RegExp(",","g")," "),h=h.replace(RegExp("\\s\\s","g")," "),h=h.split(" "),l=h.length,q=[];0<l--;)q.push(0);for(l=0;l<h.length;l++)q[l]=parseFloat(h[l]);for(l=2;l+4<h.length;l+=4){var u=new mxPoint,p=q[l+3];u.x=Math.floor(Math.round(100*(b.x+ +Math.min(100,Math.abs(a.x-b.x))*q[l+2]))/100);u.y=Math.floor(Math.round(100*(b.y-100*p))/100);0<f.push(u)}return f}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[c.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,""))for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]= +d));d=this.getEdgeMarker(!0);null!=d&&(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,b.ARROW_NO_FILL_MARKER)&&(d=d.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=d);d=this.getEdgeMarker(!1);null!=d&&(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(d,b.ARROW_NO_FILL_MARKER)&&(d=d.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]= +d);d=Math.round(this.getStartArrowSize())|0;6!==d&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+d);d=Math.round(this.getFinalArrowSize())|0;6!==d&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+d);d=Math.round(this.getLineWidth())|0;1!==d&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+d);d=this.getStrokeColor();(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=c.mxgraph.io.vsdx.mxVsdxConstants.TRUE); +this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,d=this.getFillColor(),function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=d));d=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+d;d=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+d;d=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+ +d;d=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+d;d=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=d;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};b.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND)),b;b=a&&a.equals?a.equals(""):""===a;b||(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]= +this.isRounded()?c.mxgraph.io.vsdx.mxVsdxConstants.TRUE:c.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};b.prototype.getEdgeMarker=function(a){var d=this.getValue(this.getCellElement$java_lang_String(a?c.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:c.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),f=0;try{if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Themed")){var h=this.getTheme();null!=h&&(f=this.isVertex()?h.getEdgeMarker(a,this.getQuickStyleVals()):h.getConnEdgeMarker(a, +this.getQuickStyleVals()))}else f=parseInt(d)}catch(C){}a=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(b.arrowTypes_$LI$(),f);0<f&&null==a&&(a=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(b.arrowTypes_$LI$(), +1));return a};b.prototype.getCellElement$java_lang_String=function(a){var b=f.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,c){var d=f.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,a,b,c);return null==d&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a, +b,c):d};b.prototype.getCellElement=function(a,b,c){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof c&&null!==c){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,c)};b.prototype.createLabelSubShape=function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH), +this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),h=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),f/2),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X), +h),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),l),u=this.getValueAsDouble(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),W=this.getTextLabel();if(null!=W&&0!==W.length){var P=mxUtils.clone(this.getStyleMap())||{};P[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;P[mxConstants.STYLE_STROKECOLOR]=mxConstants.NONE;P[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;P.hasOwnProperty("align")||(P.align="center"); +P.hasOwnProperty("verticalAlign")||(P.verticalAlign="middle");P.hasOwnProperty("whiteSpace")||(P.whiteSpace="wrap");delete P.shape;delete P.image;var E=this.getRotation();0!==u&&(u=360-180*u/Math.PI,u=Math.round((u+E)%360*100)/100,0!==u&&(P.rotation=""+u));P="text;"+c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(P,"=");l=b.getGeometry().height-(p+f-l);h=q-h;0<E&&(q=new mxGeometry(h,l,d,f),h=b.getGeometry(),c.mxgraph.online.Utils.rotatedGeometry(q,E,h.width/2,h.height/2),h=q.x,l=q.y);return a.insertVertex(b, +null,W,Math.round(100*h)/100,Math.round(100*l)/100,Math.round(100*d)/100,Math.round(100*f)/100,P+";html=1;")}return null};b.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);var d=a.getPoint(d),f=b[0],h=b[b.length-1],l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT), +this.getHeight()),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),u=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),W=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),0),P=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(c.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y), +0),h=(this.getHeight()-(f.y-h.y))/2+f.y-d.y-(P-u+q/2),d=W-p+l/2+(f.x-d.x);return 1E11<Math.abs(d)?null:new mxPoint(Math.floor(Math.round(100*d)/100),Math.floor(Math.round(100*h)/100))}return null};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(c.mxgraph.io.vsdx.Shape);h.__static_initialized=!1;h.ARROW_NO_FILL_MARKER="0";h.maxDp=2;h.USE_SHAPE_MATCH=!1;h.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>'; +l.VsdxShape=h;h.__class="com.mxgraph.io.vsdx.VsdxShape"})(q.vsdx||(q.vsdx={}))})(u.io||(u.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +(function(c){(function(u){(function(q){var l=function(){function h(){}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0())};h.CA_$LI$=function(){h.__static_initialize();null==h.CA&&(h.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return h.CA};h.IA_$LI$=function(){h.__static_initialize();if(null==h.IA){for(var c=256,b=[];0<c--;)b.push(0);h.IA=b}return h.IA};h.__static_initializer_0=function(){for(var c=h.IA_$LI$(), +b=0;b<c.length;b++)c[b]=-1;c=0;for(b=h.CA_$LI$().length;c<b;c++)h.IA_$LI$()[h.CA_$LI$()[c].charCodeAt(0)]=c;h.IA_$LI$()[61]=0};h.encodeToChar=function(c,b,a){var d=null!=c?c.length-b:0;if(0===d)return[];for(var f=3*(d/3|0),l=((d-1)/3|0)+1<<2,l=l+(a?((l-1)/76|0)<<1:0),q=Array(l),u=b,y=0,p=0;u<f+b;){var z=(c[u++]&255)<<16|(c[u++]&255)<<8|c[u++]&255;q[y++]=h.CA_$LI$()[z>>>18&63];q[y++]=h.CA_$LI$()[z>>>12&63];q[y++]=h.CA_$LI$()[z>>>6&63];q[y++]=h.CA_$LI$()[z&63];a&&19===++p&&y<l-2&&(q[y++]="\r",q[y++]= +"\n",p=0)}a=d-f;0<a&&(z=(c[f+b]&255)<<10|(2===a?(c[d+b-1]&255)<<2:0),q[l-4]=h.CA_$LI$()[z>>12],q[l-3]=h.CA_$LI$()[z>>>6&63],q[l-2]=2===a?h.CA_$LI$()[z&63]:"=",q[l-1]="=");return q};h.decode$char_A=function(c){var b=null!=c?c.length:0;if(0===b)return[];for(var a=0,d=0;d<b;d++)0>h.IA_$LI$()[c[d].charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=h.IA_$LI$()[c[--d].charCodeAt(0)];)61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d])&&f++;for(var b=(6*(b-a)>>3)-f,a=function(a){for(var b= +[];0<a--;)b.push(0);return b}(b),l=f=0;l<b;){for(var q=d=0;4>q;q++){var u=h.IA_$LI$()[c[f++].charCodeAt(0)];0<=u?d|=u<<18-6*q:q--}a[l++]=d>>16|0;l<b&&(a[l++]=d>>8|0,l<b&&(a[l++]=d|0))}return a};h.decode=function(f){if(null!=f&&f instanceof Array&&(0==f.length||null==f[0]||"string"===typeof f[0])||null===f)return c.mxgraph.online.mxBase64.decode$char_A(f);if(null!=f&&f instanceof Array&&(0==f.length||null==f[0]||"number"===typeof f[0])||null===f)return c.mxgraph.online.mxBase64.decode$byte_A(f);if("string"=== +typeof f||null===f)return c.mxgraph.online.mxBase64.decode$java_lang_String(f);throw Error("invalid overload");};h.decodeFast$char_A=function(c){var b=c.length;if(0===b)return[];for(var a=0,d=b-1;a<d&&0>h.IA_$LI$()[c[a].charCodeAt(0)];)a++;for(;0<d&&0>h.IA_$LI$()[c[d].charCodeAt(0)];)d--;for(var f=61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d])?61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d-1])?2:1:0,l=d-a+1,q=76<b?(13==function(a){return null==a.charCodeAt?a: +a.charCodeAt(0)}(c[76])?l/78|0:0)<<1:0,l=(6*(l-q)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(l),u=0,y=0,p=3*(l/3|0);u<p;){var z=h.IA_$LI$()[c[a++].charCodeAt(0)]<<18|h.IA_$LI$()[c[a++].charCodeAt(0)]<<12|h.IA_$LI$()[c[a++].charCodeAt(0)]<<6|h.IA_$LI$()[c[a++].charCodeAt(0)];b[u++]=z>>16|0;b[u++]=z>>8|0;b[u++]=z|0;0<q&&19===++y&&(a+=2,y=0)}if(u<l){for(q=z=0;a<=d-f;q++)z|=h.IA_$LI$()[c[a++].charCodeAt(0)]<<18-6*q;for(c=16;u<l;c-=8)b[u++]=z>>c|0}return b};h.decodeFast=function(f){if(null!= +f&&f instanceof Array&&(0==f.length||null==f[0]||"string"===typeof f[0])||null===f)return c.mxgraph.online.mxBase64.decodeFast$char_A(f);if(null!=f&&f instanceof Array&&(0==f.length||null==f[0]||"number"===typeof f[0])||null===f)return c.mxgraph.online.mxBase64.decodeFast$byte_A(f);if("string"===typeof f||null===f)return c.mxgraph.online.mxBase64.decodeFast$java_lang_String(f);throw Error("invalid overload");};h.encodeToByte=function(c,b){var a=null!=c?c.length:0;if(0===a)return[];for(var d=3*(a/ +3|0),f=((a-1)/3|0)+1<<2,l=f+=b?((f-1)/76|0)<<1:0,q=[];0<l--;)q.push(0);for(var u=0,y=0,p=0;u<d;)l=(c[u++]&255)<<16|(c[u++]&255)<<8|c[u++]&255,q[y++]=h.CA_$LI$()[l>>>18&63].charCodeAt(0),q[y++]=h.CA_$LI$()[l>>>12&63].charCodeAt(0),q[y++]=h.CA_$LI$()[l>>>6&63].charCodeAt(0),q[y++]=h.CA_$LI$()[l&63].charCodeAt(0),b&&19===++p&&y<f-2&&(q[y++]=13,q[y++]=10,p=0);u=a-d;0<u&&(l=(c[d]&255)<<10|(2===u?(c[a-1]&255)<<2:0),q[f-4]=h.CA_$LI$()[l>>12].charCodeAt(0),q[f-3]=h.CA_$LI$()[l>>>6&63].charCodeAt(0),q[f-2]= +2===u?h.CA_$LI$()[l&63].charCodeAt(0):61,q[f-1]=61);return q};h.decode$byte_A=function(c){for(var b=c.length,a=0,d=0;d<b;d++)0>h.IA_$LI$()[c[d]&255]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=h.IA_$LI$()[c[--d]&255];)61==c[d]&&f++;d=b=(6*(b-a)>>3)-f;for(a=[];0<d--;)a.push(0);for(var l=f=0;l<b;){for(var q=d=0;4>q;q++){var u=h.IA_$LI$()[c[f++]&255];0<=u?d|=u<<18-6*q:q--}a[l++]=d>>16|0;l<b&&(a[l++]=d>>8|0,l<b&&(a[l++]=d|0))}return a};h.decodeFast$byte_A=function(c){var b=c.length;if(0=== +b)return[];for(var a=0,d=b-1;a<d&&0>h.IA_$LI$()[c[a]&255];)a++;for(;0<d&&0>h.IA_$LI$()[c[d]&255];)d--;for(var f=61==c[d]?61==c[d-1]?2:1:0,l=d-a+1,q=76<b?(13==c[76]?l/78|0:0)<<1:0,u=l=(6*(l-q)>>3)-f,b=[];0<u--;)b.push(0);for(var y=u=0,p=3*(l/3|0);u<p;){var z=h.IA_$LI$()[c[a++]]<<18|h.IA_$LI$()[c[a++]]<<12|h.IA_$LI$()[c[a++]]<<6|h.IA_$LI$()[c[a++]];b[u++]=z>>16|0;b[u++]=z>>8|0;b[u++]=z|0;0<q&&19===++y&&(a+=2,y=0)}if(u<l){for(q=z=0;a<=d-f;q++)z|=h.IA_$LI$()[c[a++]]<<18-6*q;for(c=16;u<l;c-=8)b[u++]=z>> +c|0}return b};h.encodeToString=function(c,b,a){return h.encodeToChar(c,b,a).join("")};h.decode$java_lang_String=function(c){var b=null!=c?c.length:0;if(0===b)return[];for(var a=0,d=0;d<b;d++)0>h.IA_$LI$()[c.charAt(d).charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=h.IA_$LI$()[c.charAt(--d).charCodeAt(0)];)61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))&&f++;for(var b=(6*(b-a)>>3)-f,a=function(a){for(var b=[];0<a--;)b.push(0);return b}(b),l=f=0;l<b;){for(var q= +d=0;4>q;q++){var u=h.IA_$LI$()[c.charAt(f++).charCodeAt(0)];0<=u?d|=u<<18-6*q:q--}a[l++]=d>>16|0;l<b&&(a[l++]=d>>8|0,l<b&&(a[l++]=d|0))}return a};h.decodeFast$java_lang_String=function(c){var b=c.length;if(0===b)return[];for(var a=0,d=b-1;a<d&&0>h.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(a))&255];)a++;for(;0<d&&0>h.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))&255];)d--;for(var f=61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))? +61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d-1))?2:1:0,l=d-a+1,q=76<b?(13==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(76))?l/78|0:0)<<1:0,l=(6*(l-q)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(l),u=0,y=0,p=3*(l/3|0);u<p;){var z=h.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18|h.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<12|h.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<6|h.IA_$LI$()[c.charAt(a++).charCodeAt(0)];b[u++]=z>>16|0;b[u++]=z>>8|0;b[u++]= +z|0;0<q&&19===++y&&(a+=2,y=0)}if(u<l){for(q=z=0;a<=d-f;q++)z|=h.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18-6*q;for(c=16;u<l;c-=8)b[u++]=z>>c|0}return b};return h}();l.__static_initialized=!1;q.mxBase64=l;l.__class="com.mxgraph.online.mxBase64"})(u.online||(u.online={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$(); +com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowSizes_$LI$();com.mxgraph.io.vsdx.VsdxShape.OFFSET_ARRAY_$LI$();com.mxgraph.io.vsdx.VsdxShape.__static_initialize();com.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$();com.mxgraph.io.vsdx.Style.lineDashPatterns_$LI$();com.mxgraph.io.vsdx.Style.styleTypes_$LI$();com.mxgraph.io.vsdx.Style.__static_initialize();com.mxgraph.online.Constants.MAX_AREA_$LI$();com.mxgraph.io.vsdx.theme.Color.NONE_$LI$();com.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(); +com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$(); +EditorUi.prototype.doImportVisio=function(c,u,q){null!=c.name&&/(\.vssx)($|\?)/i.test(c.name)?(new com.mxgraph.io.mxVssxCodec).decodeVssx(c,u):(new com.mxgraph.io.mxVsdxCodec).decodeVsdx(c,u,null,q)};/*! + +JSZip v3.1.3 - A Javascript class for generating and reading zip files +<http://stuartk.com/jszip> + +(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com> +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/master/LICENSE +*/ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d=a("./utils"),e=a("./support"),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a){for(var b,c,e,g,h,i,j,k=[],l=0,m=a.length,n=m,o="string"!==d.getTypeOf(a);l<a.length;)n=m-l,o?(b=a[l++],c=l<m?a[l++]:0,e=l<m?a[l++]:0):(b=a.charCodeAt(l++),c=l<m?a.charCodeAt(l++):0,e=l<m?a.charCodeAt(l++):0),g=b>>2,h=(3&b)<<4|c>>4,i=n>1?(15&c)<<2|e>>6:64,j=n>2?63&e:64,k.push(f.charAt(g)+f.charAt(h)+f.charAt(i)+f.charAt(j));return k.join("")},c.decode=function(a){var b,c,d,g,h,i,j,k=0,l=0,m="data:";if(a.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");var n=3*a.length/4;if(a.charAt(a.length-1)===f.charAt(64)&&n--,a.charAt(a.length-2)===f.charAt(64)&&n--,n%1!==0)throw new Error("Invalid base64 input, bad content length.");var o;for(o=e.uint8array?new Uint8Array(0|n):new Array(0|n);k<a.length;)g=f.indexOf(a.charAt(k++)),h=f.indexOf(a.charAt(k++)),i=f.indexOf(a.charAt(k++)),j=f.indexOf(a.charAt(k++)),b=g<<2|h>>4,c=(15&h)<<4|i>>2,d=(3&i)<<6|j,o[l++]=b,64!==i&&(o[l++]=c),64!==j&&(o[l++]=d);return o}},{"./support":30,"./utils":32}],2:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.compressedSize=a,this.uncompressedSize=b,this.crc32=c,this.compression=d,this.compressedContent=e}var e=a("./external"),f=a("./stream/DataWorker"),g=a("./stream/DataLengthProbe"),h=a("./stream/Crc32Probe"),g=a("./stream/DataLengthProbe");d.prototype={getContentWorker:function(){var a=new f(e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new g("data_length")),b=this;return a.on("end",function(){if(this.streamInfo.data_length!==b.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),a},getCompressedWorker:function(){return new f(e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(a,b,c){return a.pipe(new h).pipe(new g("uncompressedSize")).pipe(b.compressWorker(c)).pipe(new g("compressedSize")).withStreamInfo("compression",b)},b.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,b,c){"use strict";var d=a("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(a){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},c.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=h,f=d+c;a^=-1;for(var g=d;g<f;g++)a=a>>>8^e[255&(a^b[g])];return a^-1}function f(a,b,c,d){var e=h,f=d+c;a^=-1;for(var g=d;g<f;g++)a=a>>>8^e[255&(a^b.charCodeAt(g))];return a^-1}var g=a("./utils"),h=d();b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var c="string"!==g.getTypeOf(a);return c?e(0|b,a,a.length,0):f(0|b,a,a.length,0)}},{"./utils":32}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(a,b,c){"use strict";var d=null;d="undefined"!=typeof Promise?Promise:a("lie"),b.exports={Promise:d}},{lie:58}],7:[function(a,b,c){"use strict";function d(a,b){h.call(this,"FlateWorker/"+a),this._pako=new f[a]({raw:!0,level:b.level||-1}),this.meta={};var c=this;this._pako.onData=function(a){c.push({data:a,meta:c.meta})}}var e="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,f=a("pako"),g=a("./utils"),h=a("./stream/GenericWorker"),i=e?"uint8array":"array";c.magic="\b\0",g.inherits(d,h),d.prototype.processChunk=function(a){this.meta=a.meta,this._pako.push(g.transformTo(i,a.data),!1)},d.prototype.flush=function(){h.prototype.flush.call(this),this._pako.push([],!0)},d.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},c.compressWorker=function(a){return new d("Deflate",a)},c.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:59}],8:[function(a,b,c){"use strict";function d(a,b,c,d){f.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=c,this.encodeFileName=d,this.streamFiles=a,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var e=a("../utils"),f=a("../stream/GenericWorker"),g=a("../utf8"),h=a("../crc32"),i=a("../signature"),j=function(a,b){var c,d="";for(c=0;c<b;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},k=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},l=function(a,b){return 63&(a||0)},m=function(a,b,c,d,f,m){var n,o,p=a.file,q=a.compression,r=m!==g.utf8encode,s=e.transformTo("string",m(p.name)),t=e.transformTo("string",g.utf8encode(p.name)),u=p.comment,v=e.transformTo("string",m(u)),w=e.transformTo("string",g.utf8encode(u)),x=t.length!==p.name.length,y=w.length!==u.length,z="",A="",B="",C=p.dir,D=p.date,E={crc32:0,compressedSize:0,uncompressedSize:0};b&&!c||(E.crc32=a.crc32,E.compressedSize=a.compressedSize,E.uncompressedSize=a.uncompressedSize);var F=0;b&&(F|=8),r||!x&&!y||(F|=2048);var G=0,H=0;C&&(G|=16),"UNIX"===f?(H=798,G|=k(p.unixPermissions,C)):(H=20,G|=l(p.dosPermissions,C)),n=D.getUTCHours(),n<<=6,n|=D.getUTCMinutes(),n<<=5,n|=D.getUTCSeconds()/2,o=D.getUTCFullYear()-1980,o<<=4,o|=D.getUTCMonth()+1,o<<=5,o|=D.getUTCDate(),x&&(A=j(1,1)+j(h(s),4)+t,z+="up"+j(A.length,2)+A),y&&(B=j(1,1)+j(h(v),4)+w,z+="uc"+j(B.length,2)+B);var I="";I+="\n\0",I+=j(F,2),I+=q.magic,I+=j(n,2),I+=j(o,2),I+=j(E.crc32,4),I+=j(E.compressedSize,4),I+=j(E.uncompressedSize,4),I+=j(s.length,2),I+=j(z.length,2);var J=i.LOCAL_FILE_HEADER+I+s+z,K=i.CENTRAL_FILE_HEADER+j(H,2)+I+j(v.length,2)+"\0\0\0\0"+j(G,4)+j(d,4)+s+z+v;return{fileRecord:J,dirRecord:K}},n=function(a,b,c,d,f){var g="",h=e.transformTo("string",f(d));return g=i.CENTRAL_DIRECTORY_END+"\0\0\0\0"+j(a,2)+j(a,2)+j(b,4)+j(c,4)+j(h.length,2)+h},o=function(a){var b="";return b=i.DATA_DESCRIPTOR+j(a.crc32,4)+j(a.compressedSize,4)+j(a.uncompressedSize,4)};e.inherits(d,f),d.prototype.push=function(a){var b=a.meta.percent||0,c=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(a):(this.bytesWritten+=a.data.length,f.prototype.push.call(this,{data:a.data,meta:{currentFile:this.currentFile,percent:c?(b+100*(c-d-1))/c:100}}))},d.prototype.openedSource=function(a){this.currentSourceOffset=this.bytesWritten,this.currentFile=a.file.name;var b=this.streamFiles&&!a.file.dir;if(b){var c=m(a,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:c.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(a){this.accumulate=!1;var b=this.streamFiles&&!a.file.dir,c=m(a,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(c.dirRecord),b)this.push({data:o(a),meta:{percent:100}});else for(this.push({data:c.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var a=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var c=this.bytesWritten-a,d=n(this.dirRecords.length,c,a,this.zipComment,this.encodeFileName);this.push({data:d,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(a){this._sources.push(a);var b=this;return a.on("data",function(a){b.processChunk(a)}),a.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),a.on("error",function(a){b.error(a)}),this},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(a){var b=this._sources;if(!f.prototype.error.call(this,a))return!1;for(var c=0;c<b.length;c++)try{b[c].error(a)}catch(a){}return!0},d.prototype.lock=function(){f.prototype.lock.call(this);for(var a=this._sources,b=0;b<a.length;b++)a[b].lock()},b.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(a,b,c){"use strict";var d=a("../compressions"),e=a("./ZipFileWorker"),f=function(a,b){var c=a||b,e=d[c];if(!e)throw new Error(c+" is not a valid compression method !");return e};c.generateWorker=function(a,b,c){var d=new e(b.streamFiles,c,b.platform,b.encodeFileName),g=0;try{a.forEach(function(a,c){g++;var e=f(c.options.compression,b.compression),h=c.options.compressionOptions||b.compressionOptions||{},i=c.dir,j=c.date;c._compressWorker(e,h).withStreamInfo("file",{name:a,dir:i,date:j,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(d)}),d.entriesCount=g}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(a,b,c){"use strict";function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}d.prototype=a("./object"),d.prototype.loadAsync=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.version="3.1.3",d.loadAsync=function(a,b){return(new d).loadAsync(a,b)},d.external=a("./external"),b.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(a,b,c){"use strict";function d(a){return new f.Promise(function(b,c){var d=a.decompressed.getContentWorker().pipe(new i);d.on("error",function(a){c(a)}).on("end",function(){d.streamInfo.crc32!==a.decompressed.crc32?c(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}var e=a("./utils"),f=a("./external"),g=a("./utf8"),e=a("./utils"),h=a("./zipEntries"),i=a("./stream/Crc32Probe"),j=a("./nodejsUtils");b.exports=function(a,b){var c=this;return b=e.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),j.isNode&&j.isStream(a)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):e.prepareContent("the loaded zip file",a,!0,b.optimizedBinaryString,b.base64).then(function(a){var c=new h(b);return c.load(a),c}).then(function(a){var c=[f.Promise.resolve(a)],e=a.files;if(b.checkCRC32)for(var g=0;g<e.length;g++)c.push(d(e[g]));return f.Promise.all(c)}).then(function(a){for(var d=a.shift(),e=d.files,f=0;f<e.length;f++){var g=e[f];c.file(g.fileNameStr,g.decompressed,{binary:!0,optimizedBinaryString:!0,date:g.date,dir:g.dir,comment:g.fileCommentStr.length?g.fileCommentStr:null,unixPermissions:g.unixPermissions,dosPermissions:g.dosPermissions,createFolders:b.createFolders})}return d.zipComment.length&&(c.comment=d.zipComment),c})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(a,b,c){"use strict";function d(a,b){f.call(this,"Nodejs stream input adapter for "+a),this._upstreamEnded=!1,this._bindStream(b)}var e=a("../utils"),f=a("../stream/GenericWorker");e.inherits(d,f),d.prototype._bindStream=function(a){var b=this;this._stream=a,a.pause(),a.on("data",function(a){b.push({data:a,meta:{percent:0}})}).on("error",function(a){b.isPaused?this.generatedError=a:b.error(a)}).on("end",function(){b.isPaused?b._upstreamEnded=!0:b.end()})},d.prototype.pause=function(){return!!f.prototype.pause.call(this)&&(this._stream.pause(),!0)},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},b.exports=d},{"../stream/GenericWorker":28,"../utils":32}],13:[function(a,b,c){"use strict";function d(a,b,c){e.call(this,b),this._helper=a;var d=this;a.on("data",function(a,b){d.push(a)||d._helper.pause(),c&&c(b)}).on("error",function(a){d.emit("error",a)}).on("end",function(){d.push(null)})}var e=a("readable-stream").Readable,f=a("util");f.inherits(d,e),d.prototype._read=function(){this._helper.resume()},b.exports=d},{"readable-stream":16,util:void 0}],14:[function(a,b,c){"use strict";b.exports={isNode:"undefined"!=typeof Buffer,newBuffer:function(a,b){return new Buffer(a,b)},isBuffer:function(a){return Buffer.isBuffer(a)},isStream:function(a){return a&&"function"==typeof a.on&&"function"==typeof a.pause&&"function"==typeof a.resume}}},{}],15:[function(a,b,c){"use strict";function d(a){return"[object RegExp]"===Object.prototype.toString.call(a)}var e=a("./utf8"),f=a("./utils"),g=a("./stream/GenericWorker"),h=a("./stream/StreamHelper"),i=a("./defaults"),j=a("./compressedObject"),k=a("./zipObject"),l=a("./generate"),m=a("./nodejsUtils"),n=a("./nodejs/NodejsStreamInputAdapter"),o=function(a,b,c){var d,e=f.getTypeOf(b),h=f.extend(c||{},i);h.date=h.date||new Date,null!==h.compression&&(h.compression=h.compression.toUpperCase()),"string"==typeof h.unixPermissions&&(h.unixPermissions=parseInt(h.unixPermissions,8)),h.unixPermissions&&16384&h.unixPermissions&&(h.dir=!0),h.dosPermissions&&16&h.dosPermissions&&(h.dir=!0),h.dir&&(a=q(a)),h.createFolders&&(d=p(a))&&r.call(this,d,!0);var l="string"===e&&h.binary===!1&&h.base64===!1;c&&"undefined"!=typeof c.binary||(h.binary=!l);var o=b instanceof j&&0===b.uncompressedSize;(o||h.dir||!b||0===b.length)&&(h.base64=!1,h.binary=!0,b="",h.compression="STORE",e="string");var s=null;s=b instanceof j||b instanceof g?b:m.isNode&&m.isStream(b)?new n(a,b):f.prepareContent(a,b,h.binary,h.optimizedBinaryString,h.base64);var t=new k(a,s,h);this.files[a]=t},p=function(a){"/"===a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},q=function(a){return"/"!==a.slice(-1)&&(a+="/"),a},r=function(a,b){return b="undefined"!=typeof b?b:i.createFolders,a=q(a),this.files[a]||o.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},s={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(a){var b,c,d;for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],c=b.slice(this.root.length,b.length),c&&b.slice(0,this.root.length)===this.root&&a(c,d))},filter:function(a){var b=[];return this.forEach(function(c,d){a(c,d)&&b.push(d)}),b},file:function(a,b,c){if(1===arguments.length){if(d(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}var f=this.files[this.root+a];return f&&!f.dir?f:null}return a=this.root+a,o.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=r.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!==a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(a){var b,c={};try{if(c=f.extend(a||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:e.utf8encode}),c.type=c.type.toLowerCase(),c.compression=c.compression.toUpperCase(),"binarystring"===c.type&&(c.type="string"),!c.type)throw new Error("No output type specified.");f.checkSupport(c.type),"darwin"!==c.platform&&"freebsd"!==c.platform&&"linux"!==c.platform&&"sunos"!==c.platform||(c.platform="UNIX"),"win32"===c.platform&&(c.platform="DOS");var d=c.comment||this.comment||"";b=l.generateWorker(this,c,d)}catch(i){b=new g("error"),b.error(i)}return new h(b,c.type||"string",c.mimeType)},generateAsync:function(a,b){return this.generateInternalStream(a).accumulate(b)},generateNodeStream:function(a,b){return a=a||{},a.type||(a.type="nodebuffer"),this.generateInternalStream(a).toNodejsStream(b)}};b.exports=s},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(a,b,c){b.exports=a("stream")},{stream:void 0}],17:[function(a,b,c){"use strict";function d(a){e.call(this,a);for(var b=0;b<this.data.length;b++)a[b]=255&a[b]}var e=a("./DataReader"),f=a("../utils");f.inherits(d,e),d.prototype.byteAt=function(a){return this.data[this.zero+a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f-this.zero;return-1},d.prototype.readAndCheckSignature=function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.readData(4);return b===f[0]&&c===f[1]&&d===f[2]&&e===f[3]},d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return[];var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./DataReader":18}],18:[function(a,b,c){"use strict";function d(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}var e=a("../utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readAndCheckSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},b.exports=d},{"../utils":32}],19:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./Uint8ArrayReader"),f=a("../utils");f.inherits(d,e),d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./DataReader"),f=a("../utils");f.inherits(d,e),d.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},d.prototype.readAndCheckSignature=function(a){var b=this.readData(4);return a===b},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./DataReader":18}],21:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./ArrayReader"),f=a("../utils");f.inherits(d,e),d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./ArrayReader":17}],22:[function(a,b,c){"use strict";var d=a("../utils"),e=a("../support"),f=a("./ArrayReader"),g=a("./StringReader"),h=a("./NodeBufferReader"),i=a("./Uint8ArrayReader");b.exports=function(a){var b=d.getTypeOf(a);return d.checkSupport(b),"string"!==b||e.uint8array?"nodebuffer"===b?new h(a):e.uint8array?new i(d.transformTo("uint8array",a)):new f(d.transformTo("array",a)):new g(a)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],24:[function(a,b,c){"use strict";function d(a){e.call(this,"ConvertWorker to "+a),this.destType=a}var e=a("./GenericWorker"),f=a("../utils");f.inherits(d,e),d.prototype.processChunk=function(a){this.push({data:f.transformTo(this.destType,a.data),meta:a.meta})},b.exports=d},{"../utils":32,"./GenericWorker":28}],25:[function(a,b,c){"use strict";function d(){e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var e=a("./GenericWorker"),f=a("../crc32"),g=a("../utils");g.inherits(d,e),d.prototype.processChunk=function(a){this.streamInfo.crc32=f(a.data,this.streamInfo.crc32||0),this.push(a)},b.exports=d},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(a,b,c){"use strict";function d(a){f.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}var e=a("../utils"),f=a("./GenericWorker");e.inherits(d,f),d.prototype.processChunk=function(a){if(a){var b=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=b+a.data.length}f.prototype.processChunk.call(this,a)},b.exports=d},{"../utils":32,"./GenericWorker":28}],27:[function(a,b,c){"use strict";function d(a){f.call(this,"DataWorker");var b=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(a){b.dataIsReady=!0,b.data=a,b.max=a&&a.length||0,b.type=e.getTypeOf(a),b.isPaused||b._tickAndRepeat()},function(a){b.error(a)})}var e=a("../utils"),f=a("./GenericWorker"),g=16384;e.inherits(d,f),d.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,e.delay(this._tickAndRepeat,[],this)),!0)},d.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(e.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},d.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=g,b=null,c=Math.min(this.max,this.index+a);if(this.index>=this.max)return this.end();switch(this.type){case"string":b=this.data.substring(this.index,c);break;case"uint8array":b=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":b=this.data.slice(this.index,c)}return this.index=c,this.push({data:b,meta:{percent:this.max?this.index/this.max*100:0}})},b.exports=d},{"../utils":32,"./GenericWorker":28}],28:[function(a,b,c){"use strict";function d(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,b){return this._listeners[a].push(b),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,b){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,b)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var b=this;return a.on("data",function(a){b.processChunk(a)}),a.on("end",function(){b.end()}),a.on("error",function(a){b.error(a)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var a=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,b){return this.extraStreamInfo[a]=b,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},b.exports=d},{}],29:[function(a,b,c){"use strict";function d(a,b,c,d){var f=null;switch(a){case"blob":return h.newBlob(c,d);case"base64":return f=e(b,c),k.encode(f);default:return f=e(b,c),h.transformTo(a,f)}}function e(a,b){var c,d=0,e=null,f=0;for(c=0;c<b.length;c++)f+=b[c].length;switch(a){case"string":return b.join("");case"array":return Array.prototype.concat.apply([],b);case"uint8array":for(e=new Uint8Array(f),c=0;c<b.length;c++)e.set(b[c],d),d+=b[c].length;return e;case"nodebuffer":return Buffer.concat(b);default:throw new Error("concat : unsupported type '"+a+"'")}}function f(a,b){return new m.Promise(function(c,e){var f=[],g=a._internalType,h=a._outputType,i=a._mimeType;a.on("data",function(a,c){f.push(a),b&&b(c)}).on("error",function(a){f=[],e(a)}).on("end",function(){try{var a=d(h,g,f,i);c(a)}catch(b){e(b)}f=[]}).resume()})}function g(a,b,c){var d=b;switch(b){case"blob":d="arraybuffer";break;case"arraybuffer":d="uint8array";break;case"base64":d="string"}try{this._internalType=d,this._outputType=b,this._mimeType=c,h.checkSupport(d),this._worker=a.pipe(new i(d)),a.lock()}catch(e){this._worker=new j("error"),this._worker.error(e)}}var h=a("../utils"),i=a("./ConvertWorker"),j=a("./GenericWorker"),k=a("../base64"),l=a("../support"),m=a("../external"),n=null;if(l.nodestream)try{n=a("../nodejs/NodejsStreamOutputAdapter")}catch(o){}g.prototype={accumulate:function(a){return f(this,a)},on:function(a,b){var c=this;return"data"===a?this._worker.on(a,function(a){b.call(c,a.data,a.meta)}):this._worker.on(a,function(){h.delay(b,arguments,c)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(a){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new n(this,{objectMode:"nodebuffer"!==this._outputType},a)}},b.exports=g},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(a,b,c){"use strict";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer="undefined"!=typeof Buffer,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var d=new ArrayBuffer(0);try{c.blob=0===new Blob([d],{type:"application/zip"}).size}catch(e){try{var f=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,g=new f;g.append(d),c.blob=0===g.getBlob("application/zip").size}catch(e){c.blob=!1}}}try{c.nodestream=!!a("readable-stream").Readable}catch(e){c.nodestream=!1}},{"readable-stream":16}],31:[function(a,b,c){"use strict";function d(){i.call(this,"utf-8 decode"),this.leftOver=null}function e(){i.call(this,"utf-8 encode")}for(var f=a("./utils"),g=a("./support"),h=a("./nodejsUtils"),i=a("./stream/GenericWorker"),j=new Array(256),k=0;k<256;k++)j[k]=k>=252?6:k>=248?5:k>=240?4:k>=224?3:k>=192?2:1;j[254]=j[254]=1;var l=function(a){var b,c,d,e,f,h=a.length,i=0;for(e=0;e<h;e++)c=a.charCodeAt(e),55296===(64512&c)&&e+1<h&&(d=a.charCodeAt(e+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),e++)),i+=c<128?1:c<2048?2:c<65536?3:4;for(b=g.uint8array?new Uint8Array(i):new Array(i),f=0,e=0;f<i;e++)c=a.charCodeAt(e),55296===(64512&c)&&e+1<h&&(d=a.charCodeAt(e+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),e++)),c<128?b[f++]=c:c<2048?(b[f++]=192|c>>>6,b[f++]=128|63&c):c<65536?(b[f++]=224|c>>>12,b[f++]=128|c>>>6&63,b[f++]=128|63&c):(b[f++]=240|c>>>18,b[f++]=128|c>>>12&63,b[f++]=128|c>>>6&63,b[f++]=128|63&c);return b},m=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return c<0?b:0===c?b:c+j[a[c]]>b?c:b},n=function(a){var b,c,d,e,g=a.length,h=new Array(2*g);for(c=0,b=0;b<g;)if(d=a[b++],d<128)h[c++]=d;else if(e=j[d],e>4)h[c++]=65533,b+=e-1;else{for(d&=2===e?31:3===e?15:7;e>1&&b<g;)d=d<<6|63&a[b++],e--;e>1?h[c++]=65533:d<65536?h[c++]=d:(d-=65536,h[c++]=55296|d>>10&1023,h[c++]=56320|1023&d)}return h.length!==c&&(h.subarray?h=h.subarray(0,c):h.length=c),f.applyFromCharCode(h)};c.utf8encode=function(a){return g.nodebuffer?h.newBuffer(a,"utf-8"):l(a)},c.utf8decode=function(a){return g.nodebuffer?f.transformTo("nodebuffer",a).toString("utf-8"):(a=f.transformTo(g.uint8array?"uint8array":"array",a),n(a))},f.inherits(d,i),d.prototype.processChunk=function(a){var b=f.transformTo(g.uint8array?"uint8array":"array",a.data);if(this.leftOver&&this.leftOver.length){if(g.uint8array){var d=b;b=new Uint8Array(d.length+this.leftOver.length),b.set(this.leftOver,0),b.set(d,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var e=m(b),h=b;e!==b.length&&(g.uint8array?(h=b.subarray(0,e),this.leftOver=b.subarray(e,b.length)):(h=b.slice(0,e),this.leftOver=b.slice(e,b.length))),this.push({data:c.utf8decode(h),meta:a.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=d,f.inherits(e,i),e.prototype.processChunk=function(a){this.push({data:c.utf8encode(a.data),meta:a.meta})},c.Utf8EncodeWorker=e},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(a,b,c){"use strict";function d(a){var b=null;return b=i.uint8array?new Uint8Array(a.length):new Array(a.length),f(a,b)}function e(a){return a}function f(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function g(a){var b=65536,d=c.getTypeOf(a),e=!0;if("uint8array"===d?e=n.applyCanBeUsed.uint8array:"nodebuffer"===d&&(e=n.applyCanBeUsed.nodebuffer),e)for(;b>1;)try{return n.stringifyByChunk(a,d,b)}catch(f){b=Math.floor(b/2)}return n.stringifyByChar(a)}function h(a,b){for(var c=0;c<a.length;c++)b[c]=a[c];return b}var i=a("./support"),j=a("./base64"),k=a("./nodejsUtils"),l=a("core-js/library/fn/set-immediate"),m=a("./external");c.newBlob=function(a,b){c.checkSupport("blob");try{return new Blob(a,{type:b})}catch(d){try{for(var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e,g=0;g<a.length;g++)f.append(a[g]); +return f.getBlob(b)}catch(d){throw new Error("Bug : can't construct the Blob.")}}};var n={stringifyByChunk:function(a,b,c){var d=[],e=0,f=a.length;if(f<=c)return String.fromCharCode.apply(null,a);for(;e<f;)"array"===b||"nodebuffer"===b?d.push(String.fromCharCode.apply(null,a.slice(e,Math.min(e+c,f)))):d.push(String.fromCharCode.apply(null,a.subarray(e,Math.min(e+c,f)))),e+=c;return d.join("")},stringifyByChar:function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(a[c]);return b},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(a){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,k.newBuffer(1)).length}catch(a){return!1}}()}};c.applyFromCharCode=g;var o={};o.string={string:e,array:function(a){return f(a,new Array(a.length))},arraybuffer:function(a){return o.string.uint8array(a).buffer},uint8array:function(a){return f(a,new Uint8Array(a.length))},nodebuffer:function(a){return f(a,k.newBuffer(a.length))}},o.array={string:g,array:e,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return k.newBuffer(a)}},o.arraybuffer={string:function(a){return g(new Uint8Array(a))},array:function(a){return h(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:e,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return k.newBuffer(new Uint8Array(a))}},o.uint8array={string:g,array:function(a){return h(a,new Array(a.length))},arraybuffer:function(a){var b=new Uint8Array(a.length);return a.length&&b.set(a,0),b.buffer},uint8array:e,nodebuffer:function(a){return k.newBuffer(a)}},o.nodebuffer={string:g,array:function(a){return h(a,new Array(a.length))},arraybuffer:function(a){return o.nodebuffer.uint8array(a).buffer},uint8array:function(a){return h(a,new Uint8Array(a.length))},nodebuffer:e},c.transformTo=function(a,b){if(b||(b=""),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=o[d][a](b);return e},c.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":i.nodebuffer&&k.isBuffer(a)?"nodebuffer":i.uint8array&&a instanceof Uint8Array?"uint8array":i.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(a){var b=i[a.toLowerCase()];if(!b)throw new Error(a+" is not supported by this platform")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d="";for(c=0;c<(a||"").length;c++)b=a.charCodeAt(c),d+="\\x"+(b<16?"0":"")+b.toString(16).toUpperCase();return d},c.delay=function(a,b,c){l(function(){a.apply(c||null,b||[])})},c.inherits=function(a,b){var c=function(){};c.prototype=b.prototype,a.prototype=new c},c.extend=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&"undefined"==typeof c[b]&&(c[b]=arguments[a][b]);return c},c.prepareContent=function(a,b,e,f,g){var h=m.Promise.resolve(b).then(function(a){var b=i.blob&&(a instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(a))!==-1);return b&&"undefined"!=typeof FileReader?new m.Promise(function(b,c){var d=new FileReader;d.onload=function(a){b(a.target.result)},d.onerror=function(a){c(a.target.error)},d.readAsArrayBuffer(a)}):a});return h.then(function(b){var h=c.getTypeOf(b);return h?("arraybuffer"===h?b=c.transformTo("uint8array",b):"string"===h&&(g?b=j.decode(b):e&&f!==!0&&(b=d(b))),b):m.Promise.reject(new Error("The data of '"+a+"' is in an unsupported format !"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"core-js/library/fn/set-immediate":36}],33:[function(a,b,c){"use strict";function d(a){this.files=[],this.loadOptions=a}var e=a("./reader/readerFor"),f=a("./utils"),g=a("./signature"),h=a("./zipEntry"),i=(a("./utf8"),a("./support"));d.prototype={checkSignature:function(a){if(!this.reader.readAndCheckSignature(a)){this.reader.index-=4;var b=this.reader.readString(4);throw new Error("Corrupted zip or bug : unexpected signature ("+f.pretty(b)+", expected "+f.pretty(a)+")")}},isSignature:function(a,b){var c=this.reader.index;this.reader.setIndex(a);var d=this.reader.readString(4),e=d===b;return this.reader.setIndex(c),e},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var a=this.reader.readData(this.zipCommentLength),b=i.uint8array?"uint8array":"array",c=f.transformTo(b,a);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;e<d;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readData(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8(),b.processAttributes()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)a=new h({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(a<0){var b=!this.isSignature(0,g.LOCAL_FILE_HEADER);throw b?new Error("Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip : can't find end of central directory")}this.reader.setIndex(a);var c=a;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===f.MAX_VALUE_16BITS||this.diskWithCentralDirStart===f.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===f.MAX_VALUE_16BITS||this.centralDirRecords===f.MAX_VALUE_16BITS||this.centralDirSize===f.MAX_VALUE_32BITS||this.centralDirOffset===f.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),a<0)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(a),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip : can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var e=c-d;if(e>0)this.isSignature(c,g.CENTRAL_FILE_HEADER)||(this.reader.zero=e);else if(e<0)throw new Error("Corrupted zip: missing "+Math.abs(e)+" bytes.")},prepareReader:function(a){this.reader=e(a)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(a,b,c){"use strict";function d(a,b){this.options=a,this.loadOptions=b}var e=a("./reader/readerFor"),f=a("./utils"),g=a("./compressedObject"),h=a("./crc32"),i=a("./utf8"),j=a("./compressions"),k=a("./support"),l=0,m=3,n=function(a){for(var b in j)if(j.hasOwnProperty(b)&&j[b].magic===a)return j[b];return null};d.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readData(this.fileNameLength),a.skip(c),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(b=n(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,b,a.readData(this.compressedSize))},readCentralPart:function(a){this.versionMadeBy=a.readInt(2),a.skip(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4);var b=a.readInt(2);if(this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");a.skip(b),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var a=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),a===l&&(this.dosPermissions=63&this.externalFileAttributes),a===m&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(a){if(this.extraFields[1]){var b=e(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});a.index<e;)b=a.readInt(2),c=a.readInt(2),d=a.readData(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){var a=k.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=i.utf8decode(this.fileName),this.fileCommentStr=i.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(null!==b)this.fileNameStr=b;else{var c=f.transformTo(a,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(c)}var d=this.findExtraFieldUnicodeComment();if(null!==d)this.fileCommentStr=d;else{var e=f.transformTo(a,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(e)}}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=e(a.value);return 1!==b.readInt(1)?null:h(this.fileName)!==b.readInt(4)?null:i.utf8decode(b.readData(a.length-5))}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=e(a.value);return 1!==b.readInt(1)?null:h(this.fileComment)!==b.readInt(4)?null:i.utf8decode(b.readData(a.length-5))}return null}},b.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(a,b,c){"use strict";var d=a("./stream/StreamHelper"),e=a("./stream/DataWorker"),f=a("./utf8"),g=a("./compressedObject"),h=a("./stream/GenericWorker"),i=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this.unixPermissions=c.unixPermissions,this.dosPermissions=c.dosPermissions,this._data=b,this._dataBinary=c.binary,this.options={compression:c.compression,compressionOptions:c.compressionOptions}};i.prototype={internalStream:function(a){var b=a.toLowerCase(),c="string"===b||"text"===b;"binarystring"!==b&&"text"!==b||(b="string");var e=this._decompressWorker(),g=!this._dataBinary;return g&&!c&&(e=e.pipe(new f.Utf8EncodeWorker)),!g&&c&&(e=e.pipe(new f.Utf8DecodeWorker)),new d(e,b,"")},async:function(a,b){return this.internalStream(a).accumulate(b)},nodeStream:function(a,b){return this.internalStream(a||"nodebuffer").toNodejsStream(b)},_compressWorker:function(a,b){if(this._data instanceof g&&this._data.compression.magic===a.magic)return this._data.getCompressedWorker();var c=this._decompressWorker();return this._dataBinary||(c=c.pipe(new f.Utf8EncodeWorker)),g.createWorkerFrom(c,a,b)},_decompressWorker:function(){return this._data instanceof g?this._data.getContentWorker():this._data instanceof h?this._data:new e(this._data)}};for(var j=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},l=0;l<j.length;l++)i.prototype[j[l]]=k;b.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(a,b,c){a("../modules/web.immediate"),b.exports=a("../modules/_core").setImmediate},{"../modules/_core":40,"../modules/web.immediate":56}],37:[function(a,b,c){b.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},{}],38:[function(a,b,c){var d=a("./_is-object");b.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},{"./_is-object":51}],39:[function(a,b,c){var d={}.toString;b.exports=function(a){return d.call(a).slice(8,-1)}},{}],40:[function(a,b,c){var d=b.exports={version:"2.3.0"};"number"==typeof __e&&(__e=d)},{}],41:[function(a,b,c){var d=a("./_a-function");b.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},{"./_a-function":37}],42:[function(a,b,c){b.exports=!a("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":45}],43:[function(a,b,c){var d=a("./_is-object"),e=a("./_global").document,f=d(e)&&d(e.createElement);b.exports=function(a){return f?e.createElement(a):{}}},{"./_global":46,"./_is-object":51}],44:[function(a,b,c){var d=a("./_global"),e=a("./_core"),f=a("./_ctx"),g=a("./_hide"),h="prototype",i=function(a,b,c){var j,k,l,m=a&i.F,n=a&i.G,o=a&i.S,p=a&i.P,q=a&i.B,r=a&i.W,s=n?e:e[b]||(e[b]={}),t=s[h],u=n?d:o?d[b]:(d[b]||{})[h];n&&(c=b);for(j in c)k=!m&&u&&void 0!==u[j],k&&j in s||(l=k?u[j]:c[j],s[j]=n&&"function"!=typeof u[j]?c[j]:q&&k?f(l,d):r&&u[j]==l?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[h]=a[h],b}(l):p&&"function"==typeof l?f(Function.call,l):l,p&&((s.virtual||(s.virtual={}))[j]=l,a&i.R&&t&&!t[j]&&g(t,j,l)))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,b.exports=i},{"./_core":40,"./_ctx":41,"./_global":46,"./_hide":47}],45:[function(a,b,c){b.exports=function(a){try{return!!a()}catch(b){return!0}}},{}],46:[function(a,b,c){var d=b.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=d)},{}],47:[function(a,b,c){var d=a("./_object-dp"),e=a("./_property-desc");b.exports=a("./_descriptors")?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},{"./_descriptors":42,"./_object-dp":52,"./_property-desc":53}],48:[function(a,b,c){b.exports=a("./_global").document&&document.documentElement},{"./_global":46}],49:[function(a,b,c){b.exports=!a("./_descriptors")&&!a("./_fails")(function(){return 7!=Object.defineProperty(a("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":42,"./_dom-create":43,"./_fails":45}],50:[function(a,b,c){b.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},{}],51:[function(a,b,c){b.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},{}],52:[function(a,b,c){var d=a("./_an-object"),e=a("./_ie8-dom-define"),f=a("./_to-primitive"),g=Object.defineProperty;c.f=a("./_descriptors")?Object.defineProperty:function(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},{"./_an-object":38,"./_descriptors":42,"./_ie8-dom-define":49,"./_to-primitive":55}],53:[function(a,b,c){b.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},{}],54:[function(a,b,c){var d,e,f,g=a("./_ctx"),h=a("./_invoke"),i=a("./_html"),j=a("./_dom-create"),k=a("./_global"),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==a("./_cof")(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),b.exports={set:m,clear:n}},{"./_cof":39,"./_ctx":41,"./_dom-create":43,"./_global":46,"./_html":48,"./_invoke":50}],55:[function(a,b,c){var d=a("./_is-object");b.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":51}],56:[function(a,b,c){var d=a("./_export"),e=a("./_task");d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},{"./_export":44,"./_task":54}],57:[function(a,b,c){(function(a){"use strict";function c(){k=!0;for(var a,b,c=l.length;c;){for(b=l,l=[],a=-1;++a<c;)b[a]();c=l.length}k=!1}function d(a){1!==l.push(a)||k||e()}var e,f=a.MutationObserver||a.WebKitMutationObserver;if(f){var g=0,h=new f(c),i=a.document.createTextNode("");h.observe(i,{characterData:!0}),e=function(){i.data=g=++g%2}}else if(a.setImmediate||"undefined"==typeof a.MessageChannel)e="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var b=a.document.createElement("script");b.onreadystatechange=function(){c(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},a.document.documentElement.appendChild(b)}:function(){setTimeout(c,0)};else{var j=new a.MessageChannel;j.port1.onmessage=c,e=function(){j.port2.postMessage(0)}}var k,l=[];b.exports=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],58:[function(a,b,c){"use strict";function d(){}function e(a){if("function"!=typeof a)throw new TypeError("resolver must be a function");this.state=s,this.queue=[],this.outcome=void 0,a!==d&&i(this,a)}function f(a,b,c){this.promise=a,"function"==typeof b&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),"function"==typeof c&&(this.onRejected=c,this.callRejected=this.otherCallRejected)}function g(a,b,c){o(function(){var d;try{d=b(c)}catch(e){return p.reject(a,e)}d===a?p.reject(a,new TypeError("Cannot resolve promise with itself")):p.resolve(a,d)})}function h(a){var b=a&&a.then;if(a&&"object"==typeof a&&"function"==typeof b)return function(){b.apply(a,arguments)}}function i(a,b){function c(b){f||(f=!0,p.reject(a,b))}function d(b){f||(f=!0,p.resolve(a,b))}function e(){b(d,c)}var f=!1,g=j(e);"error"===g.status&&c(g.value)}function j(a,b){var c={};try{c.value=a(b),c.status="success"}catch(d){c.status="error",c.value=d}return c}function k(a){return a instanceof this?a:p.resolve(new this(d),a)}function l(a){var b=new this(d);return p.reject(b,a)}function m(a){function b(a,b){function d(a){g[b]=a,++h!==e||f||(f=!0,p.resolve(j,g))}c.resolve(a).then(d,function(a){f||(f=!0,p.reject(j,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=new Array(e),h=0,i=-1,j=new this(d);++i<e;)b(a[i],i);return j}function n(a){function b(a){c.resolve(a).then(function(a){f||(f=!0,p.resolve(h,a))},function(a){f||(f=!0,p.reject(h,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=-1,h=new this(d);++g<e;)b(a[g]);return h}var o=a("immediate"),p={},q=["REJECTED"],r=["FULFILLED"],s=["PENDING"];b.exports=e,e.prototype["catch"]=function(a){return this.then(null,a)},e.prototype.then=function(a,b){if("function"!=typeof a&&this.state===r||"function"!=typeof b&&this.state===q)return this;var c=new this.constructor(d);if(this.state!==s){var e=this.state===r?a:b;g(c,e,this.outcome)}else this.queue.push(new f(c,a,b));return c},f.prototype.callFulfilled=function(a){p.resolve(this.promise,a)},f.prototype.otherCallFulfilled=function(a){g(this.promise,this.onFulfilled,a)},f.prototype.callRejected=function(a){p.reject(this.promise,a)},f.prototype.otherCallRejected=function(a){g(this.promise,this.onRejected,a)},p.resolve=function(a,b){var c=j(h,b);if("error"===c.status)return p.reject(a,c.value);var d=c.value;if(d)i(a,d);else{a.state=r,a.outcome=b;for(var e=-1,f=a.queue.length;++e<f;)a.queue[e].callFulfilled(b)}return a},p.reject=function(a,b){a.state=q,a.outcome=b;for(var c=-1,d=a.queue.length;++c<d;)a.queue[c].callRejected(b);return a},e.resolve=k,e.reject=l,e.all=m,e.race=n},{immediate:57}],59:[function(a,b,c){"use strict";var d=a("./lib/utils/common").assign,e=a("./lib/deflate"),f=a("./lib/inflate"),g=a("./lib/zlib/constants"),h={};d(h,e,f,g),b.exports=h},{"./lib/deflate":60,"./lib/inflate":61,"./lib/utils/common":62,"./lib/zlib/constants":65}],60:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=i.assign({level:s,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:t,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=h.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==p)throw new Error(k[c]);if(b.header&&h.deflateSetHeader(this.strm,b.header),b.dictionary){var e;if(e="string"==typeof b.dictionary?j.string2buf(b.dictionary):"[object ArrayBuffer]"===m.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary,c=h.deflateSetDictionary(this.strm,e),c!==p)throw new Error(k[c]);this._dict_set=!0}}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}function g(a,b){return b=b||{},b.gzip=!0,e(a,b)}var h=a("./zlib/deflate"),i=a("./utils/common"),j=a("./utils/strings"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=Object.prototype.toString,n=0,o=4,p=0,q=1,r=2,s=-1,t=0,u=8;d.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?o:n,"string"==typeof a?e.input=j.string2buf(a):"[object ArrayBuffer]"===m.call(a)?e.input=new Uint8Array(a):e.input=a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new i.Buf8(f),e.next_out=0,e.avail_out=f),c=h.deflate(e,d),c!==q&&c!==p)return this.onEnd(c),this.ended=!0,!1;0!==e.avail_out&&(0!==e.avail_in||d!==o&&d!==r)||("string"===this.options.to?this.onData(j.buf2binstring(i.shrinkBuf(e.output,e.next_out))):this.onData(i.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||0===e.avail_out)&&c!==q);return d===o?(c=h.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===p):d!==r||(this.onEnd(p),e.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=d,c.deflate=e,c.deflateRaw=f,c.gzip=g},{"./utils/common":62,"./utils/strings":63,"./zlib/deflate":67,"./zlib/messages":72,"./zlib/zstream":74}],61:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=g.inflateInit2(this.strm,b.windowBits);if(c!==j.Z_OK)throw new Error(k[c]);this.header=new m,g.inflateGetHeader(this.strm,this.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}var g=a("./zlib/inflate"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/constants"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=a("./zlib/gzheader"),n=Object.prototype.toString;d.prototype.push=function(a,b){var c,d,e,f,k,l,m=this.strm,o=this.options.chunkSize,p=this.options.dictionary,q=!1;if(this.ended)return!1;d=b===~~b?b:b===!0?j.Z_FINISH:j.Z_NO_FLUSH,"string"==typeof a?m.input=i.binstring2buf(a):"[object ArrayBuffer]"===n.call(a)?m.input=new Uint8Array(a):m.input=a,m.next_in=0,m.avail_in=m.input.length;do{if(0===m.avail_out&&(m.output=new h.Buf8(o),m.next_out=0,m.avail_out=o),c=g.inflate(m,j.Z_NO_FLUSH),c===j.Z_NEED_DICT&&p&&(l="string"==typeof p?i.string2buf(p):"[object ArrayBuffer]"===n.call(p)?new Uint8Array(p):p,c=g.inflateSetDictionary(this.strm,l)),c===j.Z_BUF_ERROR&&q===!0&&(c=j.Z_OK,q=!1),c!==j.Z_STREAM_END&&c!==j.Z_OK)return this.onEnd(c),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&c!==j.Z_STREAM_END&&(0!==m.avail_in||d!==j.Z_FINISH&&d!==j.Z_SYNC_FLUSH)||("string"===this.options.to?(e=i.utf8border(m.output,m.next_out),f=m.next_out-e,k=i.buf2string(m.output,e),m.next_out=f,m.avail_out=o-f,f&&h.arraySet(m.output,m.output,e,f,0),this.onData(k)):this.onData(h.shrinkBuf(m.output,m.next_out)))),0===m.avail_in&&0===m.avail_out&&(q=!0)}while((m.avail_in>0||0===m.avail_out)&&c!==j.Z_STREAM_END);return c===j.Z_STREAM_END&&(d=j.Z_FINISH),d===j.Z_FINISH?(c=g.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===j.Z_OK):d!==j.Z_SYNC_FLUSH||(this.onEnd(j.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===j.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=d,c.inflate=e,c.inflateRaw=f,c.ungzip=e},{"./utils/common":62,"./utils/strings":63,"./zlib/constants":65,"./zlib/gzheader":68,"./zlib/inflate":70,"./zlib/messages":72,"./zlib/zstream":74}],62:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;f<d;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;b<c;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;b<c;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;f<d;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],63:[function(a,b,c){"use strict";function d(a,b){if(b<65537&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;d<b;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;j<256;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;f<h;f++)c=a.charCodeAt(f),55296===(64512&c)&&f+1<h&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=c<128?1:c<2048?2:c<65536?3:4;for(b=new e.Buf8(i),g=0,f=0;g<i;f++)c=a.charCodeAt(f),55296===(64512&c)&&f+1<h&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),c<128?b[g++]=c:c<2048?(b[g++]=192|c>>>6,b[g++]=128|63&c):c<65536?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;c<d;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;c<h;)if(f=a[c++],f<128)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&c<h;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:f<65536?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return c<0?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":62}],64:[function(a,b,c){"use strict";function d(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=d},{}],65:[function(a,b,c){"use strict";b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],66:[function(a,b,c){"use strict";function d(){ +for(var a,b=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=f,g=d+c;a^=-1;for(var h=d;h<g;h++)a=a>>>8^e[255&(a^b[h])];return a^-1}var f=d();b.exports=e},{}],67:[function(a,b,c){"use strict";function d(a,b){return a.msg=I[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(E.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){F._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,E.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=G(a.adler,b,e,c):2===a.state.wrap&&(a.adler=H(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-la?a.strstart-(a.w_size-la):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ka,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&f<m);if(d=ka-(m-f),f=m-ka,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-la)){E.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ja)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+ja-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<ja)););}while(a.lookahead<la&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===J)return ua;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return ua;if(a.strstart-a.block_start>=a.w_size-la&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?ua:ua}function o(a,b){for(var c,d;;){if(a.lookahead<la){if(m(a),a.lookahead<la&&b===J)return ua;if(0===a.lookahead)break}if(c=0,a.lookahead>=ja&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-la&&(a.match_length=l(a,c)),a.match_length>=ja)if(d=F._tr_tally(a,a.strstart-a.match_start,a.match_length-ja),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ja){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=a.strstart<ja-1?a.strstart:ja-1,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function p(a,b){for(var c,d,e;;){if(a.lookahead<la){if(m(a),a.lookahead<la&&b===J)return ua;if(0===a.lookahead)break}if(c=0,a.lookahead>=ja&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=ja-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-la&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===U||a.match_length===ja&&a.strstart-a.match_start>4096)&&(a.match_length=ja-1)),a.prev_length>=ja&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ja,d=F._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ja),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=ja-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return ua}else if(a.match_available){if(d=F._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return ua}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=F._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<ja-1?a.strstart:ja-1,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ka){if(m(a),a.lookahead<=ka&&b===J)return ua;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=ja&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ka;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&e<f);a.match_length=ka-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ja?(c=F._tr_tally(a,1,a.match_length-ja),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===J)return ua;break}if(a.match_length=0,c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function s(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e}function t(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=D[a.level].max_lazy,a.good_match=D[a.level].good_length,a.nice_match=D[a.level].nice_length,a.max_chain_length=D[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ja-1,a.match_available=0,a.ins_h=0}function u(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E.Buf16(2*ha),this.dyn_dtree=new E.Buf16(2*(2*fa+1)),this.bl_tree=new E.Buf16(2*(2*ga+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E.Buf16(ia+1),this.heap=new E.Buf16(2*ea+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E.Buf16(2*ea+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=Z,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?na:sa,a.adler=2===b.wrap?0:1,b.last_flush=J,F._tr_init(b),O):d(a,Q)}function w(a){var b=v(a);return b===O&&t(a.state),b}function x(a,b){return a&&a.state?2!==a.state.wrap?Q:(a.state.gzhead=b,O):Q}function y(a,b,c,e,f,g){if(!a)return Q;var h=1;if(b===T&&(b=6),e<0?(h=0,e=-e):e>15&&(h=2,e-=16),f<1||f>_||c!==$||e<8||e>15||b<0||b>9||g<0||g>X)return d(a,Q);8===e&&(e=9);var i=new u;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+ja-1)/ja),i.window=new E.Buf8(2*i.w_size),i.head=new E.Buf16(i.hash_size),i.prev=new E.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new E.Buf8(i.pending_buf_size),i.d_buf=1*i.lit_bufsize,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,w(a)}function z(a,b){return y(a,b,$,aa,ba,Y)}function A(a,b){var c,h,k,l;if(!a||!a.state||b>N||b<0)return a?d(a,Q):Q;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ta&&b!==M)return d(a,0===a.avail_out?S:Q);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===na)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=H(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=oa):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,ya),h.status=sa);else{var m=$+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=V||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ma),m+=31-m%31,h.status=sa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===oa)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=pa)}else h.status=pa;if(h.status===pa)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=qa)}else h.status=qa;if(h.status===qa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=ra)}else h.status=ra;if(h.status===ra&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=sa)):h.status=sa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,O}else if(0===a.avail_in&&e(b)<=e(c)&&b!==M)return d(a,S);if(h.status===ta&&0!==a.avail_in)return d(a,S);if(0!==a.avail_in||0!==h.lookahead||b!==J&&h.status!==ta){var o=h.strategy===V?r(h,b):h.strategy===W?q(h,b):D[h.level].func(h,b);if(o!==wa&&o!==xa||(h.status=ta),o===ua||o===wa)return 0===a.avail_out&&(h.last_flush=-1),O;if(o===va&&(b===K?F._tr_align(h):b!==N&&(F._tr_stored_block(h,0,0,!1),b===L&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,O}return b!==M?O:h.wrap<=0?P:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?O:P)}function B(a){var b;return a&&a.state?(b=a.state.status,b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra&&b!==sa&&b!==ta?d(a,Q):(a.state=null,b===sa?d(a,R):O)):Q}function C(a,b){var c,d,e,g,h,i,j,k,l=b.length;if(!a||!a.state)return Q;if(c=a.state,g=c.wrap,2===g||1===g&&c.status!==na||c.lookahead)return Q;for(1===g&&(a.adler=G(a.adler,b,l,0)),c.wrap=0,l>=c.w_size&&(0===g&&(f(c.head),c.strstart=0,c.block_start=0,c.insert=0),k=new E.Buf8(c.w_size),E.arraySet(k,b,l-c.w_size,c.w_size,0),b=k,l=c.w_size),h=a.avail_in,i=a.next_in,j=a.input,a.avail_in=l,a.next_in=0,a.input=b,m(c);c.lookahead>=ja;){d=c.strstart,e=c.lookahead-(ja-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[d+ja-1])&c.hash_mask,c.prev[d&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=d,d++;while(--e);c.strstart=d,c.lookahead=ja-1,m(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=ja-1,c.match_available=0,a.next_in=i,a.input=j,a.avail_in=h,c.wrap=g,O}var D,E=a("../utils/common"),F=a("./trees"),G=a("./adler32"),H=a("./crc32"),I=a("./messages"),J=0,K=1,L=3,M=4,N=5,O=0,P=1,Q=-2,R=-3,S=-5,T=-1,U=1,V=2,W=3,X=4,Y=0,Z=2,$=8,_=9,aa=15,ba=8,ca=29,da=256,ea=da+1+ca,fa=30,ga=19,ha=2*ea+1,ia=15,ja=3,ka=258,la=ka+ja+1,ma=32,na=42,oa=69,pa=73,qa=91,ra=103,sa=113,ta=666,ua=1,va=2,wa=3,xa=4,ya=3;D=[new s(0,0,0,0,n),new s(4,4,8,4,o),new s(4,5,16,8,o),new s(4,6,32,32,o),new s(4,4,16,16,p),new s(8,16,32,32,p),new s(8,16,128,128,p),new s(8,32,128,256,p),new s(32,128,258,1024,p),new s(32,258,258,4096,p)],c.deflateInit=z,c.deflateInit2=y,c.deflateReset=w,c.deflateResetKeep=v,c.deflateSetHeader=x,c.deflate=A,c.deflateEnd=B,c.deflateSetDictionary=C,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":62,"./adler32":64,"./crc32":66,"./messages":72,"./trees":73}],68:[function(a,b,c){"use strict";function d(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=d},{}],69:[function(a,b,c){"use strict";var d=30,e=12;b.exports=function(a,b){var c,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;c=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=c.dmax,l=c.wsize,m=c.whave,n=c.wnext,o=c.window,p=c.hold,q=c.bits,r=c.lencode,s=c.distcode,t=(1<<c.lenbits)-1,u=(1<<c.distbits)-1;a:do{q<15&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){c.mode=e;break a}a.msg="invalid literal/length code",c.mode=d;break a}x=65535&v,w&=15,w&&(q<w&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),q<15&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",c.mode=d;break a}if(y=65535&v,w&=15,q<w&&(p+=B[f++]<<q,q+=8,q<w&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",c.mode=d;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&c.sane){a.msg="invalid distance too far back",c.mode=d;break a}if(z=0,A=o,0===n){if(z+=l-w,w<x){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(n<w){if(z+=l+n-w,w-=n,w<x){x-=w;do C[h++]=o[z++];while(--w);if(z=0,n<x){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,w<x){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(f<g&&h<j);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=f<g?5+(g-f):5-(f-g),a.avail_out=h<j?257+(j-h):257-(h-j),c.hold=p,c.bits=q}},{}],70:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=L,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new s.Buf32(pa),b.distcode=b.distdyn=new s.Buf32(qa),b.sane=1,b.back=-1,D):G}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):G}function h(a,b){var c,d;return a&&a.state?(d=a.state,b<0?(c=0,b=-b):(c=(b>>4)+1,b<48&&(b&=15)),b&&(b<8||b>15)?G:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):G}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==D&&(a.state=null),c):G}function j(a){return i(a,sa)}function k(a){if(ta){var b;for(q=new s.Buf32(512),r=new s.Buf32(32),b=0;b<144;)a.lens[b++]=8;for(;b<256;)a.lens[b++]=9;for(;b<280;)a.lens[b++]=7;for(;b<288;)a.lens[b++]=8;for(w(y,a.lens,0,288,q,0,a.work,{bits:9}),b=0;b<32;)a.lens[b++]=5;w(z,a.lens,0,32,r,0,a.work,{bits:5}),ta=!1}a.lencode=q,a.lenbits=9,a.distcode=r,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new s.Buf8(f.wsize)),d>=f.wsize?(s.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),s.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(s.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,r,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa=0,Ba=new s.Buf8(4),Ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return G;c=a.state,c.mode===W&&(c.mode=X),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xa=D;a:for(;;)switch(c.mode){case L:if(0===c.wrap){c.mode=X;break}for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0),m=0,n=0,c.mode=M;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=ma;break}if((15&m)!==K){a.msg="unknown compression method",c.mode=ma;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=ma;break}c.dmax=1<<wa,a.adler=c.check=1,c.mode=512&m?U:W,m=0,n=0;break;case M:for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==K){a.msg="unknown compression method",c.mode=ma;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=ma;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=N;case N:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=u(c.check,Ba,4,0)),m=0,n=0,c.mode=O;case O:for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=P;case P:if(1024&c.flags){for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=Q;case Q:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),s.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=R;case R:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&q<i);if(512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=S;case S:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&q<i);if(512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=T;case T:if(512&c.flags){for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=ma;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=W;break;case U:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=V;case V:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,F;a.adler=c.check=1,c.mode=W;case W:if(b===B||b===C)break a;case X:if(c.last){m>>>=7&n,n-=7&n,c.mode=ja;break}for(;n<3;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=Y;break;case 1:if(k(c),c.mode=ca,b===C){m>>>=2,n-=2;break a}break;case 2:c.mode=_;break;case 3:a.msg="invalid block type",c.mode=ma}m>>>=2,n-=2;break;case Y:for(m>>>=7&n,n-=7&n;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=ma;break}if(c.length=65535&m,m=0,n=0,c.mode=Z,b===C)break a;case Z:c.mode=$;case $:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;s.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=W;break;case _:for(;n<14;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=ma;break}c.have=0,c.mode=aa;case aa:for(;c.have<c.ncode;){for(;n<3;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Ca[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=w(x,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=ma;break}c.have=0,c.mode=ba;case ba:for(;c.have<c.nlen+c.ndist;){for(;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(sa<16)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=ma;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=ma;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===ma)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=ma;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=w(y,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=ma;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=w(z,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=ma;break}if(c.mode=ca,b===C)break a;case ca:c.mode=da;case da:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,v(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===W&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(ra&&0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.lencode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ia;break}if(32&ra){c.back=-1,c.mode=W;break}if(64&ra){a.msg="invalid literal/length code",c.mode=ma;break}c.extra=15&ra,c.mode=ea;case ea:if(c.extra){for(za=c.extra;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=fa;case fa:for(;Aa=c.distcode[m&(1<<c.distbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.distcode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=ma;break}c.offset=sa,c.extra=15&ra,c.mode=ga;case ga:if(c.extra){for(za=c.extra;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=ma;break}c.mode=ha;case ha:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=ma;break}q>c.wnext?(q-=c.wnext,r=c.wsize-q):r=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,r=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[r++];while(--q);0===c.length&&(c.mode=da);break;case ia:if(0===j)break a;f[h++]=c.length,j--,c.mode=da;break;case ja:if(c.wrap){for(;n<32;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?u(c.check,f,p,h-p):t(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=ma;break}m=0,n=0}c.mode=ka;case ka:if(c.wrap&&c.flags){for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=ma;break}m=0,n=0}c.mode=la;case la:xa=E;break a;case ma:xa=H;break a;case na:return I;case oa:default:return G}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<ma&&(c.mode<ja||b!==A))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=na,I):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?u(c.check,f,p,a.next_out-p):t(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===W?128:0)+(c.mode===ca||c.mode===Z?256:0),(0===o&&0===p||b===A)&&xa===D&&(xa=J),xa)}function n(a){if(!a||!a.state)return G;var b=a.state;return b.window&&(b.window=null),a.state=null,D}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?G:(c.head=b,b.done=!1,D)):G}function p(a,b){var c,d,e,f=b.length;return a&&a.state?(c=a.state,0!==c.wrap&&c.mode!==V?G:c.mode===V&&(d=1,d=t(d,b,f,0),d!==c.check)?H:(e=l(a,b,f,f))?(c.mode=na,I):(c.havedict=1,D)):G}var q,r,s=a("../utils/common"),t=a("./adler32"),u=a("./crc32"),v=a("./inffast"),w=a("./inftrees"),x=0,y=1,z=2,A=4,B=5,C=6,D=0,E=1,F=2,G=-2,H=-3,I=-4,J=-5,K=8,L=1,M=2,N=3,O=4,P=5,Q=6,R=7,S=8,T=9,U=10,V=11,W=12,X=13,Y=14,Z=15,$=16,_=17,aa=18,ba=19,ca=20,da=21,ea=22,fa=23,ga=24,ha=25,ia=26,ja=27,ka=28,la=29,ma=30,na=31,oa=32,pa=852,qa=592,ra=15,sa=ra,ta=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateSetDictionary=p,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":62,"./adler32":64,"./crc32":66,"./inffast":69,"./inftrees":71}],71:[function(a,b,c){"use strict";var d=a("../utils/common"),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;D<=e;D++)P[D]=0;for(E=0;E<o;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;F<G&&0===P[F];F++);for(H<F&&(H=F),K=1,D=1;D<=e;D++)if(K<<=1,K-=P[D],K<0)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;D<e;D++)Q[D+1]=Q[D]+P[D];for(E=0;E<o;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===i&&L>f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;I+J<G&&(K-=P[I+J],!(K<=0));)I++,K<<=1;if(L+=1<<I,a===i&&L>f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":62}],72:[function(a,b,c){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],73:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length}function f(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b}function g(a){return a<256?ia[a]:ia[256+(a>>>7)]}function h(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function i(a,b,c){a.bi_valid>X-c?(a.bi_buf|=b<<a.bi_valid&65535,h(a,a.bi_buf),a.bi_buf=b>>X-a.bi_valid,a.bi_valid+=c-X):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function j(a,b,c){i(a,c[2*b],c[2*b+1])}function k(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function l(a){16===a.bi_valid?(h(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function m(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;f<=W;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;c<V;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function n(a,b,c){var d,e,f=new Array(W+1),g=0; +for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2*e]=k(f[h]++,h))}}function o(){var a,b,c,d,f,g=new Array(W+1);for(c=0,d=0;d<Q-1;d++)for(ka[d]=c,a=0;a<1<<ba[d];a++)ja[c++]=d;for(ja[c-1]=d,f=0,d=0;d<16;d++)for(la[d]=f,a=0;a<1<<ca[d];a++)ia[f++]=d;for(f>>=7;d<T;d++)for(la[d]=f<<7,a=0;a<1<<ca[d]-7;a++)ia[256+f++]=d;for(b=0;b<=W;b++)g[b]=0;for(a=0;a<=143;)ga[2*a+1]=8,a++,g[8]++;for(;a<=255;)ga[2*a+1]=9,a++,g[9]++;for(;a<=279;)ga[2*a+1]=7,a++,g[7]++;for(;a<=287;)ga[2*a+1]=8,a++,g[8]++;for(n(ga,S+1,g),a=0;a<T;a++)ha[2*a+1]=5,ha[2*a]=k(a,5);ma=new e(ga,ba,R+1,S,W),na=new e(ha,ca,0,T,W),oa=new e(new Array(0),da,0,U,Y)}function p(a){var b;for(b=0;b<S;b++)a.dyn_ltree[2*b]=0;for(b=0;b<T;b++)a.dyn_dtree[2*b]=0;for(b=0;b<U;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*Z]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function q(a){a.bi_valid>8?h(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function r(a,b,c,d){q(a),d&&(h(a,c),h(a,~c)),G.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function s(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function t(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&s(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!s(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function u(a,b,c){var d,e,f,h,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],e=a.pending_buf[a.l_buf+k],k++,0===d?j(a,e,b):(f=ja[e],j(a,f+R+1,b),h=ba[f],0!==h&&(e-=ka[f],i(a,e,h)),d--,f=g(d),j(a,f,c),h=ca[f],0!==h&&(d-=la[f],i(a,d,h)));while(k<a.last_lit);j(a,Z,b)}function v(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=V,c=0;c<i;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=j<2?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)t(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],t(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,t(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],m(a,b),n(f,j,a.bl_count)}function w(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;d<=c;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(h<j?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*$]++):h<=10?a.bl_tree[2*_]++:a.bl_tree[2*aa]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function x(a,b,c){var d,e,f=-1,g=b[1],h=0,k=7,l=4;for(0===g&&(k=138,l=3),d=0;d<=c;d++)if(e=g,g=b[2*(d+1)+1],!(++h<k&&e===g)){if(h<l){do j(a,e,a.bl_tree);while(0!==--h)}else 0!==e?(e!==f&&(j(a,e,a.bl_tree),h--),j(a,$,a.bl_tree),i(a,h-3,2)):h<=10?(j(a,_,a.bl_tree),i(a,h-3,3)):(j(a,aa,a.bl_tree),i(a,h-11,7));h=0,f=e,0===g?(k=138,l=3):e===g?(k=6,l=3):(k=7,l=4)}}function y(a){var b;for(w(a,a.dyn_ltree,a.l_desc.max_code),w(a,a.dyn_dtree,a.d_desc.max_code),v(a,a.bl_desc),b=U-1;b>=3&&0===a.bl_tree[2*ea[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function z(a,b,c,d){var e;for(i(a,b-257,5),i(a,c-1,5),i(a,d-4,4),e=0;e<d;e++)i(a,a.bl_tree[2*ea[e]+1],3);x(a,a.dyn_ltree,b-1),x(a,a.dyn_dtree,c-1)}function A(a){var b,c=4093624447;for(b=0;b<=31;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return I;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return J;for(b=32;b<R;b++)if(0!==a.dyn_ltree[2*b])return J;return I}function B(a){pa||(o(),pa=!0),a.l_desc=new f(a.dyn_ltree,ma),a.d_desc=new f(a.dyn_dtree,na),a.bl_desc=new f(a.bl_tree,oa),a.bi_buf=0,a.bi_valid=0,p(a)}function C(a,b,c,d){i(a,(L<<1)+(d?1:0),3),r(a,b,c,!0)}function D(a){i(a,M<<1,3),j(a,Z,ga),l(a)}function E(a,b,c,d){var e,f,g=0;a.level>0?(a.strm.data_type===K&&(a.strm.data_type=A(a)),v(a,a.l_desc),v(a,a.d_desc),g=y(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,f<=e&&(e=f)):e=f=c+5,c+4<=e&&b!==-1?C(a,b,c,d):a.strategy===H||f===e?(i(a,(M<<1)+(d?1:0),3),u(a,ga,ha)):(i(a,(N<<1)+(d?1:0),3),z(a,a.l_desc.max_code+1,a.d_desc.max_code+1,g+1),u(a,a.dyn_ltree,a.dyn_dtree)),p(a),d&&q(a)}function F(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ja[c]+R+1)]++,a.dyn_dtree[2*g(b)]++),a.last_lit===a.lit_bufsize-1}var G=a("../utils/common"),H=4,I=0,J=1,K=2,L=0,M=1,N=2,O=3,P=258,Q=29,R=256,S=R+1+Q,T=30,U=19,V=2*S+1,W=15,X=16,Y=7,Z=256,$=16,_=17,aa=18,ba=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ca=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],da=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fa=512,ga=new Array(2*(S+2));d(ga);var ha=new Array(2*T);d(ha);var ia=new Array(fa);d(ia);var ja=new Array(P-O+1);d(ja);var ka=new Array(Q);d(ka);var la=new Array(T);d(la);var ma,na,oa,pa=!1;c._tr_init=B,c._tr_stored_block=C,c._tr_flush_block=E,c._tr_tally=F,c._tr_align=D},{"../utils/common":62}],74:[function(a,b,c){"use strict";function d(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=d},{}]},{},[10])(10)}); diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js index cf0217c01bb0cc1a44c1d7c0925e7215d6de1371..7670927fc5bd05a6728598a294dd3194db6e750b 100644 --- a/src/main/webapp/js/mxgraph/Graph.js +++ b/src/main/webapp/js/mxgraph/Graph.js @@ -5722,7 +5722,7 @@ if (typeof mxVertexHandler != 'undefined') alt.setAttribute('text-decoration', 'underline'); } - mxUtils.write(alt, str); + alt.innerHTML = str; return alt; } diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js index 9c04d55c50b142f65b07dfd54dc24410565d9f64..ae3b31b7287393b66379dfb94ae4c2fc7d5a70fc 100644 --- a/src/main/webapp/js/reader.min.js +++ b/src/main/webapp/js/reader.min.js @@ -184,7 +184,7 @@ f)+"\n"+u+"}":"{"+z.join(",")+"}";f=u;return l}}"function"!==typeof Date.prototy e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})}); "function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.0.9",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& +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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.1.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -322,7 +322,7 @@ function mxUndoableEdit(a,b){this.source=a;this.changes=[];this.significant=null mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){};mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var b=this.changes[a];null!=b.execute?b.execute():null!=b.undo&&b.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",b))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()}; mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,b=0;b<a;b++){var c=this.changes[b];null!=c.execute?c.execute():null!=c.redo&&c.redo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",c))}this.undone=!1;this.redone=!0;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0; mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null;mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl}; -mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)}; +mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&"file://"!=a.substring(0,7)}; mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a}; function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.stop()});mxEvent.addListener(document,"mouseup",this.mouseUpListener);var b=mxUtils.bind(this, function(){this.scrollbars=mxUtils.hasScrollbars(a.container);this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;this.scrollbars?(a.panGraph(-a.container.scrollLeft-Math.ceil(this.dx),-a.container.scrollTop-Math.ceil(this.dy)),a.panDx=this.scrollLeft-a.container.scrollLeft,a.panDy=this.scrollTop-a.container.scrollTop,a.fireEvent(new mxEventObject(mxEvent.PAN))):a.panGraph(this.getDx(), @@ -1685,7 +1685,7 @@ return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform", "translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,v){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/ 2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline"); -mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas= +r.innerHTML=f;return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas= function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b= window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)}; Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b; diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js index d66c63a85e364b5225847e548b11a69028ba8398..ae751d1eda7a557f59ae532b3be243ea3def95bf 100644 --- a/src/main/webapp/js/viewer.min.js +++ b/src/main/webapp/js/viewer.min.js @@ -317,7 +317,7 @@ mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this. mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))}; mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null; mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a}; -mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)}; +mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&"file://"!=a.substring(0,7)}; mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a}; function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.stop()});mxEvent.addListener(document,"mouseup",this.mouseUpListener);var b=mxUtils.bind(this, function(){this.scrollbars=mxUtils.hasScrollbars(a.container);this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;this.scrollbars?(a.panGraph(-a.container.scrollLeft-Math.ceil(this.dx),-a.container.scrollTop-Math.ceil(this.dy)),a.panDx=this.scrollLeft-a.container.scrollLeft,a.panDy=this.scrollTop-a.container.scrollTop,a.fireEvent(new mxEventObject(mxEvent.PAN))):a.panGraph(this.getDx(), @@ -1945,8 +1945,8 @@ b,d,e){0>a&&(a=0);6<a&&(a=6);0>b&&(b=0);1<b&&(b=1);0>d&&(d=0);1<d&&(d=1);this.rg 0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/ 255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),y=!1,A=!1,z=1,v=2,B=4,C=8;u&&(q=function(){r.fromString(u.value,z);p()},jscolor.addEvent(u,"keyup", q),jscolor.addEvent(u,"input",q),jscolor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,color:x.style.color});switch(t){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}jscolor.requireImage("cross.gif");jscolor.requireImage("arrow.gif");this.importColor()}};jscolor.install(); -Editor=function(a,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus= -function(){return this.status};this.graphChangeListener=function(a,d){var b=null!=d?d.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; +Editor=function(a,b,e,c,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=c||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus= +function(){return this.status};this.graphChangeListener=function(a,c){var b=null!=c?c.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; (function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS; Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ5NeoVcKDAZs+//PXLKI8YKlWvaRU7jXuFpb9qsbdK05XILUiE8JHQox1Pv3OgFUzf1AGqWqUg+QBwLF0YAeegBlCNgRWOpB5vUfTCmeoHQ/wNdy0jLH/cM+b+wLTw4n/7ACEmHVVy8h6qy8V7MNcGowWpsNbvUFcGUEdSi1s/oAAAAASUVORK5CYII=":IMAGE_PATH+ "/help.png"; @@ -1965,7 +1965,7 @@ Editor.editLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAgM Editor.nextLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlMA7fci493c0MW8uJ6CZks4MxQHEZL6ewAAAFRJREFUOMvd0skRgCAQBVEFwQ0V7fxzNQP6wI05v6pZ/kyj1b7FNgik2gQzzLcAwiUAigHOTwDHK4A1CmB5BJANJG1hQ9qafYcqFlZP3IFc9eVGrR+iIgkDQRUXIAAAAABJRU5ErkJggg==";Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO; Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title; Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.init=function(){};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a}; -Editor.prototype.editAsNew=function(a,b){var e=null!=b?"?title="+encodeURIComponent(b):"";null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(d){"ready"==d.data&&d.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=window.open(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"))): +Editor.prototype.editAsNew=function(a,b){var e=null!=b?"?title="+encodeURIComponent(b):"";null==this.editorWindow||this.editorWindow.closed?"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?(null==this.editorWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(c){"ready"==c.data&&c.source==this.editorWindow&&this.editorWindow.postMessage(a,"*")})),this.editorWindow=window.open(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"))): this.editorWindow=window.open(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a)):this.editorWindow.focus()};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e}; Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!this.chromeless||"1"==urlParams.grid;this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=this.graph.defaultGraphBackground;this.graph.pageScale= mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.updateGraphComponents();this.graph.view.setScale(1)}; @@ -1977,14 +1977,14 @@ this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView")) Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize", this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width); a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a}; -Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],r=0;r<e.length;r++)(k.isVertex(e[r])||k.isEdge(e[r]))&&null!=a.view.getState(e[r])&& -q.push(e[r]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()}; +Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(c,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],t=0;t<e.length;t++)(k.isVertex(e[t])||k.isEdge(e[t]))&&null!=a.view.getState(e[t])&& +q.push(e[t]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()}; OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)}; -function Dialog(a,b,e,d,k,l,p,q){var r=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(r=80);e+=r;d+=r;var c=e,f=d,h=Math.max(document.body.clientHeight,document.documentElement.clientHeight),m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),n=Math.max(1,Math.round((h-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d=Math.min(d,h-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&& -(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=h+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var g=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=g.x+"px";this.bg.style.top=g.y+"px";m+=g.x;n+=g.y;k&&document.body.appendChild(this.bg);var x=a.createDiv("geDialog");k=this.getPosition(m,n, -e,d);m=k.x;n=k.y;x.style.width=e+"px";x.style.height=d+"px";x.style.left=m+"px";x.style.top=n+"px";x.style.zIndex=this.zIndex;x.appendChild(b);document.body.appendChild(x);!q&&b.clientHeight>x.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=n+14+"px",l.style.left=m+e+38-r+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click", -mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){h=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=h+"px";m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));n=Math.max(1,Math.round((h-d-a.footerHeight)/3));e=Math.min(c,document.body.scrollWidth-64);d= -Math.min(f,h-64);var g=this.getPosition(m,n,e,d);m=g.x;n=g.y;x.style.left=m+"px";x.style.top=n+"px";x.style.width=e+"px";x.style.height=d+"px";!q&&b.clientHeight>x.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=n+14+"px",this.dialogImg.style.left=m+e+38-r+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=x;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white"; +function Dialog(a,b,e,c,k,l,p,q){var t=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(t=80);e+=t;c+=t;var d=e,f=c,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((g-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,g-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&& +(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var h=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=h.x+"px";this.bg.style.top=h.y+"px";n+=h.x;m+=h.y;k&&document.body.appendChild(this.bg);var w=a.createDiv("geDialog");k=this.getPosition(n,m, +e,c);n=k.x;m=k.y;w.style.width=e+"px";w.style.height=c+"px";w.style.left=n+"px";w.style.top=m+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=m+14+"px",l.style.left=n+e+38-t+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click", +mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){g=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=g+"px";n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));m=Math.max(1,Math.round((g-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c= +Math.min(f,g-64);var h=this.getPosition(n,m,e,c);n=h.x;m=h.y;w.style.left=n+"px";w.style.top=m+"px";w.style.width=e+"px";w.style.height=c+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=m+14+"px",this.dialogImg.style.left=n+e+38-t+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white"; Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; @@ -1995,114 +1995,114 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+ "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; var PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var d=q.checked||c.checked,b=parseInt(h.value)/100;isNaN(b)&&(b=1,h.value="100%");var b=.75*b,m=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(d){var t=q.checked?1:parseInt(f.value);isNaN(t)||(n=mxUtils.getScaleForPageCount(t,e,m))}e.getGraphBounds();var k=t=0,m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*b);m.height=Math.ceil(m.height*b);n*=b;!d&&e.pageVisible?(b=e.getPageLayout(),t-=b.x*m.width,k-=b.y*m.height): -d=!0;d=PrintDialog.createPrintPreview(e,n,m,0,t,k,d);d.open();a&&PrintDialog.printPreview(d)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var r=document.createElement("span");mxUtils.write(r," "+mxResources.get("fitPage")); -k.appendChild(r);mxEvent.addListener(r,"click",function(a){q.checked=!q.checked;c.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){c.checked=!q.checked});d.appendChild(k);p.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);r=document.createElement("span");mxUtils.write(r," "+mxResources.get("posterPrint")+":");k.appendChild(r);mxEvent.addListener(r, -"click",function(a){c.checked=!c.checked;q.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);p.appendChild(d);mxEvent.addListener(c,"change", -function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.checked=!c.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var h=document.createElement("input");h.setAttribute("value","100 %");h.setAttribute("size","5");h.style.width="50px";k.appendChild(h);d.appendChild(k);p.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2; -k.style.paddingTop="20px";k.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&k.appendChild(r);if(PrintDialog.previewEnabled){var m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});m.className="geBtn";k.appendChild(m)}m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});m.className="geBtn gePrimaryBtn";k.appendChild(m);a.editor.cancelFirst|| -k.appendChild(r);d.appendChild(k);p.appendChild(d);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}; -PrintDialog.createPrintPreview=function(a,b,e,d,k,l,p){b=new mxPrintPreview(a,b,e,d,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; +PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||d.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,n=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var r=q.checked?1:parseInt(f.value);isNaN(r)||(m=mxUtils.getScaleForPageCount(r,e,n))}e.getGraphBounds();var k=r=0,n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*b);n.height=Math.ceil(n.height*b);m*=b;!c&&e.pageVisible?(b=e.getPageLayout(),r-=b.x*n.width,k-=b.y*n.height): +c=!0;c=PrintDialog.createPrintPreview(e,m,n,0,r,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");c=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage")); +k.appendChild(t);mxEvent.addListener(t,"click",function(a){q.checked=!q.checked;d.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){d.checked=!q.checked});c.appendChild(k);p.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");k.appendChild(t);mxEvent.addListener(t, +"click",function(a){d.checked=!d.checked;q.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);p.appendChild(c);mxEvent.addListener(d,"change", +function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");q.checked=!d.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);c.appendChild(k);p.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2; +k.style.paddingTop="20px";k.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst|| +k.appendChild(t);c.appendChild(k);p.appendChild(c);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}; +PrintDialog.createPrintPreview=function(a,b,e,c,k,l,p){b=new mxPrintPreview(a,b,e,c,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==n?(m.removeAttribute("title"),m.style.fontSize="",m.innerHTML=mxResources.get("change")+"..."):(m.setAttribute("title",n.src),m.style.fontSize="11px",m.innerHTML=n.src.substring(0,42)+"...")}var d=a.editor.graph,k,l,p=document.createElement("table");p.style.width= -"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var r=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td"); -mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var c=document.createElement("button");c.style.width="18px";c.style.height="18px";c.style.marginRight="20px";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";var f=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(c)}); -l.appendChild(c);mxUtils.write(l,mxResources.get("gridSize")+":");var h=document.createElement("input");h.setAttribute("type","number");h.setAttribute("min","0");h.style.width="40px";h.style.marginLeft="6px";h.value=d.getGridSize();l.appendChild(h);mxEvent.addListener(h,"change",function(){var a=parseInt(h.value);h.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+ -":");k.appendChild(l);l=document.createElement("td");var m=document.createElement("a");m.style.textDecoration="underline";m.style.cursor="pointer";m.style.color="#a0a0a0";var n=d.backgroundImage;mxEvent.addListener(m,"click",function(c){a.showBackgroundImageDialog(function(a){n=a;e()});mxEvent.consume(c)});e();l.appendChild(m);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var g= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&l.appendChild(g);var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==h.value&&d.setGridSize(parseInt(h.value));var c=new ChangePageSetup(a,f,n,r.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=n?n.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&& -c.ignoreColor&&c.ignoreImage||d.model.execute(c)});x.className="geBtn gePrimaryBtn";l.appendChild(x);a.editor.cancelFirst||l.appendChild(g);k.appendChild(l);q.appendChild(k);p.appendChild(q);this.container=p}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,c,b){if(b||h!=document.activeElement&&m!=document.activeElement){a=!1;for(c=0;c<g.length;c++)b=g[c],t?"custom"==b.key&&(q.value=b.key,t=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&& -e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(r.style.display="",f.style.display="none"):(h.value=e.width/100,m.value=e.height/100,v.setAttribute("selected","selected"), -l.setAttribute("checked","checked"),l.defaultChecked=!0,r.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var r=document.createElement("div");r.style.marginLeft= -"4px";r.style.width="210px";r.style.height="24px";l.style.marginRight="6px";r.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));r.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";r.appendChild(p);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));r.appendChild(c);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height= -"24px";var h=document.createElement("input");h.setAttribute("size","7");h.style.textAlign="right";f.appendChild(h);mxUtils.write(f," in x ");var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";f.appendChild(m);mxUtils.write(f," in");r.style.display="none";f.style.display="none";for(var n={},g=PageSetupDialog.getFormats(),x=0;x<g.length;x++){var u=g[x];n[u.key]=u;var v=document.createElement("option");v.setAttribute("value",u.key);mxUtils.write(v,u.title);q.appendChild(v)}var t= -!1;k();a.appendChild(q);mxUtils.br(a);a.appendChild(r);a.appendChild(f);var A=e,y=function(){var a=n[q.value];null!=a.format?(h.value=a.format.width/100,m.value=a.format.height/100,f.style.display="none",r.style.display=""):(r.style.display="none",f.style.display="");isNaN(parseFloat(h.value))&&(h.value=e.width/100);isNaN(parseFloat(m.value))&&(m.value=e.height/100);a=new mxRectangle(0,0,Math.floor(100*parseFloat(h.value)),Math.floor(100*parseFloat(m.value)));"custom"!=q.value&&p.checked&&(a=new mxRectangle(0, -0,a.height,a.width));if(a.width!=A.width||a.height!=A.height)A=a,null!=d&&d(A)};mxEvent.addListener(b,"click",function(a){l.checked=!0;y();mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;y();mxEvent.consume(a)});mxEvent.addListener(h,"blur",y);mxEvent.addListener(h,"click",y);mxEvent.addListener(m,"blur",y);mxEvent.addListener(m,"click",y);mxEvent.addListener(p,"change",y);mxEvent.addListener(l,"change",y);mxEvent.addListener(q,"change",function(){t="custom"==q.value;y()}); -y();return{set:function(a){e=a;k(null,null,!0)},get:function(){return A},widthInput:h,heightInput:m}}; +var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function e(){null==m?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",m.src),n.style.fontSize="11px",n.innerHTML=m.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,p=document.createElement("table");p.style.width= +"100%";p.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var t=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td"); +mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var f=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(d)}); +l.appendChild(d);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=c.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+ +":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var m=c.backgroundImage;mxEvent.addListener(n,"click",function(d){a.showBackgroundImageDialog(function(a){m=a;e()});mxEvent.consume(d)});e();l.appendChild(n);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h= +mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==g.value&&c.setGridSize(parseInt(g.value));var d=new ChangePageSetup(a,f,m,t.get());d.ignoreColor=c.background==f;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=m?m.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&& +d.ignoreColor&&d.ignoreImage||c.model.execute(d)});w.className="geBtn gePrimaryBtn";l.appendChild(w);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);q.appendChild(k);p.appendChild(q);this.container=p}; +PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,d,b){if(b||g!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<h.length;d++)b=h[d],r?"custom"==b.key&&(q.value=b.key,r=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&& +e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(t.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,v.setAttribute("selected","selected"), +l.setAttribute("checked","checked"),l.defaultChecked=!0,t.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var t=document.createElement("div");t.style.marginLeft= +"4px";t.style.width="210px";t.style.height="24px";l.style.marginRight="6px";t.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));t.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";t.appendChild(p);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));t.appendChild(d);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height= +"24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");t.style.display="none";f.style.display="none";for(var m={},h=PageSetupDialog.getFormats(),w=0;w<h.length;w++){var u=h[w];m[u.key]=u;var v=document.createElement("option");v.setAttribute("value",u.key);mxUtils.write(v,u.title);q.appendChild(v)}var r= +!1;k();a.appendChild(q);mxUtils.br(a);a.appendChild(t);a.appendChild(f);var A=e,x=function(){var a=m[q.value];null!=a.format?(g.value=a.format.width/100,n.value=a.format.height/100,f.style.display="none",t.style.display=""):(t.style.display="none",f.style.display="");isNaN(parseFloat(g.value))&&(g.value=e.width/100);isNaN(parseFloat(n.value))&&(n.value=e.height/100);a=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(a=new mxRectangle(0, +0,a.height,a.width));if(a.width!=A.width||a.height!=A.height)A=a,null!=c&&c(A)};mxEvent.addListener(b,"click",function(a){l.checked=!0;x();mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){p.checked=!0;x();mxEvent.consume(a)});mxEvent.addListener(g,"blur",x);mxEvent.addListener(g,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"change",x);mxEvent.addListener(l,"change",x);mxEvent.addListener(q,"change",function(){r="custom"==q.value;x()}); +x();return{set:function(a){e=a;k(null,null,!0)},get:function(){return A},widthInput:g,heightInput:n}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)", format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect= -mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}), -mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape= -null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",h="";if(a.isGridEnabled()){h=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",h=a.gridSize*this.scale*this.gridSteps): -d="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);h=-Math.round(h-mxUtils.mod(this.translate.x*this.scale-c,h))+"px "+-Math.round(h-mxUtils.mod(this.translate.y*this.scale-e,h))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=h,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor= -b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=h,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],h=1;h<this.gridSteps;h++){var e=h*b;d.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+ -c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var c= -this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+d,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,h=this.view.translate,e=this.pageFormat,n=d*this.pageScale,g=this.view.getBackgroundPageBounds();b=g.width;c=g.height;var k= -new mxRectangle(d*h.x,d*h.y,e.width*n,e.height*n),u=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,v=a?Math.ceil(b/k.width)-1:0,t=g.x+b,q=g.y+c;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?u:v,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(g.x),Math.round(g.y+(b+1)*k.height)), -new mxPoint(Math.round(t),Math.round(g.y+(b+1)*k.height))]:[new mxPoint(Math.round(g.x+(b+1)*k.width),Math.round(g.y)),new mxPoint(Math.round(g.x+(b+1)*k.width),Math.round(q))];null!=a[b]?(a[b].points=d,a[b].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[b]=d)}for(b=c;b<a.length;b++)a[b].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; -var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var f=0;f<d.length;f++)if(this.graph.getModel().isVertex(d[f])){var h=this.graph.getCellGeometry(d[f]);if(null!=h&&h.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()? -!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,h=this.graph.pageScale,e=d.width*h,d=d.height*h,h=Math.floor(Math.min(0,b)/e),n=Math.floor(Math.min(0, -c)/d);return new mxRectangle(this.scale*(this.translate.x+h*e),this.scale*(this.translate.y+n*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/e)-h)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-n)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft= -a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,h,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=l.apply(this,arguments),h=b.getParent(d); -if(null==c||c!=d&&c!=h)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(h)&&b.isVertex(h)&&!this.graph.isContainer(h);)d=h,h=this.graph.getModel().getParent(d);return d};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=p.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),h=d.getParent(a);null!=h;){if(this.graph.isCellSelected(h)&&d.isVertex(h)){c=!0;break}h=d.getParent(h)}return c};mxGraphHandler.prototype.selectDelayed= -function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&& -(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src); -this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||d.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown= -k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var c=mxEvent.getSource(a); -if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer); -0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var l=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return l||p.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()|| -mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&& -(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var r=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return r.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var c=!1,f=null,h=null,m=null,n=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a= -this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==m)this.toolbar.createTextToolbar();else{for(var g=0;g<m.length;g++)this.toolbar.container.appendChild(m[g]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=h}c=d.cellEditor.isContentEditing();f=a;h=e;m=b}}),g=this,x=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){x.apply(this, -arguments);n();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=g.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));g.toolbar.setFontName(b);g.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea, -"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var u=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){u.apply(this,arguments);n()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(G){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c, -b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "), -A="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],h;for(h in c.style)a[h]!=c.style[h]&&(b.push(c.style[h]),f.push(h));h=d.getModel().getStyle(c.cell);for(var e=null!=h?h.split(";"):[],g=0;g<e.length;g++){var m=e[g],n=m.indexOf("=");0<=n&&(h=m.substring(0,n),m=m.substring(n+1),null!=a[h]&&"none"==m&&(b.push(m),f.push(h)))}d.getModel().isEdge(c.cell)? -d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],w="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "), -F=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)t.push(F[a][b]);for(a=0;a<A.length;a++)0>mxUtils.indexOf(t,A[a])&&t.push(A[a]);var B=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(m),h=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var g= -h[f[e]];null!=g&&d.setCellStyles(f[e],g,a)}else for(g=0;g<a.length;g++){for(var m=a[g],n=b.getStyle(m),u=null!=n?n.split(";"):[],K=t.slice(),e=0;e<u.length;e++){var v=u[e],k=v.indexOf("=");if(0<=k){var x=v.substring(0,k),q=mxUtils.indexOf(K,x);0<=q&&K.splice(q,1);for(var w=0;w<F.length;w++){var l=F[w];if(0<=mxUtils.indexOf(l,x))for(var p=0;p<l.length;p++){var y=mxUtils.indexOf(K,l[p]);0<=y&&K.splice(y,1)}}}}for(var h=(f=b.isEdge(m))?d.currentEdgeStyle:d.currentVertexStyle,r=b.getStyle(m),e=0;e<K.length;e++){var x= -K[e],G=h[x];null==G||"shape"==x&&!f||f&&!(0>mxUtils.indexOf(A,x))||(r=mxUtils.setStyle(r,x,G))}b.setStyle(m,r)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){B(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){B(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));B(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a, -c){var b=c.getProperty("cells"),f=!1,h=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(h=d.getModel().isEdge(b[e])||h)||!f);e++);else h=f=!0;for(var b=c.getProperty("keys"),g=c.getProperty("values"),e=0;e<b.length;e++){var m=0<=mxUtils.indexOf(y,b[e]);if("strokeColor"!=b[e]||null!=g[e]&&"none"!=g[e])if(0<=mxUtils.indexOf(A,b[e]))h||0<=mxUtils.indexOf(w,b[e])?null==g[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=g[e]:f&&0<=mxUtils.indexOf(t,b[e])&&(null== -g[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=g[e]);else if(0<=mxUtils.indexOf(t,b[e])){if(f||m)null==g[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=g[e];if(h||m||0<=mxUtils.indexOf(w,b[e]))null==g[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=g[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!= -this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+ -("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape? -"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW], -mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||"12"),b=d.getView().getState(d.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,c=b.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE, -a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var b=c.getProperty("cells"),f=c.getProperty("parent");d.getModel().isLayer(f)&&!d.isCellVisible(f)&&null!=b&&0<b.length&&d.getModel().setVisible(f,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}), +(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect= +mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),d.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,d),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){a.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}), +mxUtils.bind(this,function(d){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(d)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape= +null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,d=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",c="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(d))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",g=a.gridSize*this.scale*this.gridSteps): +c="url("+this.gridImage+")";var e=d=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),d=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-d,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,a.view.backgroundPageShape.node.style.backgroundImage=c,a.view.backgroundPageShape.node.style.backgroundColor= +b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=g,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var d=this.gridSteps*b,c=[],g=1;g<this.gridSteps;g++){var e=g*b;c.push("M 0 "+e+" L "+d+" "+e+" M "+e+" 0 L "+e+" "+d)}return'<svg width="'+ +d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d= +this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+c,f))+"px";d.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,g=this.view.translate,e=this.pageFormat,m=c*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;d=h.height;var k= +new mxRectangle(c*g.x,c*g.y,e.width*m,e.height*m),u=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(d/k.height)-1:0,v=a?Math.ceil(b/k.width)-1:0,r=h.x+b,q=h.y+d;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?u:v,b=0;b<=d;b++){var c=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(b+1)*k.height)), +new mxPoint(Math.round(r),Math.round(h.y+(b+1)*k.height))]:[new mxPoint(Math.round(h.x+(b+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(b+1)*k.width),Math.round(q))];null!=a[b]?(a[b].points=c,a[b].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),a[b]=c)}for(b=d;b<a.length;b++)a[b].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; +var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var f=0;f<c.length;f++)if(this.graph.getModel().isVertex(c[f])){var g=this.graph.getCellGeometry(c[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,d){return this.isConnecting()? +!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,g=this.graph.pageScale,e=c.width*g,c=c.height*g,g=Math.floor(Math.min(0,b)/e),m=Math.floor(Math.min(0, +d)/c);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+m*c),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/c)-m)*c)};var c=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){c.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft= +a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,d,c,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),d=b.getParent(this.graph.getSelectionCell()),c=l.apply(this,arguments),g=b.getParent(c); +if(null==d||d!=c&&d!=g)for(;!this.graph.isCellSelected(c)&&!this.graph.isCellSelected(g)&&b.isVertex(g)&&!this.graph.isContainer(g);)c=g,g=this.graph.getModel().getParent(c);return c};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var d=p.apply(this,arguments);if(!d)for(var c=this.graph.getModel(),g=c.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&c.isVertex(g)){d=!0;break}g=c.getParent(g)}return d};mxGraphHandler.prototype.selectDelayed= +function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var d=this.graph.view.getState(b);if(null==d||!a.isSource(d.control))for(var d=this.graph.getModel(),c=d.getParent(b);!this.graph.isCellSelected(c)&&d.isVertex(c);)b=c,c=d.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),d=b.getParent(a);b.isVertex(d)&&!this.graph.isContainer(d);)this.graph.isCellSelected(d)&& +(a=d),d=b.getParent(d);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var c=this.editor.graph;c.lightbox=e;mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src); +this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,c.isEnabled=function(){return!1},c.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||c.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown= +k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var d=mxEvent.getSource(a); +if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer); +0<mxEvent.getClientX(a)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var l=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return l||p.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()|| +mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&& +(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var t=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return t.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var d=!1,f=null,g=null,n=null,m=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a= +this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var h=0;h<n.length;h++)this.toolbar.container.appendChild(n[h]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}d=c.cellEditor.isContentEditing();f=a;g=e;n=b}}),h=this,w=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){w.apply(this, +arguments);m();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=h.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));h.toolbar.setFontName(b);h.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea, +"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var u=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){u.apply(this,arguments);m()};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(G){}var v=c.fireMouseEvent;c.fireMouseEvent=function(a,d, +b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,d,b){this.menus.createPopupMenu(a,d,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var r="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "), +A="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],f=[],g;for(g in d.style)a[g]!=d.style[g]&&(b.push(d.style[g]),f.push(g));g=c.getModel().getStyle(d.cell);for(var e=null!=g?g.split(";"):[],n=0;n<e.length;n++){var h=e[n],m=h.indexOf("=");0<=m&&(g=h.substring(0,m),h=h.substring(m+1),null!=a[g]&&"none"==h&&(b.push(h),f.push(g)))}c.getModel().isEdge(d.cell)? +c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "), +F=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)r.push(F[a][b]);for(a=0;a<A.length;a++)0>mxUtils.indexOf(r,A[a])&&r.push(A[a]);var B=function(a,d){var b=c.getModel();b.beginUpdate();try{if(d)for(var f=b.isEdge(h),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var n= +g[f[e]];null!=n&&c.setCellStyles(f[e],n,a)}else for(n=0;n<a.length;n++){for(var h=a[n],m=b.getStyle(h),u=null!=m?m.split(";"):[],K=r.slice(),e=0;e<u.length;e++){var v=u[e],k=v.indexOf("=");if(0<=k){var w=v.substring(0,k),q=mxUtils.indexOf(K,w);0<=q&&K.splice(q,1);for(var z=0;z<F.length;z++){var l=F[z];if(0<=mxUtils.indexOf(l,w))for(var p=0;p<l.length;p++){var x=mxUtils.indexOf(K,l[p]);0<=x&&K.splice(x,1)}}}}for(var g=(f=b.isEdge(h))?c.currentEdgeStyle:c.currentVertexStyle,t=b.getStyle(h),e=0;e<K.length;e++){var w= +K[e],G=g[w];null==G||"shape"==w&&!f||f&&!(0>mxUtils.indexOf(A,w))||(t=mxUtils.setStyle(t,w,G))}b.setStyle(h,t)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){B(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){B(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));B(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a, +d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),n=d.getProperty("values"),e=0;e<b.length;e++){var h=0<=mxUtils.indexOf(x,b[e]);if("strokeColor"!=b[e]||null!=n[e]&&"none"!=n[e])if(0<=mxUtils.indexOf(A,b[e]))g||0<=mxUtils.indexOf(z,b[e])?null==n[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=n[e]:f&&0<=mxUtils.indexOf(r,b[e])&&(null== +n[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=n[e]);else if(0<=mxUtils.indexOf(r,b[e])){if(f||h)null==n[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=n[e];if(g||h||0<=mxUtils.indexOf(z,b[e]))null==n[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=n[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!= +this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle||"none"==c.currentEdgeStyle.edgeStyle||null==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+ +("vertical"==c.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==c.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==c.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==c.currentEdgeStyle.shape? +"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(c.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_ENDARROW], +mxUtils.getValue(c.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=c.currentVertexStyle.fontFamily||"Helvetica",d=String(c.currentVertexStyle.fontSize||"12"),b=c.getView().getState(c.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,d=b.style[mxConstants.STYLE_FONTSIZE]||d,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(d)}),c.getSelectionModel().addListener(mxEvent.CHANGE,a),c.getModel().addListener(mxEvent.CHANGE, +a));c.addListener(mxEvent.CELLS_ADDED,function(a,d){var b=d.getProperty("cells"),f=d.getProperty("parent");c.getModel().isLayer(f)&&!c.isCellVisible(f)&&null!=b&&0<b.length&&c.getModel().setVisible(f,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}), 0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged", -mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30; +mxUtils.bind(this,function(){c.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){c.view.validateBackground()}));c.addListener("gridSizeChanged",mxUtils.bind(this,function(){c.isGridEnabled()&&c.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30; EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?118:208;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4; EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()})); var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9==a.which&&b.isEnabled()&&!mxEvent.isAltDown(a)&&(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))}; EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a)))}; EditorUi.prototype.isImmediateEditingEvent=function(a){return!0}; -EditorUi.prototype.getCssClassForMarker=function(a,b,e,d){return"flexArrow"==b?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":e==mxConstants.ARROW_CLASSIC?"1"==d?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==d?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+ -a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==d?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==d?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==d?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":e==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond": -"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==d||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+ +EditorUi.prototype.getCssClassForMarker=function(a,b,e,c){return"flexArrow"==b?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":e==mxConstants.ARROW_CLASSIC?"1"==c?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==c?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+ +a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==c?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==c?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==c?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==c?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":e==mxConstants.ARROW_DIAMOND_THIN?"1"==c?"geSprite geSprite-"+a+"thindiamond": +"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==c?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==c||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+ a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null}; EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())}; -EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste", -!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()}; -EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale* -a.width*c.width,this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,f){if(null!=a.container){d=null!=d?d:0;f=null!=f?f:0;var h=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),g=a.view.translate,m=a.view.scale,n=mxRectangle.fromRectangle(h); -n.x=n.x/m-g.x;n.y=n.y/m-g.y;n.width/=m;n.height/=m;var g=a.container.scrollTop,u=a.container.scrollLeft,v=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)v+=3;var t=a.container.offsetWidth-v,v=a.container.offsetHeight-v;c=c?Math.max(.3,Math.min(b||1,t/n.width)):m;b=(t-c*n.width)/2/c;var k=0==this.lightboxVerticalDivider?0:(v-c*n.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),k=Math.max(k,0));if(e||h.width<t||h.height<v)a.view.scaleAndTranslate(c, -Math.floor(b-n.x),Math.floor(k-n.y)),a.container.scrollTop=g*c/m,a.container.scrollLeft=u*c/m;else if(0!=d||0!=f)h=a.view.translate,a.view.setTranslate(Math.floor(h.x+d/m),Math.floor(h.y+f/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView", -mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace= -"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]|| -0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var l=0,k=mxUtils.bind(this,function(a,c,b){l++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=b&&d.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d); -return d}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var r=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")), -c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";r.style.paddingLeft="4px";r.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(r.style.display="",p.style.display="",q.style.display="inline-block"):(r.style.display="none",p.style.display= -"none",q.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(c){a.lightbox?(1==a.view.scale? -this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var h=null,m=null,n=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);h=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);h=null;m=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";m= -null}),600)}),a||200)}),g=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=k(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog, -"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff"; -mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){x.style.display=1<u.getChildCount(u.root)? +EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(c){c.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var c=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste", +!1,null):e=c.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()}; +EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*d.width),this.scale*(this.translate.y+a.y*d.height),this.scale* +a.width*d.width,this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),n=a.view.translate,h=a.view.scale,m=mxRectangle.fromRectangle(g); +m.x=m.x/h-n.x;m.y=m.y/h-n.y;m.width/=h;m.height/=h;var n=a.container.scrollTop,u=a.container.scrollLeft,r=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)r+=3;var v=a.container.offsetWidth-r,r=a.container.offsetHeight-r;d=d?Math.max(.3,Math.min(b||1,v/m.width)):h;b=(v-d*m.width)/2/d;var k=0==this.lightboxVerticalDivider?0:(r-d*m.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),k=Math.max(k,0));if(e||g.width<v||g.height<r)a.view.scaleAndTranslate(d, +Math.floor(b-m.x),Math.floor(k-m.y)),a.container.scrollTop=n*d/h,a.container.scrollLeft=u*d/h;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/h),Math.floor(g.y+f/h))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView", +mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace= +"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]|| +0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var l=0,k=mxUtils.bind(this,function(a,d,b){l++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c); +return c}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var t=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")), +d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";t.style.paddingLeft="4px";t.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(t.style.display="",p.style.display="",q.style.display="inline-block"):(t.style.display="none",p.style.display= +"none",q.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(d){a.lightbox?(1==a.view.scale? +this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var g=null,n=null,m=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";n= +null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var w=k(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog, +"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=w.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff"; +mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){w.style.display=1<u.getChildCount(u.root)? "":"none"})}this.addChromelessToolbarItems(k);null!=this.editor.editButtonLink&&k(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage, -mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||g(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)}); -mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():g(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX= -b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():g(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var t= -a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}t.apply(this,arguments)};var A=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*b.x+c.width* -d.width),h=Math.ceil(2*b.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=h)a.minimumGraphSize=new mxRectangle(0,0,f,h);f=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?A.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale), -this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var y=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= -(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,f=0;null!=y&&(d=a.container.offsetWidth/2-y.x+c.x,f=a.container.offsetHeight/2-y.y+c.y);c=this.view.scale; -this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==f||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((mxEvent.isAltDown(c)||mxEvent.isControlDown(c)&&!mxClient.IS_MAC|| -a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(c);null!=d;){if(d==a.container){y=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}d=d.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; +mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||h(30),m())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)}); +mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():h(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX= +b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?m():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var r= +a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}r.apply(this,arguments)};var A=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width* +c.width),g=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?A.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale), +this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var x=null;a.lazyZoom=function(d){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);d?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= +(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var d=mxUtils.getOffset(a.container),c=0,f=0;null!=x&&(c=a.container.offsetWidth/2-x.x+d.x,f=a.container.offsetHeight/2-x.y+d.y);d=this.view.scale; +this.zoom(this.cumulativeZoomFactor);this.view.scale!=d&&(null!=b&&e.chromelessResize(!1,null,c*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==c&&0==f||(a.container.scrollLeft-=c*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b){if((mxEvent.isAltDown(d)||mxEvent.isControlDown(d)&&!mxClient.IS_MAC|| +a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var c=mxEvent.getSource(d);null!=c;){if(c==a.container){x=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d));a.lazyZoom(b);mxEvent.consume(d);break}c=c.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a}; EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))}; EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))}; EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.chromeless)return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")}; -EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange(); +EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange(); this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())}; EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}}; EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(e){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()}; @@ -2113,27 +2113,27 @@ EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.e 0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,a.scrollTileSize.height* a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-b.height)/ 4))-b.y)))}; -EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,k=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y* -b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=d;this.ignoreImage=this.ignoreColor=!1} +EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),c=0,k=0;e&&(c=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-c,b.container.scrollTop=b.view.translate.y* +b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,c){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=c;this.ignoreImage=this.ignoreColor=!1} ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(this.image=this.previousImage,b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat), -this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})(); +this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled)};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);return c};mxCodecRegistry.register(a)})(); EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))}; EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))}; EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))}; -EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing; -this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);d()};d()}; -EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var p=k[l];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(e=!0);if(d&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l= -0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()|| -d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())|| +EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,c=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,c);e.addListener(mxEvent.UNDO,c);e.addListener(mxEvent.REDO,c);e.addListener(mxEvent.CLEAR,c);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);c()};var l=this.editor.graph.cellEditor.stopEditing; +this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);c()};c()}; +EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,c=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var p=k[l];a.getModel().isEdge(p)&&(c=!0);a.getModel().isVertex(p)&&(e=!0);if(c&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l= +0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(c);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);c=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()|| +c&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||c&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(c&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())|| 0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1== a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount()); this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()}; -EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&& -(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var r= -this.footerHeight+k,q=Math.max(0,Math.min(d-p-r,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=r+"px"}r=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=r+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left= +EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,c=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,c=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&& +(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var t= +this.footerHeight+k,q=Math.max(0,Math.min(c-p-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=t+"px"}t=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=t+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left= null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width, -b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-r)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom= -this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=r+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom= +b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-t)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom= +this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=t+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom= this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand")); this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom= @@ -2143,106 +2143,106 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit, !0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};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,e,d){function k(a){if(null!=p){var h=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?h.x-p.x:p.y-h.y)-e));mxEvent.consume(a);q!=f()&&(r=!0,c=null)}}function l(a){k(a);p=q=null}var p=null,q=null,r=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));q=f();r=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!r){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,d,k,l,p){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,p);this.dialogs.push(this.dialog)}; +EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,q+(b?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);q!=f()&&(t=!0,d=null)}}function l(a){k(a);p=q=null}var p=null,q=null,t=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));q=f();t=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!t){var b=null!=d?d-e:0;d=f();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,p){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,p);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),this.editor.fireEvent(new mxEventObject("hideDialog")))}; -EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(k.container,230,430,!0,!1);k.init()}; +EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),k=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(k.container,230,430,!0,!1);k.init()}; EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})}; -EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("<mxGraphModel ");if(0<=e){var d=a.lastIndexOf("</mxGraphModel>");d>e&&(b=a.substring(e,d+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(k){}return b}; +EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("<mxGraphModel ");if(0<=e){var c=a.lastIndexOf("</mxGraphModel>");c>e&&(b=a.substring(e,c+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(k){}return b}; EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&& (b=e);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(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.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, "_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}}; -EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}}; -EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=l&&0<l.length){var p=new Image;p.onload=function(){e(l,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()}; +EditorUi.prototype.executeLayout=function(a,b,e){var c=this.editor.graph;if(c.isEnabled()){c.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(c),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(c.getModel().endUpdate(),null!=e&&e())}}}; +EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var k=c.saveSelection(),l=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=l&&0<l.length){var p=new Image;p.onload=function(){e(l,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()}; EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else a(null)}; EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()}; EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b}; -EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),h=0;h<f.length;h++)if(d.getModel().isVertex(f[h])&&d.isCellResizable(f[h])){var e=d.getCellGeometry(f[h]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[h],e))}}finally{d.getModel().endUpdate()}}else f= -d.getSelectionCell(),h=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(h)),null!=e&&e.constructor==mxStackLayout?(e=h.getIndex(f),37==a||38==a?d.model.add(h,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(h,f,Math.min(d.model.getChildCount(h),e+1))):(h=f=0,37==a?f=-c:38==a?h=-c:39==a?f=c:40==a&&(h=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,h))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0< -p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&& -!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,r={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction,f={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),80:this.actions.get("connectionPoints")}; -mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var h=f[a.keyCode];if(null!=h)return h.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=r[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),r[a.keyCode], -d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return c.apply(this,arguments)};k.bindAction=mxUtils.bind(this, -function(a,c,b,d){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):d?k.bindShiftKey(a,b):k.bindKey(a,b))});var h=k.escape;k.escape=function(a){h.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut"); -k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72, +EditorUi.prototype.createKeyHandler=function(a){function b(a,d,b){p.push(function(){if(!c.isSelectionEmpty()&&c.isEnabled())if(d=null!=d?d:1,b){c.getModel().beginUpdate();try{for(var f=c.getSelectionCells(),g=0;g<f.length;g++)if(c.getModel().isVertex(f[g])&&c.isCellResizable(f[g])){var e=c.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-d):38==a?e.height=Math.max(0,e.height-d):39==a?e.width+=d:40==a&&(e.height+=d),c.getModel().setGeometry(f[g],e))}}finally{c.getModel().endUpdate()}}else f= +c.getSelectionCell(),g=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?c.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(g,f,Math.min(c.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0< +p.length){c.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{c.getModel().endUpdate()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&& +!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,t={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=k.getFunction,f={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),80:this.actions.get("connectionPoints")}; +mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var g=f[a.keyCode];if(null!=g)return g.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=t[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=c.connectVertex(c.getSelectionCell(),t[a.keyCode], +c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(c.view.getState(c.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null)}}return d.apply(this,arguments)};k.bindAction=mxUtils.bind(this, +function(a,d,b,c){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},d?c?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):c?k.bindShiftKey(a,b):k.bindKey(a,b))});var g=k.escape;k.escape=function(a){g.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){c.exitGroup()});k.bindControlShiftKey(35,function(){c.enterGroup()});k.bindKey(36,function(){c.home()});k.bindKey(35,function(){c.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut"); +k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);k.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){c.isEnabled()&&c.foldCells(!0)}),k.bindControlKey(35,function(){c.isEnabled()&&c.foldCells(!1)}),k.bindControlKey(13,function(){c.isEnabled()&&c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72, !0,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0, "toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0, -"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),k.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k}; +"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindKey(13,function(){c.isEnabled()&&c.startEditingAtCell()}),k.bindKey(113,function(){c.isEnabled()&&c.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k}; EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&& (mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window, "scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1; (function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1; mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]"; -Graph=function(a,b,e,d,k){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a); -return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,r=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var f=d.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(f.cell),q=f,p=d,null!= -f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY())?r=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(r=f.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&& -!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var h=this.selectionCellsHandler.getHandler(d.cell);if(null!=h&&null!=h.bends&&0<h.bends.length){var e=h.getHandleForEvent(p),g=this.view.getEdgeStyle(d);f=g==mxEdgeStyle.EntityRelation;c||r!=mxEvent.LABEL_HANDLE||(e=r);if(f&&0!=e&&e!=h.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f|| -null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=d.visibleSourceState||e==h.bends.length-1||null!=d.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=d.absolutePoints,null!=f&&(null==g&&null==e||g==mxEdgeStyle.OrthConnector)&&(e=r,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)? -e=h.bends.length-1:null!=g&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(d,l.x,l.y),e=null==g?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),h.start(b.getGraphX(),b.getGraphX(),e),r=l=p=q=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){h=null;f=d.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(), -b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))h="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))h="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)g=this.view.getEdgeStyle(d),h="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(g=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()), -g<f.length-1&&0<=g&&(h=0==Math.round(f[g].x-f[g+1].x)?"col-resize":"row-resize"));null!=h&&d.setCursor(h)}}),mouseUp:mxUtils.bind(this,function(a,c){r=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};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(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= -function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,h=b.width*d,b=b.height*d,d=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),m=0;m<g.width;m++)c.push(new mxRectangle(((g.x+m)*h+d.x)*e,(g.y*b+d.y)*e,h*e,b*e));for(m=0;m<g.height;m++)c.push(new mxRectangle((g.x*h+d.x)*e,((g.y+m)*b+d.y)*e,h*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= -function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],d=0;d<c.length;d++){var f=this.graph.view.getState(c[d]),f=null!=f?f.style:this.graph.getCellStyle(c[d]); -"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(c[d]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(c,f)&&b.push(f)):b.push(c[d])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var h=new mxRubberband(this); -this.getRubberband=function(){return h};var m=(new Date).getTime(),n=0,g=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;g.apply(this,arguments);a!=this.currentState?(m=(new Date).getTime(),n=0):n=(new Date).getTime()-m};var x=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<n||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style, -"outlineConnect","1"))&&x.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=h.isForceRubberbandEvent;h.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var t=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&& -(t=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=t)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var A=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return A.apply(this,arguments);var c=a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&window.open(c))}; -var y=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return y.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,f,h){h=null!=h?h:[];if(0<b||0<d){var e=this.getModel(),g=a+b,m=c+d;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var n=e.getChildCount(f),K=0;K<n;K++){var u= -e.getChildAt(f,K),t=this.view.getState(u);if(null!=t&&this.isCellVisible(u)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var v=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(t=mxUtils.getBoundingBox(t,v));(e.isEdge(u)||e.isVertex(u))&&t.x>=a&&t.y+t.height<=m&&t.y>=c&&t.x+t.width<=g&&h.push(u);this.getAllCells(a,c,b,d,u,h)}}}return h};var w=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)? -!1:w.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();F=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, -mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),h.start(b.x,b.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored= -function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var B=this.updateMouseEvent;this.updateMouseEvent=function(a){a=B.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}}; +Graph=function(a,b,e,c,k){mxGraph.call(this,a,b,e,c);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var d=this.view.getState(a);a=null!=d?d.style:this.getCellStyle(a); +return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,t=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(l=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),q=f,p=c,null!= +f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?t=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(t=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&& +!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=l&&null!=q&&null!=p){if(c=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(p),h=this.view.getEdgeStyle(c);f=h==mxEdgeStyle.EntityRelation;d||t!=mxEvent.LABEL_HANDLE||(e=t);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f|| +null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==g.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=t,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)? +e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),t=l=p=q=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){g=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(), +b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)h=this.view.getEdgeStyle(c),g="crosshair",h!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(h=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()), +h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&c.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,d){t=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};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(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= +function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,g=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),n=0;n<h.width;n++)d.push(new mxRectangle(((h.x+n)*g+c.x)*e,(h.y*b+c.y)*e,g*e,b*e));for(n=0;n<h.height;n++)d.push(new mxRectangle((h.x*g+c.x)*e,((h.y+n)*b+c.y)*e,g*e,b*e));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= +function(a,d){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var d=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],c=0;c<d.length;c++){var f=this.graph.view.getState(d[c]),f=null!=f?f.style:this.graph.getCellStyle(d[c]); +"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this); +this.getRubberband=function(){return g};var n=(new Date).getTime(),m=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),m=0):m=(new Date).getTime()-n};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<m||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style, +"outlineConnect","1"))&&w.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var r=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&& +(r=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=r)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var A=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return A.apply(this,arguments);var d=a.getCell();null!=d&&(d=this.getLinkForCell(d),null!=d&&window.open(d))}; +var x=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return x.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,g){g=null!=g?g:[];if(0<b||0<c){var e=this.getModel(),h=a+b,n=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),K=0;K<m;K++){var r= +e.getChildAt(f,K),u=this.view.getState(r);if(null!=u&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var v=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(u=mxUtils.getBoundingBox(u,v));(e.isEdge(r)||e.isVertex(r))&&u.x>=a&&u.y+u.height<=n&&u.y>=d&&u.x+u.width<=h&&g.push(r);this.getAllCells(a,d,b,c,r,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)? +!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();F=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, +mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),g.start(b.x,b.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);F=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||a)};this.connectionHandler.constraintHandler.isStateIgnored= +function(a,d){return d&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var B=this.updateMouseEvent;this.updateMouseEvent=function(a){a=B.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}}; Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6; Graph.createSvgImage=function(a,b,e){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null; Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400); Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0]; -Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),r=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!= -b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,r);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isPageLink=function(a){return!1}; -Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)){if(!this.isEnabled()){var d=a.view.graph.isBlankLink(b)?a.view.graph.linkTarget:"_top";b=a.view.graph.getAbsoluteUrl(b);"_self"==d&&window!=window.top?window.location.href=b:b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top?window.location.hash=b.split("#")[1]:(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))&& -window.open(b,d)}mxEvent.consume(e)}};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)}; +Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,p=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),t=mxUtils.bind(this,function(d){if(k)for(var b=mxEvent.getSource(d);null!= +b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,t);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isPageLink=function(a){return!1}; +Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)){if(!this.isEnabled()){var c=a.view.graph.isBlankLink(b)?a.view.graph.linkTarget:"_top";b=a.view.graph.getAbsoluteUrl(b);"_self"==c&&window!=window.top?window.location.href=b:b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top?window.location.hash=b.split("#")[1]:(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))&& +window.open(b,c)}mxEvent.consume(e)}};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)}; Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a);a=null!=b?b.style:this.graph.getCellStyle(a);return"stackLayout"==a.childLayout?(b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a, "resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.fill=!0,b):"treeLayout"==a.childLayout?(b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance", 30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b):"flowLayout"==a.childLayout?(b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing", mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize}; -Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),l=Math.floor(d/a.height);return new mxRectangle(k,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-l)}; +Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),c=Math.ceil(b.y/this.view.scale-this.view.translate.y),k=Math.floor(e/a.width),l=Math.floor(c/a.height);return new mxRectangle(k,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-k,Math.ceil((c+Math.floor(b.height/this.view.scale))/a.height)-l)}; Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")}; Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)}; Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))}; Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b}; Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", -shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| -/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",r=a[q+"Date"](),c=a[q+"Day"](),f=a[q+"Month"](),h=a[q+"FullYear"](),m=a[q+"Hours"](),n=a[q+"Minutes"](),g=a[q+"Seconds"](),q=a[q+"Milliseconds"](),x=e?0:a.getTimezoneOffset(),u={d:r,dd:p(r),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:f+1,mm:p(f+1),mmm:d.i18n.monthNames[f],mmmm:d.i18n.monthNames[f+ -12],yy:String(h).slice(2),yyyy:h,h:m%12||12,hh:p(m%12||12),H:m,HH:p(m),M:n,MM:p(n),s:g,ss:p(g),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>m?"a":"p",tt:12>m?"am":"pm",T:12>m?"A":"P",TT:12>m?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<x?"-":"+")+p(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<r%10?0:(10!=r%100-r%10)*r%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1, +shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var c=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,p=function(a,d){a=String(a);for(d=d||2;a.length<d;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| +/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",t=a[q+"Date"](),d=a[q+"Day"](),f=a[q+"Month"](),g=a[q+"FullYear"](),n=a[q+"Hours"](),m=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),w=e?0:a.getTimezoneOffset(),u={d:t,dd:p(t),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:f+1,mm:p(f+1),mmm:c.i18n.monthNames[f],mmmm:c.i18n.monthNames[f+ +12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:m,MM:p(m),s:h,ss:p(h),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<w?"-":"+")+p(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][3<t%10?0:(10!=t%100-t%10)*t%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1, a.length-1)})}; -Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)(function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),k.defaultChecked= -!0);e.appendChild(k);var q=d.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a}; -Graph.prototype.replacePlaceholders=function(a,b){for(var e=[],d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(p))}e.push(b.substring(d, -match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; -Graph.prototype.connectVertex=function(a,b,e,d,k,l){l=l?l:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); -var q=this.view.scale,r=this.view.translate,c=r.x*q,r=r.y*q;this.model.isVertex(e.cell)&&(c=e.x,r=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*q,r+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l= -null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var c=a,f=this.getCellGeometry(a);null!= -f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var h=this.view.getState(c),m=null!=h?h.style:this.getCellStyle(c);if(mxUtils.getValue(m,"part",!1)){var n=this.model.getParent(c);this.model.isVertex(n)&&(c=n)}q=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var g=mxEvent.isControlDown(d)&&k||null==l&&null!=f&&f.constructor==mxStackLayout? -null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=g&&this.connectionHandler.insertBeforeSource){var x=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=g.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==g.parent&&(x=d.parent.getIndex(d),this.model.add(d.parent,g,x))}null==l&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(x=a.parent.getIndex(a),this.model.add(a.parent, -q,x));null!=g&&e.push(g);null==l&&null!=q&&e.push(q);null==q&&null!=g&&g.geometry.setTerminalPoint(p,!1);null!=g&&this.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{this.model.endUpdate()}return e}; -Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")}; -Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)}; +Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)(function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(c)&&(k.setAttribute("checked","checked"),k.defaultChecked= +!0);e.appendChild(k);var q=c.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a}; +Graph.prototype.replacePlaceholders=function(a,b){for(var e=[],c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(p))}e.push(b.substring(c, +match.index)+(null!=l?l:k));c=match.index+k.length}}e.push(b.substring(c));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; +Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); +var q=this.view.scale,t=this.view.translate,d=t.x*q,t=t.y*q;this.model.isVertex(e.cell)&&(d=e.x,t=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(d+p.x*q,t+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l= +null));if(k=!mxEvent.isShiftDown(c)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var d=a,f=this.getCellGeometry(a);null!= +f&&f.relative;)d=this.getModel().getParent(d),f=this.getCellGeometry(d);var g=this.view.getState(d),n=null!=g?g.style:this.getCellStyle(d);if(mxUtils.getValue(n,"part",!1)){var m=this.model.getParent(d);this.model.isVertex(m)&&(d=m)}q=this.duplicateCells([d],!1)[0];f=this.getCellGeometry(q);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(c)&&k||null==l&&null!=f&&f.constructor==mxStackLayout? +null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var w=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=h.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==h.parent&&(w=c.parent.getIndex(c),this.model.add(c.parent,h,w))}null==l&&null!=q&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent, +q,w));null!=h&&e.push(h);null==l&&null!=q&&e.push(q);null==q&&null!=h&&h.geometry.setTerminalPoint(p,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e}; +Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,c;for(c in this.model.cells)if(e=this.model.cells[c],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")}; +Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,c=null;null==c&&null!=e;)null!=e.value&&"object"==typeof e.value&&(c=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return c||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)}; Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null}; Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b}; -Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)}; -Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var r=Math.round(q.width-p.width/this.view.scale),c=Math.round(q.height-p.height/this.view.scale);if(0!=c||0!=r){var f=this.model.getParent(e[l]),h=this.layoutManager.getLayout(f); -null==h?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,r,c):null!=k&&mxEvent.isAltDown(k)||h.constructor!=mxStackLayout||h.resizeLast||this.resizeParentStacks(f,h,r,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; -Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}}; -Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=d+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a, +Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var c=this.layoutManager.getLayout(this.model.getParent(a));null!=c&&c.constructor==mxStackLayout&&(c.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)}; +Graph.prototype.foldCells=function(a,b,e,c,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var t=Math.round(q.width-p.width/this.view.scale),d=Math.round(q.height-p.height/this.view.scale);if(0!=d||0!=t){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f); +null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,f,t,d):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,t,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; +Graph.prototype.moveSiblings=function(a,b,e,c){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}}; +Graph.prototype.resizeParentStacks=function(a,b,e,c){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=c+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a, l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)}; Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)}; Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()}; Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)}; -Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a, -b){return a.name<b.name?-1:a.name>b.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isPageLink(d[k].value)||(b+=("link"!=d[k].name?d[k].name+":":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")}; +Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var c=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&c.push({name:a[k].nodeName,value:a[k].nodeValue});c.sort(function(a, +b){return a.name<b.name?-1:a.name>b.name?1:0});for(k=0;k<c.length;k++)"link"==c[k].name&&this.isPageLink(c[k].value)||(b+=("link"!=c[k].name?c[k].name+":":"")+mxUtils.htmlEntities(c[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")}; Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))}; -Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0; +Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var c=a.charCodeAt(e);(32<=c||9==c||10==c||13==c)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0; HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(26,14,'<path d="m 1 14 L 13 1 L 26 14 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(14,26,'<path d="m 1 1 L 14 13 L 1 26 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26); HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(26,14,'<path d="m 1 1 L 13 14 L 26 1 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(14,26,'<path d="m 14 1 L 1 13 L 14 26 z" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26); HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#007dfc"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26); @@ -2251,123 +2251,123 @@ HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;b HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE, this.repaintHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE, mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()}); -var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(d.getState());null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&& -null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.isActive()&&null!=this.mouseDownPoint&&Math.abs(d.getGraphX()-this.mouseDownPoint.x)<this.graph.tolerance&&Math.abs(d.getGraphY()-this.mouseDownPoint.y)<this.graph.tolerance?b||this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(), -d.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)}; +var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,c){b=!1;var e=c.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(c.getState());null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(c.getState()),c.getGraphX(),c.getGraphY());null!=this.graph.connectionHandler&& +null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.isActive()&&null!=this.mouseDownPoint&&Math.abs(c.getGraphX()-this.mouseDownPoint.x)<this.graph.tolerance&&Math.abs(c.getGraphY()-this.mouseDownPoint.y)<this.graph.tolerance?b||this.click(this.currentState,this.getDirection(),c):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(c.getGraphX(), +c.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,c.getGraphX(),c.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)}; HoverIcons.prototype.createArrow=function(a,b){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline": "inline-block"):(e=mxUtils.createImage(a.src),e.style.width=a.width+"px",e.style.height=a.height+"px",e.style.padding=this.tolerance+"px");null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor="crosshair";mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,this.mouseDownPoint.y), this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){this.graph.isMouseDown|| this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a}; HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState}; HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,a=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=a&&a.setHandlesVisible(!1))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))}; -HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))): +HoverIcons.prototype.click=function(a,b,e){var c=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(c)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,c),this.graph.selectCellsForConnectVertex(a,c,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(c)?this.update(this.getState(this.graph.view.getState(a[1]))): this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null}; HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing); var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+ "px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+ -"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(this.currentState.getCenterX(), -a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var d=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==d||null==k||d.height<6*k.height&&d.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"}); -l(b,this.arrowRight);l(e,this.arrowLeft);l(d,this.arrowUp);l(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title", +"px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),c=this.graph.getCellAt(this.currentState.getCenterX(), +a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==c&&c==a&&(a=c=e=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==k||c.height<6*k.height&&c.width<6*k.width)?b.style.visibility="hidden":b.style.visibility="visible"}); +l(b,this.arrowRight);l(e,this.arrowLeft);l(c,this.arrowUp);l(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title", mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}}; HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a}; HoverIcons.prototype.getState=function(a){if(null!=a){a=a.cell;if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a)}return a}; -HoverIcons.prototype.update=function(a,b,e){if(this.graph.connectionArrowsEnabled){var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime); -this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()): +HoverIcons.prototype.update=function(a,b,e){if(this.graph.connectionArrowsEnabled){var c=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,c=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(c=(new Date).getTime()-this.startTime); +this.setDisplay("");null!=this.currentState&&this.currentState!=a&&c<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||c>this.activationDelay)&&this.currentState!=a&&(c>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()): this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a}; -(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,arguments);null!= -d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&& -this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var h=new mxPoint(b,f);h.type=c;d.push(h);h=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==h||h.type!=c||h.x!=b||h.y!=f},n=.5*this.scale,b=!1,d=[],g=0;g<c.length-1;g++){for(var k=c[g+1],u=c[g],v=[],t=c[g+2];g< -c.length-2&&mxUtils.ptSegDistSq(u.x,u.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,g++,t=c[g+2];for(var b=e(0,u.x,u.y)||b,q=0;q<this.validEdges.length;q++){var l=this.validEdges[q],p=l.absolutePoints;if(null!=p&&mxUtils.intersects(a,l))for(l=0;l<p.length-1;l++){for(var r=p[l+1],B=p[l],t=p[l+2];l<p.length-2&&mxUtils.ptSegDistSq(B.x,B.y,t.x,t.y,r.x,r.y)<1*this.scale*this.scale;)r=t,l++,t=p[l+2];t=mxUtils.intersection(u.x,u.y,k.x,k.y,B.x,B.y,r.x,r.y);if(null!=t&&(Math.abs(t.x-B.x)>n||Math.abs(t.y- -B.y)>n)&&(Math.abs(t.x-r.x)>n||Math.abs(t.y-r.y)>n)){r=t.x-u.x;B=t.y-u.y;t={distSq:r*r+B*B,x:t.x,y:t.y};for(r=0;r<v.length;r++)if(v[r].distSq>t.distSq){v.splice(r,0,t);t=null;break}null==t||0!=v.length&&v[v.length-1].x===t.x&&v[v.length-1].y===t.y||v.push(t)}}}for(l=0;l<v.length;l++)b=e(1,v[l].x,v[l].y)||b}t=c[c.length-1];b=e(0,t.x,t.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){this.routedPoints=null!=this.state?this.state.routedPoints: -null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),g,q=!0,u=null,v=null;g=[];var t=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var p=this.state.routedPoints[l], -w=new mxPoint(p.x/this.scale,p.y/this.scale);0==l?w=c[0]:l==this.state.routedPoints.length-1&&(w=c[c.length-1]);var r=!1;if(null!=u&&1==p.type){var B=this.state.routedPoints[l+1],p=B.x/this.scale-w.x,B=B.y/this.scale-w.y,p=p*p+B*B;null==t&&(t=new mxPoint(w.x-u.x,w.y-u.y),v=Math.sqrt(t.x*t.x+t.y*t.y),t.x=t.x*f/v,t.y=t.y*f/v);p>f*f&&0<v&&(p=u.x-w.x,B=u.y-w.y,p=p*p+B*B,p>f*f&&(r=new mxPoint(w.x-t.x,w.y-t.y),p=new mxPoint(w.x+t.x,w.y+t.y),g.push(r),this.addPoints(a,g,b,d,!1,null,q),g=0>Math.round(t.x)|| -0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,q=!1,"sharp"==e?(a.lineTo(r.x-t.y*g,r.y+t.x*g),a.lineTo(p.x-t.y*g,p.y+t.x*g),a.lineTo(p.x,p.y)):"arc"==e?(g*=1.3,a.curveTo(r.x-t.y*g,r.y+t.x*g,p.x-t.y*g,p.y+t.x*g,p.x,p.y)):(a.moveTo(p.x,p.y),q=!0),g=[p],r=!0))}else t=null;r||(g.push(w),u=w)}this.addPoints(a,g,b,d,!1,null,q);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==a||"1"!=c.style.snapToPoint&& -"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),h=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=e)var u=Math.cos(-e),v=Math.sin(-e),f=mxUtils.getRotatedPoint(f,u,v,k);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| -0);f=this.getPerimeterPoint(c,f,0==e&&h,u);0!=e&&(u=Math.cos(e),v=Math.sin(e),f=mxUtils.getRotatedPoint(f,u,v,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;for(var f=0;f<a.length;f++){var h=this.graph.getConnectionPoint(c,a[f]);if(null!=h){var m=(h.x-e.x)*(h.x-e.x)+(h.y-e.y)*(h.y-e.y);if(null==d||m<d)b=h,d=m}}null!=b&&(e=b)}return e};var p=mxStencil.prototype.evaluateTextAttribute; -mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=c.substring(8,c.length-1),d=mxUtils.parseXml(a.view.graph.decompress(b)); -return new mxShape(new mxStencil(d.documentElement))}catch(m){null!=window.console&&console.log("Error in shape: "+m)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; -mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l= +(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,d){var c=this.getState(a);null!=c&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,arguments);null!= +c&&this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,d){return e.apply(this,arguments)||null!=a.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,a.routedPoints)};var c=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){c.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&& +this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var g=new mxPoint(b,f);g.type=d;c.push(g);g=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==g||g.type!=d||g.x!=b||g.y!=f},m=.5*this.scale,b=!1,c=[],h=0;h<d.length-1;h++){for(var k=d[h+1],u=d[h],v=[],r=d[h+2];h< +d.length-2&&mxUtils.ptSegDistSq(u.x,u.y,r.x,r.y,k.x,k.y)<1*this.scale*this.scale;)k=r,h++,r=d[h+2];for(var b=e(0,u.x,u.y)||b,q=0;q<this.validEdges.length;q++){var x=this.validEdges[q],l=x.absolutePoints;if(null!=l&&mxUtils.intersects(a,x))for(x=0;x<l.length-1;x++){for(var p=l[x+1],t=l[x],r=l[x+2];x<l.length-2&&mxUtils.ptSegDistSq(t.x,t.y,r.x,r.y,p.x,p.y)<1*this.scale*this.scale;)p=r,x++,r=l[x+2];r=mxUtils.intersection(u.x,u.y,k.x,k.y,t.x,t.y,p.x,p.y);if(null!=r&&(Math.abs(r.x-t.x)>m||Math.abs(r.y- +t.y)>m)&&(Math.abs(r.x-p.x)>m||Math.abs(r.y-p.y)>m)){p=r.x-u.x;t=r.y-u.y;r={distSq:p*p+t*t,x:r.x,y:r.y};for(p=0;p<v.length;p++)if(v[p].distSq>r.distSq){v.splice(p,0,r);r=null;break}null==r||0!=v.length&&v[v.length-1].x===r.x&&v[v.length-1].y===r.y||v.push(r)}}}for(x=0;x<v.length;x++)b=e(1,v[x].x,v[x].y)||b}r=d[d.length-1];b=e(0,r.x,r.y)||b}a.routedPoints=c;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=null!=this.state?this.state.routedPoints: +null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,q=!0,u=null,v=null;h=[];var r=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var p=this.state.routedPoints[l], +z=new mxPoint(p.x/this.scale,p.y/this.scale);0==l?z=d[0]:l==this.state.routedPoints.length-1&&(z=d[d.length-1]);var t=!1;if(null!=u&&1==p.type){var B=this.state.routedPoints[l+1],p=B.x/this.scale-z.x,B=B.y/this.scale-z.y,p=p*p+B*B;null==r&&(r=new mxPoint(z.x-u.x,z.y-u.y),v=Math.sqrt(r.x*r.x+r.y*r.y),r.x=r.x*f/v,r.y=r.y*f/v);p>f*f&&0<v&&(p=u.x-z.x,B=u.y-z.y,p=p*p+B*B,p>f*f&&(t=new mxPoint(z.x-r.x,z.y-r.y),p=new mxPoint(z.x+r.x,z.y+r.y),h.push(t),this.addPoints(a,h,b,c,!1,null,q),h=0>Math.round(r.x)|| +0==Math.round(r.x)&&0>=Math.round(r.y)?1:-1,q=!1,"sharp"==e?(a.lineTo(t.x-r.y*h,t.y+r.x*h),a.lineTo(p.x-r.y*h,p.y+r.x*h),a.lineTo(p.x,p.y)):"arc"==e?(h*=1.3,a.curveTo(t.x-r.y*h,t.y+r.x*h,p.x-r.y*h,p.y+r.x*h,p.x,p.y)):(a.moveTo(p.x,p.y),q=!0),h=[p],t=!0))}else r=null;t||(h.push(z),u=z)}this.addPoints(a,h,b,c,!1,null,q);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==a||"1"!=d.style.snapToPoint&& +"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),g=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=e)var u=Math.cos(-e),v=Math.sin(-e),f=mxUtils.getRotatedPoint(f,u,v,k);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| +0);f=this.getPerimeterPoint(d,f,0==e&&g,u);0!=e&&(u=Math.cos(e),v=Math.sin(e),f=mxUtils.getRotatedPoint(f,u,v,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(d,a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||n<c)b=g,c=n}}null!=b&&(e=b)}return e};var p=mxStencil.prototype.evaluateTextAttribute; +mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b)); +return new mxShape(new mxStencil(c.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; +mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var k=b[c];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l= mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b}; -mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,l=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!= +mxStencilRegistry.loadStencilSet=function(a,b,e,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,l=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!= k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)}; -mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"), -q=d.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(k,l,a,p,q)}}d=d.nextSibling}}}; +mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var c=a.firstChild;null!=c;)"shapes"==c.nodeName&&mxStencilRegistry.parseStencilSet(c,b,e),c=c.nextSibling;else{e=null!=e?e:!0;var c=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=c.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(c));if(null!=b){var p=c.getAttribute("w"), +q=c.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(k,l,a,p,q)}}c=c.nextSibling}}}; "undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}mxConstants.HANDLE_FILLCOLOR="#99ccff";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR= "#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)|| b.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a)); -for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=e.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments),c=a.getCell; -a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+ +for(var d in this.graph.currentEdgeStyle)a.style[d]=this.graph.currentEdgeStyle[d];return a};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=e.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var c=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=c.apply(this,arguments),d=a.getCell; +a.getCell=mxUtils.bind(this,function(a){var b=d.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+ this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+ -";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.importGraphModel=function(a,c,b,d){c=null!=c? -c:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var h={},g=0;g<a;g++){var m=e.getChildAt(e.getRoot(),g);if(1!=a||this.isCellLocked(this.getDefaultParent()))m=this.importCells([m],0,0,this.model.getRoot(),null,h)[0],n=this.model.getChildren(m),this.moveCells(n,c,b),f=f.concat(n);else var n=e.getChildren(m),f=f.concat(this.importCells(n,c,b,this.getDefaultParent(), -null,h))}if(d){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var u=this.getBoundingBoxFromGeometry(f,!0);null!=u&&this.moveCells(f,c-u.x,b-u.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var d=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];d.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(Q){}return d}if(null!= -a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}}; -Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,d=0;d<c;d++){var f=this.model.getChildAt(a,d);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,"dropTarget", -"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this, -arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var d=0;d<a.length;d++){var f=a[d];if(c.isEdge(f)){var e=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,e,!1);var g=c.getGeometry(f);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();var m=g.getTerminalPoint(!0),n=g.getTerminalPoint(!1); -g.setTerminalPoint(m,!1);g.setTerminalPoint(n,!0);c.setGeometry(f,g);var u=this.view.getState(f),t=this.view.getState(e),v=this.view.getState(h);if(null!=u){var k=null!=t?this.getConnectionConstraint(u,t,!0):null,K=null!=v?this.getConnectionConstraint(u,v,!1):null;this.setConnectionConstraint(f,e,!0,K);this.setConnectionConstraint(f,h,!1,k)}b.push(f)}}else if(c.isVertex(f)&&(g=this.getCellGeometry(f),null!=g)){g=g.clone();g.x+=g.width/2-g.height/2;g.y+=g.height/2-g.width/2;var q=g.width;g.width=g.height; -g.height=q;c.setGeometry(f,g);var x=this.view.getState(f);if(null!=x){var z=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==z?z="south":"south"==z?z="west":"west"==z?z="north":"north"==z&&(z="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,z,[f])}b.push(f)}}}finally{c.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell); -if(0<c.length)for(var b=0;b<c.length;b++)this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(d)){this.setAttributeForCell(f,d,c);break}f= -this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}for(b=0;b<d.length;b++)if(f=this.view.getState(d[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&& -this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),h=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&h==mxConstants.NONE){e=!0;for(h=0;h<this.model.getChildCount(f.cell)&&e;h++)c.get(this.model.getChildAt(f.cell,h))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d= -this.view.getState(a[b]);if(null!=d){var f=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&d==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell= -function(a,c,b){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=b&&0<b.length?d.setAttribute(c,b):d.removeAttribute(c);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,c,b,d){this.getModel();if(mxEvent.isAltDown(c))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this, -arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var d=this.model.isEdge(c)?this.view.getState(c):null,f=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=f||null!=d&&null!=d.text&&null!=d.text.node&& -(mxUtils.contains(d.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,d))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x, -b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),f=this.getPageSize(),c=Math.max(c,d.x*f.width),b=Math.max(b,d.y*f.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),d=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+ -(0==c.height?1:2)*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var f=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*f.x)/1E4;d.geometry.y=Math.round(f.y); -d.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,d.geometry),e=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-f.x,d.geometry.y=Math.round(c/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([d],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted", -"cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,c,b){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var d=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=d&&(a[b].setAttribute("href", -d),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,d);d();var f=this.container.style.cursor,e=this.getTolerance(),h=this,g={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(h,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=h.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))}, -mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=h.container.scrollLeft;this.scrollTop=h.container.scrollTop;null==this.currentLink&&"auto"==h.container.style.overflow&&(h.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(h.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>e||d>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b= -b.parentNode;null!=b?this.clear():(null==this.currentState||c.getState()!=this.currentState&&null!=c.getState()||!h.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)}},mouseUp:function(a,d){for(var f=d.getSource(),g=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(g)&& -!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))&&(null!=this.currentLink?(f=h.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(g,this.currentLink),mxEvent.isConsumed(g)||(g=f?h.linkTarget:"_top","_self"==g&&window!=window.top?window.location.href=this.currentLink:this.currentLink.substring(0,h.baseUrl.length)==h.baseUrl&&"#"==this.currentLink.charAt(h.baseUrl.length)&&"_top"==g&&window==window.top?window.location.hash=this.currentLink.split("#")[1]:window.open(this.currentLink, -g),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&Math.abs(this.startX-d.getGraphX())<e&&Math.abs(this.startY-d.getGraphY())<e&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=h.getAbsoluteUrl(h.getLinkForCell(a.cell));null!=this.currentLink&&(h.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=h.container&&(h.container.style.cursor= -f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};h.click=function(a){};h.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),h=0;h<a.length;h++){var g=b.getParent(a[h]),m=this.moveCells([e[h]],d,d,!1,g)[0]; -f.push(m);if(c)b.add(g,e[h]);else{var n=g.getIndex(a[h]);b.add(g,e[h],n+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<d.length;e++)f.push(d[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}}; -Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells()); -if(null!=c&&1<c.length){for(var b=[],d=null,f=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var h=this.view.getState(c[e]);if(null!=h){var g=a?h.getCenterX():h.getCenterY(),d=null!=d?Math.max(d,g):g,f=null!=f?Math.min(f,g):g;b.push(h)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});h=this.view.translate;g=this.view.scale;f=f/g-(a?h.x:h.y);d=d/g-(a?h.x:h.y);this.getModel().beginUpdate();try{for(var m=(d-f)/(b.length-1),d=f,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)), -u=this.getCellGeometry(b[e].cell),d=d+m;null!=u&&null!=n&&(u=u.clone(),a?u.x=Math.round(d-u.width/2)-n.origin.x:u.y=Math.round(d-u.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,u))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var f= -this.view.getState(a[d]);if(null!=f){var e=this.getCellGeometry(c[d]);null==e||!e.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(d=0;d<a.length;d++)f.add(e,c[d]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)}); -return a};Graph.prototype.getSvg=function(a,c,b,d,f,e,h){c=null!=c?c:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;h=null!=h?h:!0;var g=e||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var m=this.view.scale,n=mxUtils.createXmlDocument();d=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+ -a));null==n.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/m;d.setAttribute("width",Math.max(1,Math.ceil(g.width*a)+2*b)+"px");d.setAttribute("height",Math.max(1,Math.ceil(g.height*a)+2*b)+"px");d.setAttribute("version","1.1");var u=d;f&&(u=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),u.setAttribute("transform", -"translate(0.5,0.5)"),d.appendChild(u));n.appendChild(d);n=this.createSvgCanvas(u);n.foOffset=f?-.5:0;n.textOffset=f?-.5:0;n.imageOffset=f?-.5:0;n.translate(Math.floor((b/c-g.x)/m),Math.floor((b/c-g.y)/m));var t=n.createAlternateContent;n.createAlternateContent=function(a,c,b,d,f,e,h,g,n,m,u,v,k){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&e.length<5*d/q.fontSize)){var z=this.createElement("text");z.setAttribute("x",Math.round(d/2));z.setAttribute("y",Math.round((f+q.fontSize)/ -2));z.setAttribute("fill",q.fontColor||"black");z.setAttribute("text-anchor","middle");z.setAttribute("font-size",Math.round(q.fontSize)+"px");z.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&z.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&z.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&z.setAttribute("text-decoration","underline"); -mxUtils.write(z,e);return z}return t.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=m/c,c=this.view.translate,f=new mxRectangle(c.x*f,c.y*f,b.width*f,b.height*f),mxUtils.intersects(g,f)&&n.image(c.x,c.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=h;h=this.createSvgImageExport();var v=h.drawCellState;h.drawCellState=function(a,c){(e||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),n);return d};Graph.prototype.createSvgCanvas= -function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c= -window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(c),f=0;f<d;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)}; -Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var f=document.createElement("th");b.rows[d].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(d=0;d<b.rows.length;d++)f=b.rows[d].insertCell(c),mxUtils.br(f);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,d=0;d<b.length;d++)b[d].cells.length>c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c; -if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){c=null!=c?c:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title", -a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<c.length&&(c=c.substring(0,26)+"..."+c.substring(c.length-10));mxUtils.write(b,c);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&& -null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,d=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,h){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()), -b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, -arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,d=a.rangeCount;b<d;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection= -function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(S){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)|| -!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor"; -this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border= -"")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var d=b.firstChild;null!=a&&null!=d;)c(a,d),a=a.nextSibling,d=d.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)d(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var f=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=f}}function d(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;d(c);c=b}1==a.nodeType&&("BR"=== +";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d? +d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},h=0;h<a;h++){var n=e.getChildAt(e.getRoot(),h);if(1!=a||this.isCellLocked(this.getDefaultParent()))n=this.importCells([n],0,0,this.model.getRoot(),null,g)[0],m=this.model.getChildren(n),this.moveCells(m,d,b),f=f.concat(m);else var m=e.getChildren(n),f=f.concat(this.importCells(m,d,b,this.getDefaultParent(), +null,g))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var r=this.getBoundingBoxFromGeometry(f,!0);null!=r&&this.moveCells(f,d-r.x,b-r.y)}}finally{this.model.endUpdate()}return f};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(Q){}return c}if(null!= +a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);null!=d&&(d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,d,[a]))}}; +Graph.prototype.isValidRoot=function(a){for(var d=this.model.getChildCount(a),b=0,c=0;c<d;c++){var f=this.model.getChildAt(a,c);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(d,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(d,"dropTarget", +"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(a){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this, +arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),g=d.getTerminal(f,!1);d.setTerminal(f,g,!0);d.setTerminal(f,e,!1);var h=d.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var n=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1); +h.setTerminalPoint(n,!1);h.setTerminalPoint(m,!0);d.setGeometry(f,h);var r=this.view.getState(f),u=this.view.getState(e),v=this.view.getState(g);if(null!=r){var k=null!=u?this.getConnectionConstraint(r,u,!0):null,K=null!=v?this.getConnectionConstraint(r,v,!1):null;this.setConnectionConstraint(f,e,!0,K);this.setConnectionConstraint(f,g,!1,k)}b.push(f)}}else if(d.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var q=h.width;h.width=h.height; +h.height=q;d.setGeometry(f,h);var w=this.view.getState(f);if(null!=w){var y=w.style[mxConstants.STYLE_DIRECTION]||"east";"east"==y?y="south":"south"==y?y="west":"west"==y?y="north":"north"==y&&(y="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,y,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell); +if(0<d.length)for(var b=0;b<d.length;b++)this.isReplacePlaceholders(d[b])&&this.view.invalidate(d[b],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,d,b){d=this.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(c)){this.setAttributeForCell(f,c,d);break}f= +this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",d);d=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var d=new mxDictionary,b=0;b<a.length;b++)d.put(a[b],!0);for(var c=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||d.get(f)||(d.put(f,!0),c.push(f))}for(b=0;b<c.length;b++)if(f=this.view.getState(c[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&& +this.isCellDeletable(f.cell)){var e=mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),g=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(e==mxConstants.NONE&&g==mxConstants.NONE){e=!0;for(g=0;g<this.model.getChildCount(f.cell)&&e;g++)d.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var d=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var c= +this.view.getState(a[b]);if(null!=c){var f=mxUtils.getValue(c.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(c.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&c==mxConstants.NONE&&d.push(a[b])}}a=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,d){this.setAttributeForCell(a,"link",d)};Graph.prototype.setTooltipForCell=function(a,d){this.setAttributeForCell(a,"tooltip",d)};Graph.prototype.setAttributeForCell= +function(a,d,b){var c;null!=a.value&&"object"==typeof a.value?c=a.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",a.value||""));null!=b&&0<b.length?c.setAttribute(d,b):c.removeAttribute(d);this.model.setValue(a,c)};Graph.prototype.getDropTarget=function(a,d,b,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this, +arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,d){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,f=mxEvent.getSource(a);this.firstClickState!=c||this.firstClickSource!=f||null!=c&&null!=c.text&&null!=c.text.node&& +(mxUtils.contains(c.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(a)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(d=this.addText(b.x,b.y,c))}mxGraph.prototype.dblClick.call(this,a,d)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x, +b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),f=this.getPageSize(),d=Math.max(d,c.x*f.width),b=Math.max(b,c.y*f.height);return new mxPoint(this.snap(d+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,d=this.getGraphBounds(),b=this.getInsertPoint(),c=this.snap(Math.round(Math.max(b.x,d.x/a.scale-a.translate.x+(0==d.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(d.y+d.height)/a.scale-a.translate.y+ +(0==d.height?1:2)*this.gridSize)));return new mxPoint(c,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,d,b){var c=new mxCell;c.value="Text";c.style="text;html=1;resizable=0;points=[];";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=b){c.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";c.geometry.relative=!0;c.connectable=!1;var f=this.view.getRelativePoint(b,a,d);c.geometry.x=Math.round(1E4*f.x)/1E4;c.geometry.y=Math.round(f.y); +c.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,c.geometry),e=this.view.scale;c.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((d-f.y)/e))}else c.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(a/this.view.scale)-f.x,c.geometry.y=Math.round(d/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([c],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted", +"cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,d,b){var c=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("href", +c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,e=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=g.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))}, +mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,d){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>e||c>e)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b= +b.parentNode;null!=b?this.clear():(null==this.currentState||d.getState()!=this.currentState&&null!=d.getState()||!g.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d)}},mouseUp:function(a,c){for(var f=c.getSource(),h=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==c.getState()||!c.isSource(c.getState().control))&&(mxEvent.isLeftMouseButton(h)&& +!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(h,this.currentLink),mxEvent.isConsumed(h)||(h=f?g.linkTarget:"_top","_self"==h&&window!=window.top?window.location.href=this.currentLink:this.currentLink.substring(0,g.baseUrl.length)==g.baseUrl&&"#"==this.currentLink.charAt(g.baseUrl.length)&&"_top"==h&&window==window.top?window.location.hash=this.currentLink.split("#")[1]:window.open(this.currentLink, +h),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor= +f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=b.getParent(a[g]),n=this.moveCells([e[g]],c,c,!1,h)[0]; +f.push(n);if(d)b.add(h,e[g]);else{var m=h.getIndex(a[g]);b.add(h,e[g],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}}; +Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells()); +if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var g=this.view.getState(d[e]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});g=this.view.translate;h=this.view.scale;f=f/h-(a?g.x:g.y);c=c/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var m=this.view.getState(this.model.getParent(b[e].cell)), +r=this.getCellGeometry(b[e].cell),c=c+n;null!=r&&null!=m&&(r=r.clone(),a?r.x=Math.round(c-r.width/2)-m.origin.x:r.y=Math.round(c-r.height/2)-m.origin.y,this.getModel().setGeometry(b[e].cell,r))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f= +this.view.getState(a[c]);if(null!=f){var e=this.getCellGeometry(d[c]);null==e||!e.relative||this.model.isEdge(a[c])||b.get(this.model.getParent(a[c]))||(e.relative=!1,e.x=f.x/f.view.scale-f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(e,d[c]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)}); +return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g){d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var h=e||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var n=this.view.scale,m=mxUtils.createXmlDocument();c=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=c.style?c.style.backgroundColor=a:c.setAttribute("style","background-color:"+ +a));null==m.createElementNS?(c.setAttribute("xmlns",mxConstants.NS_SVG),c.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/n;c.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*b)+"px");c.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*b)+"px");c.setAttribute("version","1.1");var r=c;f&&(r=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),r.setAttribute("transform", +"translate(0.5,0.5)"),c.appendChild(r));m.appendChild(c);m=this.createSvgCanvas(r);m.foOffset=f?-.5:0;m.textOffset=f?-.5:0;m.imageOffset=f?-.5:0;m.translate(Math.floor((b/d-h.x)/n),Math.floor((b/d-h.y)/n));var u=m.createAlternateContent;m.createAlternateContent=function(a,d,b,c,f,e,g,h,m,n,r,v,k){var q=this.state;if(null!=this.foAltText&&(0==c||0!=q.fontSize&&e.length<5*c/q.fontSize)){var y=this.createElement("text");y.setAttribute("x",Math.round(c/2));y.setAttribute("y",Math.round((f+q.fontSize)/ +2));y.setAttribute("fill",q.fontColor||"black");y.setAttribute("text-anchor","middle");y.setAttribute("font-size",Math.round(q.fontSize)+"px");y.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&y.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&y.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&y.setAttribute("text-decoration","underline"); +y.innerHTML=e;return y}return u.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=n/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(h,f)&&m.image(d.x,d.y,b.width,b.height,b.src,!0));m.scale(a);m.textEnabled=g;g=this.createSvgImageExport();var v=g.drawCellState;g.drawCellState=function(a,d){(e||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),m);return c};Graph.prototype.createSvgCanvas= +function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var d=null;if(window.getSelection){if(d= +window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),f=0;f<c;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)}; +Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d; +if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,d){d=null!=d?d:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title", +a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<d.length&&(d=d.substring(0,26)+"..."+d.substring(d.length-10));mxUtils.write(b,d);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&& +null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()), +b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, +arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection= +function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(S){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)|| +!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor"; +this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border= +"")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}1==a.nodeType&&("BR"=== a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode|| -mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0, -g.length-1));g=this.graph.sanitizeHtml(c?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,h=(mxUtils.getValue(a.style, -mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle= -h?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,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.innerHTML="");var g=mxUtils.htmlEntities(this.textarea.innerHTML); -mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(c?g.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"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.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var r=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a, -c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.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)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth< +mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0, +h.length-1));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style, +mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle= +g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,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.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML); +mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a, +d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE))); +this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth< this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="", -r.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= -function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var c=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer= -function(){try{this.graph.container.focus()}catch(K){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell], -!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var h=mxGraphHandler.prototype.moveCells; -mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,e){mxEvent.isAltDown(e)&&(f=null);h.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width- -this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null== -mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var m=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a= -new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=m.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+ -"°":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint= -function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-d.x),d=this.roundLength(b.y/f-d.y);this.hint.innerHTML=e+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&& -null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint; +t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= +function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(a.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var d=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer= +function(){try{this.graph.container.focus()}catch(K){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell], +!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var g=mxGraphHandler.prototype.moveCells; +mxGraphHandler.prototype.moveCells=function(a,d,b,c,f,e){mxEvent.isAltDown(e)&&(f=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/c-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/c-b.y);this.hint.innerHTML=d+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width- +this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,d){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(d.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null== +mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,d){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a= +new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=this.sizers[0].bounds.width+d,a.y=this.sizers[0].bounds.height+d):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+ +"°":(d=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/d)+" x "+this.roundLength(this.bounds.height/d)),d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==d&&(d=this.bounds),this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=d.y+d.height+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint= +function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var c=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-c.x),c=this.roundLength(b.y/f-c.y);this.hint.innerHTML=e+", "+c;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&& +null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint; HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="#007dfc" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="#007dfc" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'): new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="#007dfc" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA6ZJREFUeNqM001IY1cUB/D/fYmm2sbR2lC1zYlgoRG6MpEyBlpxM9iFIGKFIm3s0lCKjOByhCLZCFqLBF1YFVJdSRbdFHRhBbULtRuFVBTzYRpJgo2mY5OX5N9Fo2TG+eiFA/dd3vvd8+65ByTxshARTdf1JySp6/oTEdFe9T5eg5lIcnBwkCSZyWS+exX40oyur68/KxaLf5Okw+H4X+A9JBaLfUySZ2dnnJqaosPhIAACeC34DJRKpb7IZrMcHx+nwWCgUopGo/EOKwf9fn/1CzERUevr6+9ls1mOjIwQAH0+H4PBIKPR6D2ofAQCgToRUeVYJUkuLy8TANfW1kiS8/PzCy84Mw4MDBAAZ2dnmc/nub+/X0MSEBF1cHDwMJVKsaGhgV6vl+l0mqOjo1+KyKfl1dze3l4NBoM/PZ+diFSLiIKIGBOJxA9bW1sEwNXVVSaTyQMRaRaRxrOzs+9J8ujoaE5EPhQRq67rcZ/PRwD0+/3Udf03EdEgIqZisZibnJykwWDg4eEhd3Z2xkXELCJvPpdBrYjUiEhL+Xo4HH4sIhUaAKNSqiIcDsNkMqG+vh6RSOQQQM7tdhsAQCkFAHC73UUATxcWFqypVApmsxnDw8OwWq2TADQNgAYAFosF+XweyWQSdru9BUBxcXFRB/4rEgDcPouIIx6P4+bmBi0tLSCpAzBqAIqnp6c/dnZ2IpfLYXNzE62traMADACKNputpr+/v8lms9UAKAAwiMjXe3t7KBQKqKurQy6Xi6K0i2l6evpROp1mbW0t29vbGY/Hb8/IVIqq2zlJXl1dsaOjg2azmefn5wwEAl+JSBVExCgi75PkzMwMlVJsbGxkIpFgPp8PX15ePopEIs3JZPITXdf/iEajbGpqolKKExMT1HWdHo/nIxGpgIgoEXnQ3d39kCTHxsYIgC6Xi3NzcwyHw8xkMozFYlxaWmJbWxuVUuzt7WUul6PX6/1cRN4WEe2uA0SkaWVl5XGpRVhdXU0A1DSNlZWVdz3qdDrZ09PDWCzG4+Pjn0XEWvp9KJKw2WwKwBsA3gHQHAqFfr24uMDGxgZ2d3cRiUQAAHa7HU6nE319fTg5Ofmlq6vrGwB/AngaCoWK6rbsNptNA1AJoA7Aux6Pp3NoaMhjsVg+QNmIRqO/u1yubwFEASRKUAEA7rASqABUAKgC8KAUb5XWCOAfAFcA/gJwDSB7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=": IMAGE_PATH+"/handle-rotate.png",19,21);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#007dfc"/>'));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage= @@ -2375,232 +2375,232 @@ HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverI Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src, (new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxVertexHandler.prototype.rotationHandleVSpacing= -20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())}; -if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return null== -a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var n=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){n.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return mxEvent.isLeftMouseButton(c)&& -(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,d=null,f=null,e=null,h=null;null!=this.first&& -null!=this.currentX&&null!=this.currentY&&(d=this.first.x,f=this.first.y,e=(this.currentX-d)/this.graph.view.scale,h=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),h=this.graph.snap(h),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(h)<this.graph.tolerance&&(h=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),g= -this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(g=this.graph.getCellsBeyond(d,f,this.graph.getDefaultParent(),!0,!0),b=0;b<g.length;b++)if(this.graph.isCellMovable(g[b])){var n=this.graph.view.getState(g[b]),m=this.graph.getCellGeometry(g[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,h),this.graph.model.setGeometry(g[b],m))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y, -this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,f=this.first.x-d,e=this.first.y-b,h=this.graph.tolerance;if(null!=this.div||Math.abs(f)>h||Math.abs(e)>h)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,b), -this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left= +if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return null== +a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var m=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){m.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&& +(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,d){var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,g=null;null!=this.first&& +null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),h= +this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var m=this.graph.view.getState(h[b]),n=this.graph.getCellGeometry(h[b]);null!=m&&null!=n&&(n=n.clone(),n.translate(e,g),this.graph.model.setGeometry(h[b],n))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y, +this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b), +this.isSpaceEvent(d)?(c=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left= this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height= -Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var g=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);g.apply(this, -arguments)};var x=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){v.apply(this,arguments);b!=this.currentTerminalState?(x=(new Date).getTime(),u=0):u=(new Date).getTime()-x;this.currentTerminalState=b};var t=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState|| -"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&t.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b), -f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE? -HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return y.apply(this, -arguments)};var w=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):w.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown; -mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells|| -this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var G=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp= -function(a,c){G.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display= -1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state)); -c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(b,d);if(null!=b||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!= -this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d= -document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/edit.gif");d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage); -d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"), -mxUtils.getTextContent(b[d])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var H=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!= -this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE, -this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.apply(this); -if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b, -c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var E=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy= +Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),d.consume()}};var h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);h.apply(this, +arguments)};var w=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){v.apply(this,arguments);b!=this.currentTerminalState?(w=(new Date).getTime(),u=0):u=(new Date).getTime()-w;this.currentTerminalState=b};var r=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState|| +"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&r.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,d){var b=null!=a&&0==a,c=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b), +f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE? +HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return x.apply(this, +arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):z.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown; +mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells|| +this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var G=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp= +function(a,d){G.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display= +1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state)); +d()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,b){if(null==d&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!= +this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=d||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var c= +document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/edit.gif");c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));c=document.createElement("img");c.setAttribute("src",Dialog.prototype.clearImage); +c.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));c.setAttribute("width","13");c.setAttribute("height","10");c.style.marginLeft="4px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(c=0;c<b.length;c++){var f=document.createElement("div");f.style.marginTop=null!=d||0<c?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[c].getAttribute("href"), +mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var H=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!= +this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(d,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(d,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE, +this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=d||null!=b&&0<b.length)this.updateLinkHint(d,b),this.redrawHandles()};var y=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){y.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.apply(this); +if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=d&&(b=Math.max(b, +d.y+d.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var E=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy= function(){I.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Y=mxEdgeHandler.prototype.redrawHandles; mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Y.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var R=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset= function(){R.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var P=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler), -this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function r(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function h(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function g(a,c){this.canvas= -a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,g.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,g.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,g.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,g.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,g.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,g.prototype.arcTo)}function x(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function t(){mxActor.call(this)}function A(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function B(){mxShape.call(this)}function G(){mxShape.call(this)} -function C(){mxEllipse.call(this)}function H(){mxShape.call(this)}function z(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function I(){mxShape.call(this)}function Y(){mxShape.call(this)}function R(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function K(){mxDoubleEllipse.call(this)}function J(){mxArrowConnector.call(this);this.spacing=0}function M(){mxArrowConnector.call(this);this.spacing=0}function S(){mxActor.call(this)}function D(){mxRectangleShape.call(this)} +this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function t(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function m(){mxActor.call(this)}function h(a,d){this.canvas= +a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,h.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,h.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,h.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,h.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; +this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function r(){mxActor.call(this)}function A(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function B(){mxShape.call(this)}function G(){mxShape.call(this)} +function C(){mxEllipse.call(this)}function H(){mxShape.call(this)}function y(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function I(){mxShape.call(this)}function Y(){mxShape.call(this)}function R(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function K(){mxDoubleEllipse.call(this)}function J(){mxArrowConnector.call(this);this.spacing=0}function M(){mxArrowConnector.call(this);this.spacing=0}function S(){mxActor.call(this)}function D(){mxRectangleShape.call(this)} function W(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(){mxActor.call(this)}function U(){mxActor.call(this)}function T(){mxActor.call(this)}function O(){mxActor.call(this)}function ca(){mxActor.call(this)}function V(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function ia(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function fa(){mxRhombus.call(this)}function ja(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)} -function qa(){mxEllipse.call(this)}function na(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Aa(a,c,b,d,f,e,h,g,m,n){h+=m;var ga=d.clone();d.x-=f*(2*h+m);d.y-=e*(2*h+m);f*=h+m;e*=h+m;return function(){a.ellipse(ga.x-f-h,ga.y-e-h,2*h,2*h);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d, -Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube", -a);var xa=Math.tan(mxUtils.toRadians(30)),la=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/xa);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*la);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-la)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(d,f/(.5+xa));e?(a.moveTo(0,.25*c),a.lineTo(.5* -c,(.5-la)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-la)*c),a.lineTo(.5*c,(1-la)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*la),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-la)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e|| -(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,f-c),a.curveTo(d,f+c/3,0,f+c/3,0,f-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore", -d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d-c,0),a.lineTo(d-c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d/2,.5*f,d,0);a.quadTo(.5* -d,f/2,d,f);a.quadTo(d/2,.5*f,0,f);a.quadTo(.5*d,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var h=mxUtils.getValue(this.style,"tabPosition",this.tabPosition); -e?"left"==h?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==h?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style, -mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(r,mxActor);r.prototype.size=.4;r.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,f-c/2);a.quadTo(3* -d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};r.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,d)}return a};mxCellRenderer.registerShape("tape", -r);mxUtils.extend(c,mxActor);c.prototype.size=.3;c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};c.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close(); -a.end()};mxCellRenderer.registerShape("document",c);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a, -[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(h,mxActor);h.prototype.size=.2;h.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,f)],this.isRounded, -b,!0)};mxCellRenderer.registerShape("trapezoid",h);mxUtils.extend(m,mxActor);m.prototype.size=.5;m.prototype.redrawPath=function(a,c,b,d,f){a.setFillColor(null);c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f/2),new mxPoint(0,f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(d,f)],this.isRounded,b,!1);a.end()}; -mxCellRenderer.registerShape("curlyBracket",m);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,c,b,d,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",n);g.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};g.prototype.close=function(){null!=this.firstX&& -null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};g.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};g.prototype.curveTo=function(a,c,b,d,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};g.prototype.arcTo=function(a,c,b,d,f,e,h){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY= -h};g.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),e=Math.sqrt(d*d+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var h=Math.round(e/10),ga=this.defaultVariation;5>h&&(h=5,ga/=3);for(var g=b(a-this.lastX)*d/h,b=b(c-this.lastY)*f/h,d=d/e,f=f/e,e=0;e<h;e++){var m=(Math.random()-.5)*ga;this.originalLineTo.call(this.canvas, -g*e+this.lastX-m*f,b*e+this.lastY-m*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};g.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint= -function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new g(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)}; -var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,d,f){if(null==a.handJiggle)Ga.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE, -0)?e=Math.min(d/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(d*e,f*e)),a.moveTo(c+e,b),a.lineTo(c+d-e,b),a.quadTo(c+d,b,c+d,b+e),a.lineTo(c+d,b+f-e),a.quadTo(c+d,b+f,c+d-e,b+f),a.lineTo(c+e,b+f),a.quadTo(c,b+f,c,b+f-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+f),a.lineTo(c,b+f),a.lineTo(c, -b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(x,mxRectangleShape);x.prototype.size=.1;x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c= -a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*f,b*f));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};x.prototype.paintForeground=function(a,c,b,d,f){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var h= -mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*h,f*h));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+f);a.moveTo(c+d-e,b);a.lineTo(c+d-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",x);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,c,b,d,f){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,f);a.fill()};u.prototype.paintForeground= -function(a,c,b,d,f){};mxCellRenderer.registerShape("transparent",u);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,c,b,d,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),h=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-b),new mxPoint(Math.min(d,e+g),f-b),new mxPoint(h,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout", -v);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.redrawPath=function(a,c,b,d,f){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d- -c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(A,mxHexagon);A.prototype.size=.25;A.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*f),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)], -this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",A);mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.paintForeground=function(a,c,b,d,f){var e=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+e);a.lineTo(c+d/2,b+f-e);a.moveTo(c+e,b+f/2);a.lineTo(c+d-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",y);var Ba=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds= -function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,f){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&(a.setShadow(!1),Ba.apply(this,[a,c, -b,d,f]))}};mxUtils.extend(w,mxRectangleShape);w.prototype.isHtmlAllowed=function(){return!1};w.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};w.prototype.paintForeground=function(a,c,b,d,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| -0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,h;do{h=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=h){var g=this.style["symbol"+e+"Align"],ga=this.style["symbol"+e+"VerticalAlign"],m=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||u,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(d+this.strokewidth, -f+this.strokewidth),u+=v,t+=v);var v=c,k=b,v=g==mxConstants.ALIGN_CENTER?v+(d-m)/2:g==mxConstants.ALIGN_RIGHT?v+(d-m-u):v+u,k=ga==mxConstants.ALIGN_MIDDLE?k+(f-n)/2:ga==mxConstants.ALIGN_BOTTOM?k+(f-n-t):k+t;a.save();g=new h;g.style=this.style;h.prototype.paintVertexShape.call(g,a,v,k,m,n);a.restore()}e++}while(null!=h)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",w);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,c,b,d,f,e){e? -(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(B,mxShape);B.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()}; -mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(G,mxShape);G.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};G.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",G);mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(a,c, -b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",C);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+ -a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};z.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",z);mxUtils.extend(L,mxRectangleShape);L.prototype.size=40;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.getLabelBounds= -function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};L.prototype.paintBackground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),h=mxUtils.getValue(this.style,"participant");null==h||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,d,e):(h=this.state.view.graph.cellRenderer.getShape(h),null!=h&&h!=L&&(h=new h, -h.apply(this.state),a.save(),h.paintVertexShape(a,c,b,d,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+e),a.lineTo(c+d/2,b+f),a.end(),a.stroke())};L.prototype.paintForeground=function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",L);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner= -10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};E.prototype.paintBackground=function(a,c,b,d,f){var e=this.corner,h=Math.min(d,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style, -mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(c,b,d,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,d,f),a.setGradient(this.fill,this.gradient,c,b,d,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+h,b);a.lineTo(c+h,b+Math.max(0,g-1.5*e));a.lineTo(c+Math.max(0,h-e),b+g);a.lineTo(c,b+g);a.close();a.fillAndStroke();a.begin(); -a.moveTo(c+h,b);a.lineTo(c+d,b);a.lineTo(c+d,b+f);a.lineTo(c,b+f);a.lineTo(c,b+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=L.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+d,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter); -mxPerimeter.OrthogonalPerimeter=function(a,c,b,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,d){d=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(d+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x< -a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",v.prototype.size))* -c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var h=a.x,g=a.y,m=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+ -m,g+e),new mxPoint(h+m,g+n),new mxPoint(h,g+n-e),new mxPoint(h,g)]):(e=m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h+e,g),new mxPoint(h+m,g),new mxPoint(h+m-e,g+n),new mxPoint(h,g+n),new mxPoint(h+e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(b.x<h||b.x>h+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=h.prototype.size;null!=c&&(f= -mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,m=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+m-f,g),new mxPoint(e+m,g+n),new mxPoint(e,g+n),new mxPoint(e+f,g)]):c==mxConstants.DIRECTION_WEST?(f=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(e,g),new mxPoint(e+m,g),new mxPoint(e+m-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e, -g)]):c==mxConstants.DIRECTION_NORTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(e,g+f),new mxPoint(e+m,g),new mxPoint(e+m,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f)]):(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(e,g),new mxPoint(e+m,g+f),new mxPoint(e+m,g+n-f),new mxPoint(e,g+n),new mxPoint(e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);d&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(g,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter); -mxPerimeter.StepPerimeter=function(a,c,b,d){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?t.prototype.fixedSize:t.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var h=a.x,g=a.y,m=a.width,n=a.height,u=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(h+m- -f,g),new mxPoint(h+m,a),new mxPoint(h+m-f,g+n),new mxPoint(h,g+n),new mxPoint(h+f,a),new mxPoint(h,g)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),g=[new mxPoint(h+f,g),new mxPoint(h+m,g),new mxPoint(h+m-f,a),new mxPoint(h+m,g+n),new mxPoint(h+f,g+n),new mxPoint(h,a),new mxPoint(h+f,g)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g+f),new mxPoint(u,g),new mxPoint(h+m,g+f),new mxPoint(h+m, -g+n),new mxPoint(u,g+n-f),new mxPoint(h,g+n),new mxPoint(h,g+f)]):(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),g=[new mxPoint(h,g),new mxPoint(u,g+f),new mxPoint(h+m,g),new mxPoint(h+m,g+n-f),new mxPoint(u,g+n),new mxPoint(h,g+n-f),new mxPoint(h,g)]);u=new mxPoint(u,a);d&&(b.x<h||b.x>h+m?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(g,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var f=A.prototype.size;null!= -c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,h=a.y,g=a.width,m=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(n,h),new mxPoint(e+g,h+f),new mxPoint(e+g,h+m-f),new mxPoint(n,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f),new mxPoint(n,h)]):(f=g*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+ -f,h),new mxPoint(e+g-f,h),new mxPoint(e+g,a),new mxPoint(e+g-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e,a),new mxPoint(e+f,h)]);n=new mxPoint(n,a);d&&(b.x<e||b.x>e+g?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(h,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-e)/2,0,e,e);a.fillAndStroke(); -a.begin();a.moveTo(d/2,e);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",I);mxUtils.extend(Y,mxShape);Y.prototype.size=10;Y.prototype.inset=2;Y.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,e+h);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-e)/2-h,e/2);a.quadTo((d-e)/2-h,e+h,d/ -2,e+h);a.quadTo((d+e)/2+h,e+h,(d+e)/2+h,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Y);mxUtils.extend(R,mxCylinder);R.prototype.jettyWidth=32;R.prototype.jettyHeight=12;R.prototype.redrawPath=function(a,c,b,d,f,e){var h=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=h/2;var h=b+h/2,g=.3*f-c/2,m=.7*f-c/2;e?(a.moveTo(b,g),a.lineTo(h,g),a.lineTo(h,g+c),a.lineTo(b,g+c),a.moveTo(b,m), -a.lineTo(h,m),a.lineTo(h,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,g+c),a.lineTo(0,g+c),a.lineTo(0,g),a.lineTo(b,g),a.close());a.end()};mxCellRenderer.registerShape("component",R);mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.min(4,Math.min(d/5,f/5));0<d&&0<f&&(a.ellipse(c+e,b+e,d-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1); -this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.registerShape("endState",P);mxUtils.extend(K,P);K.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",K);mxUtils.extend(J,mxArrowConnector);J.prototype.defaultWidth=4;J.prototype.isOpenEnded=function(){return!0};J.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};J.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link", +function qa(){mxEllipse.call(this)}function na(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,h,n,m){g+=n;var ga=c.clone();c.x-=f*(2*g+n);c.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(ga.x-f-g,ga.y-e-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c, +Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d,f),a.lineTo(d,d),a.lineTo(0,0),a.moveTo(d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(d,f),a.lineTo(0,f-d),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube", +a);var xa=Math.tan(mxUtils.toRadians(30)),la=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/xa);a.translate((c-d)/2,(f-d)/2+d/4);a.moveTo(0,.25*d);a.lineTo(.5*d,d*la);a.lineTo(d,.25*d);a.lineTo(.5*d,(.5-la)*d);a.lineTo(0,.25*d);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(c,f/(.5+xa));e?(a.moveTo(0,.25*d),a.lineTo(.5* +d,(.5-la)*d),a.lineTo(d,.25*d),a.moveTo(.5*d,(.5-la)*d),a.lineTo(.5*d,(1-la)*d)):(a.translate((c-d)/2,(f-d)/2),a.moveTo(0,.25*d),a.lineTo(.5*d,d*la),a.lineTo(d,.25*d),a.lineTo(d,.75*d),a.lineTo(.5*d,(1-la)*d),a.lineTo(0,.75*d),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(c,mxCylinder);c.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e|| +(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,-d);e||(a.moveTo(0,d),a.curveTo(0,-d/3,c,-d/3,c,d),a.lineTo(c,f-d),a.curveTo(c,f+d/3,0,f+d/3,0,f-d),a.close())};c.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore", +c);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c-d,0),a.lineTo(c-d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c/2,.5*f,c,0);a.quadTo(.5* +c,f/2,c,f);a.quadTo(c/2,.5*f,0,f);a.quadTo(.5*c,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition); +e?"left"==g?(a.moveTo(0,b),a.lineTo(d,b)):(a.moveTo(c-d,b),a.lineTo(c,b)):("left"==g?(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,b),a.lineTo(c,b)):(a.moveTo(0,b),a.lineTo(c-d,b),a.lineTo(c-d,0),a.lineTo(c,0)),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style, +mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",q);mxUtils.extend(t,mxActor);t.prototype.size=.4;t.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3* +c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape", +t);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};d.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close(); +a.end()};mxCellRenderer.registerShape("document",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a, +[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,f)],this.isRounded, +b,!0)};mxCellRenderer.registerShape("trapezoid",g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,d,b,c,f){a.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()}; +mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",m);h.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};h.prototype.close=function(){null!=this.firstX&& +null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};h.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};h.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};h.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY= +g};h.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var g=Math.round(e/10),ga=this.defaultVariation;5>g&&(g=5,ga/=3);for(var h=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*ga;this.originalLineTo.call(this.canvas, +h*e+this.lastX-n*f,b*e+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint= +function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new h(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)}; +var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,d,b,c,f){if(null==a.handJiggle)Ga.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE, +0)?e=Math.min(c/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(c*e,f*e)),a.moveTo(d+e,b),a.lineTo(d+c-e,b),a.quadTo(d+c,b,d+c,b+e),a.lineTo(d+c,b+f-e),a.quadTo(d+c,b+f,d+c-e,b+f),a.lineTo(d+e,b+f),a.quadTo(d,b+f,d,b+f-e),a.lineTo(d,b+e),a.quadTo(d,b,d+e,b)):(a.moveTo(d,b),a.lineTo(d+c,b),a.lineTo(d+c,b+f),a.lineTo(d,b+f),a.lineTo(d, +b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(w,mxRectangleShape);w.prototype.size=.1;w.prototype.isHtmlAllowed=function(){return!1};w.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var d= +a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*f,b*f));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};w.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g= +mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",w);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};u.prototype.paintForeground= +function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",u);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};v.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+h),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout", +v);mxUtils.extend(r,mxActor);r.prototype.size=.2;r.prototype.fixedSize=20;r.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c- +d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",r);mxUtils.extend(A,mxHexagon);A.prototype.size=.25;A.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)], +this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",A);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Ba=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds= +function(a){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape=function(a,d,b,c,f){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&(a.setShadow(!1),Ba.apply(this,[a,d, +b,c,f]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};z.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| +0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var h=this.style["symbol"+e+"Align"],ga=this.style["symbol"+e+"VerticalAlign"],n=this.style["symbol"+e+"Width"],m=this.style["symbol"+e+"Height"],r=this.style["symbol"+e+"Spacing"]||0,u=this.style["symbol"+e+"VSpacing"]||r,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(c+this.strokewidth, +f+this.strokewidth),r+=v,u+=v);var v=d,k=b,v=h==mxConstants.ALIGN_CENTER?v+(c-n)/2:h==mxConstants.ALIGN_RIGHT?v+(c-n-r):v+r,k=ga==mxConstants.ALIGN_MIDDLE?k+(f-m)/2:ga==mxConstants.ALIGN_BOTTOM?k+(f-m-u):k+u;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,v,k,n,m);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,d,b,c,f,e){e? +(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(B,mxShape);B.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()}; +mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(G,mxShape);G.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};G.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",G);mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(a,d, +b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",C);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(y,mxShape);y.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+ +a.height/8,a.width,7*a.height/8)};y.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,f/8,c,7*f/8);a.fillAndStroke()};y.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",y);mxUtils.extend(L,mxRectangleShape);L.prototype.size=40;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.getLabelBounds= +function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,d)};L.prototype.paintBackground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=L&&(g=new g, +g.apply(this.state),a.save(),g.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};L.prototype.paintForeground=function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",L);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner= +10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};E.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,g=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style, +mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+g,b);a.lineTo(d+g,b+Math.max(0,h-1.5*e));a.lineTo(d+Math.max(0,g-e),b+h);a.lineTo(d,b+h);a.close();a.fillAndStroke();a.begin(); +a.moveTo(d+g,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=L.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter); +mxPerimeter.OrthogonalPerimeter=function(a,d,b,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,d,b,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return b.x< +a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",v.prototype.size))* +d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,n=a.width,m=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+ +n,h+e),new mxPoint(g+n,h+m),new mxPoint(g,h+m-e),new mxPoint(g,h)]):(e=n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+n,h),new mxPoint(g+n-e,h+m),new mxPoint(g,h+m),new mxPoint(g+e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);c&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f= +mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,n=a.width,m=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+n-f,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m),new mxPoint(e+f,h)]):d==mxConstants.DIRECTION_WEST?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h),new mxPoint(e+n-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e, +h)]):d==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+n,h),new mxPoint(e+n,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f)]):(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+n,h+f),new mxPoint(e+n,h+m-f),new mxPoint(e,h+m),new mxPoint(e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);c&&(b.x<e||b.x>e+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter); +mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?r.prototype.fixedSize:r.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,n=a.width,m=a.height,u=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+n- +f,h),new mxPoint(g+n,a),new mxPoint(g+n-f,h+m),new mxPoint(g,h+m),new mxPoint(g+f,a),new mxPoint(g,h)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+n,h),new mxPoint(g+n-f,a),new mxPoint(g+n,h+m),new mxPoint(g+f,h+m),new mxPoint(g,a),new mxPoint(g+f,h)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(u,h),new mxPoint(g+n,h+f),new mxPoint(g+n, +h+m),new mxPoint(u,h+m-f),new mxPoint(g,h+m),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(u,h+f),new mxPoint(g+n,h),new mxPoint(g+n,h+m-f),new mxPoint(u,h+m),new mxPoint(g,h+m-f),new mxPoint(g,h)]);u=new mxPoint(u,a);c&&(b.x<g||b.x>g+n?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(h,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=A.prototype.size;null!= +d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,h=a.width,n=a.height,m=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+n-f),new mxPoint(m,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(m,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+ +f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);m=new mxPoint(m,a);c&&(b.x<e||b.x>e+h?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(g,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke(); +a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",I);mxUtils.extend(Y,mxShape);Y.prototype.size=10;Y.prototype.inset=2;Y.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/ +2,e+g);a.quadTo((c+e)/2+g,e+g,(c+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Y);mxUtils.extend(R,mxCylinder);R.prototype.jettyWidth=32;R.prototype.jettyHeight=12;R.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,h=.3*f-d/2,n=.7*f-d/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+d),a.lineTo(b,h+d),a.moveTo(b,n), +a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,h+d),a.lineTo(0,h+d),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",R);mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2*e),a.fillAndStroke());a.setShadow(!1); +this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",P);mxUtils.extend(K,P);K.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",K);mxUtils.extend(J,mxArrowConnector);J.prototype.defaultWidth=4;J.prototype.isOpenEnded=function(){return!0};J.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};J.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link", J);mxUtils.extend(M,mxArrowConnector);M.prototype.defaultWidth=10;M.prototype.defaultArrowWidth=20;M.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};M.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};M.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow", -M);mxUtils.extend(S,mxActor);S.prototype.size=30;S.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",S);mxUtils.extend(D,mxRectangleShape);D.prototype.dx=20;D.prototype.dy=20;D.prototype.isHtmlAllowed= -function(){return!1};D.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*h,f*h));h=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+d,b+e); -a.end();a.stroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+h,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",D);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE, -mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",W);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);a.lineTo(d,f/2);a.end()};mxCellRenderer.registerShape("crossbar",Q);mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy= -20;X.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d- -c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",X);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(0,e)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize)))); -b=(f-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",T);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close(); -a.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit", -Z);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape= -function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse", -da);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ma);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this, -arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ja);mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape= -function(a,c,b,d,f){var e=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+d,e);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,e);a.lineTo(c+d-10,e-5);a.moveTo(c+d,e);a.lineTo(c+d-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ba);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this, -arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,d,f),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+f):a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",qa);mxUtils.extend(na, -mxEllipse);na.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,b+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",na);mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0, -f);a.close();a.end()};mxCellRenderer.registerShape("delay",ta);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(f-e)/2;b=c+e;var h=(d-e)/2,e=h+e;a.moveTo(0,c);a.lineTo(h,c);a.lineTo(h,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(h,f);a.lineTo(h,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross", -oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",pa);mxUtils.extend(ka,mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,c,b){for(var d= -[],f=0;f<c.length;f++)d.push(mxUtils.clone(c[f]));var f=a.state.dashed,e=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ka.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",ka);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors; -StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,f,e,h,g,m,n){var u=f*(h+m+1),t=e*(h+m+1);return function(){a.begin();a.moveTo(d.x-u/2-t/2,d.y-t/2+u/2);a.lineTo(d.x+t/2-3*u/2,d.y-3*t/2-u/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,e,h,g,m, -n){var u=f*(h+m+1),t=e*(h+m+1);return function(){a.begin();a.moveTo(d.x-u/2-t/2,d.y-t/2+u/2);a.lineTo(d.x+t/2-3*u/2,d.y-3*t/2-u/2);a.moveTo(d.x-u/2+t/2,d.y-t/2-u/2);a.lineTo(d.x-t/2-3*u/2,d.y-3*t/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,e,h,g,m,n){var u=d.clone(),t=Aa.apply(this,arguments),v=f*(h+2*m),k=e*(h+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(u.x-f*m,u.y-e*m);a.lineTo(u.x-2*v+f*m,u.y-2*k+e*m);a.moveTo(u.x- -v-k+e*m,u.y-k+v-f*m);a.lineTo(u.x+k-v-e*m,u.y-k-v+f*m);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,d,f,e,h,g,m,n){c=f*m*1.118;b=e*m*1.118;f*=h+m;e*=h+m;var u=d.clone();u.x-=c;u.y-=b;d.x+=1*-f-c;d.y+=1*-e-b;return function(){a.begin();a.moveTo(u.x,u.y);g?a.lineTo(u.x-f-e/2,u.y-e+f/2):a.lineTo(u.x+e/2-f,u.y-e-f/2);a.lineTo(u.x-f,u.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,e,h,g,m,n,u){e*=g+n;h*=g+n;var t= -f.clone();return function(){c.begin();c.moveTo(t.x,t.y);m?c.lineTo(t.x-e-h/a,t.y-h+e/a):c.lineTo(t.x+h/a-e,t.y-h-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,c,b){return ra(a,["width"],c,function(c,d,f,e,h){h=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+d*c/4+f*h/2,e.y+f*c/4-d*h/2)},function(c,d,f,e,h,g){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ra=function(a,c,b,d,f){return N(a,c, -function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var h=a.view.scale,g=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-g.x,m=f.y-g.y,n=Math.sqrt(e*e+m*m),g=d.call(this,n,e/n,m/n,g,f);return new mxPoint(g.x/h-c.x,g.y/h-c.y)},function(c,d,e){var h=a.absolutePoints,g=h.length-1;c=a.view.translate;var m=a.view.scale,n=b?h[0]:h[g],h=b?h[1]:h[g-1],g=h.x-n.x,u=h.y-n.y,t=Math.sqrt(g*g+u*u);d.x=(d.x+c.x)*m;d.y=(d.y+c.y)*m;f.call(this,t,g/t,u/t,n,h,d,e)})},ha=function(a){return function(c){return[N(c,["arrowWidth", -"arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},ya=function(a,c,b){return function(d){var f= -[N(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ea(d));return f}},ua=function(a,c,b,d,f){b=null!=b?b:1;return function(e){var h=[N(e,["size"],function(c){var b=null!=f?"0"!=mxUtils.getValue(this.state.style, -"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var h=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=h?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));h&&!mxEvent.isAltDown(d.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(ea(e));return h}},Da=function(a){return function(c){var b= -[N(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ea(c));return b}},sa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c}},ea=function(a,c){return N(a, -[mxConstants.STYLE_ARCSIZE],function(b){var d=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+d)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)* -f),b.y+d)},function(c,b,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},N=function(a,c,b,d,f,e){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])}; -h.getPosition=b;h.setPosition=d;h.ignoreGrid=null!=f?f:!0;if(e){var g=h.positionChanged;h.positionChanged=function(){g.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},za={link:function(a){return[Ca(a,!0,10),Ca(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c, -b,d,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale; -a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getStartArrowWidth()- -a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0, -Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth= -a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f, -e,h,g,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))< -c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,h,g,m){b= -Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,g.x,g.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,g.x,g.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])- -parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[N(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(), -c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ea(a,b/2))}return c}, -label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var c=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style, -"width",E.prototype.width))),b=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[N(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style, -"size",x.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},cross:function(a){return[N(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width, -a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c= -[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",S.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},dataStorage:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+ -(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[N(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style, -"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var c= -Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width, -c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},internalStorage:function(a){var c=[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",D.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",D.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0, -Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},corner:function(a){return[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0, -Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5), -folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style, -"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]}, -tape:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",r.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)}, -function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:ua(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:ua(A.prototype.size,!0,.5,!0),curlyBracket:ua(m.prototype.size,!1),display:ua(pa.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,Z.prototype.size,!0),trapezoid:Da(.5),parallelogram:Da(1)};Graph.createHandle=N;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1== +M);mxUtils.extend(S,mxActor);S.prototype.size=30;S.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",S);mxUtils.extend(D,mxRectangleShape);D.prototype.dx=20;D.prototype.dy=20;D.prototype.isHtmlAllowed= +function(){return!1};D.prototype.paintForeground=function(a,d,b,c,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));g=Math.max(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e);a.lineTo(d+c,b+e); +a.end();a.stroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",D);mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE, +mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",W);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c,f/2);a.end()};mxCellRenderer.registerShape("crossbar",Q);mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy= +20;X.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint((c+d)/2,b),new mxPoint((c+d)/2,f),new mxPoint((c-d)/2,f),new mxPoint((c- +d)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",X);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize)))); +b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(d,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",T);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));a.moveTo(d,0);a.lineTo(c,0);a.quadTo(c-2*d,f/2,c,f);a.lineTo(d,f);a.quadTo(d-2*d,f/2,d,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",ca);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.quadTo(c/2,f/2,0,0);a.close(); +a.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,.8*d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit", +Z);mxUtils.extend(aa,mxActor);aa.prototype.size=.375;aa.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-d),new mxPoint(c/2,f),new mxPoint(0,f-d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",aa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape= +function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/2,b+f);a.lineTo(d+c,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke();a.begin();a.moveTo(d+c/2,b);a.lineTo(d+c/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse", +da);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d+.145*c,b+.145*f);a.lineTo(d+.855*c,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(d+.855*c,b+.145*f);a.lineTo(d+.145*c,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ma);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,d,b,c,f){mxRhombus.prototype.paintVertexShape.apply(this, +arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,d,b,c,f){a.begin();a.moveTo(d,b);a.lineTo(d+c,b);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(d,b+f);a.lineTo(d+c,b+f);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ja);mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape= +function(a,d,b,c,f){var e=b+f-5;a.begin();a.moveTo(d,b);a.lineTo(d,b+f);a.moveTo(d,e);a.lineTo(d+10,e-5);a.moveTo(d,e);a.lineTo(d+10,e+5);a.moveTo(d,e);a.lineTo(d+c,e);a.moveTo(d+c,b);a.lineTo(d+c,b+f);a.moveTo(d+c,e);a.lineTo(d+c-10,e-5);a.moveTo(d+c,e);a.lineTo(d+c-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ba);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,d,b,c,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this, +arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(d,b,c,f),a.fill(),a.begin(),a.moveTo(d,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(d+c,b):a.moveTo(d+c,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(d+c,b+f):a.moveTo(d+c,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(d,b+f):a.moveTo(d,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(d,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",qa);mxUtils.extend(na, +mxEllipse);na.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(d+c/2,b),a.lineTo(d+c/2,b+f)):(a.moveTo(d,b+f/2),a.lineTo(d+c,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",na);mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);a.moveTo(0,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(0, +f);a.close();a.end()};mxCellRenderer.registerShape("delay",ta);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,c);var e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(f-e)/2;b=d+e;var g=(c-e)/2,e=g+e;a.moveTo(0,d);a.lineTo(g,d);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,d);a.lineTo(c,d);a.lineTo(c,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross", +oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);b=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.moveTo(0,f/2);a.lineTo(b,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",pa);mxUtils.extend(ka,mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,d,b){for(var c= +[],f=0;f<d.length;f++)c.push(mxUtils.clone(d[f]));var f=a.state.dashed,e=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,[a,c,b]);3<=a.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(a.setStrokeColor(c),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),ka.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",ka);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors; +StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==d.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,g,h,n,m){var r=f*(g+n+1),u=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-r/2-u/2,c.y-u/2+r/2);a.lineTo(c.x+u/2-3*r/2,c.y-3*u/2-r/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,h,n, +m){var r=f*(g+n+1),u=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-r/2-u/2,c.y-u/2+r/2);a.lineTo(c.x+u/2-3*r/2,c.y-3*u/2-r/2);a.moveTo(c.x-r/2+u/2,c.y-u/2-r/2);a.lineTo(c.x-u/2-3*r/2,c.y-3*u/2+r/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,h,n,m){var r=c.clone(),u=Aa.apply(this,arguments),v=f*(g+2*n),k=e*(g+2*n);return function(){u.apply(this,arguments);a.begin();a.moveTo(r.x-f*n,r.y-e*n);a.lineTo(r.x-2*v+f*n,r.y-2*k+e*n);a.moveTo(r.x- +v-k+e*n,r.y-k+v-f*n);a.lineTo(r.x+k-v-e*n,r.y-k-v+f*n);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,h,n,m){d=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var r=c.clone();r.x-=d;r.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(r.x,r.y);h?a.lineTo(r.x-f-e/2,r.y-e+f/2):a.lineTo(r.x+e/2-f,r.y-e-f/2);a.lineTo(r.x-f,r.y-e);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,h,n,m,r){e*=h+m;g*=h+m;var u= +f.clone();return function(){d.begin();d.moveTo(u.x,u.y);n?d.lineTo(u.x-e-g/a,u.y-g+e/a):d.lineTo(u.x+g/a-e,u.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,d,b){return ra(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,h){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*d)/a.view.scale-b})},ra=function(a,d,b,c,f){return N(a,d, +function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,n=f.y-h.y,m=Math.sqrt(e*e+n*n),h=c.call(this,m,e/m,n/m,h,f);return new mxPoint(h.x/g-d.x,h.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,h=g.length-1;d=a.view.translate;var n=a.view.scale,m=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-m.x,r=g.y-m.y,u=Math.sqrt(h*h+r*r);c.x=(c.x+d.x)*n;c.y=(c.y+d.y)*n;f.call(this,u,h/u,r/u,m,g,c,e)})},ha=function(a){return function(d){return[N(d,["arrowWidth", +"arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-b)*d.height/2)},function(d,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-b.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(d.x+d.width-b.x)/d.width))})]}},ya=function(a,d,b){return function(c){var f= +[N(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ea(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[N(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style, +"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));g&&!mxEvent.isAltDown(c.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ea(e));return g}},Da=function(a){return function(d){var b= +[N(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ea(d));return b}},sa=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d}},ea=function(a,d){return N(a, +[mxConstants.STYLE_ARCSIZE],function(b){var c=null!=d?d:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+c)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)* +f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},N=function(a,d,b,c,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])}; +g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Ca(a,!0,10),Ca(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d, +b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale; +a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()- +a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0, +Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth= +a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f, +e,g,h,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))< +d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,h,n){b= +Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])- +parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[N(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(), +d.y+Math.max(0,Math.min(d.height,b))):new mxPoint(d.x+Math.max(0,Math.min(d.width,b)),d.getCenterY())},function(d,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,b.y-d.y))):Math.round(Math.max(0,Math.min(d.width,b.x-d.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(ea(a,b/2))}return d}, +label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var d=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style, +"width",E.prototype.width))),b=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[N(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style, +"size",w.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d},cross:function(a){return[N(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width, +a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d= +[N(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",S.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d},dataStorage:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+ +(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[N(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style, +"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var d= +Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width, +d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d},internalStorage:function(a){var d=[N(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",D.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",D.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0, +Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(a));return d},corner:function(a){return[N(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0, +Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5), +folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style, +"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]}, +tape:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)}, +function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:ua(r.prototype.size,!0,null,!0,r.prototype.fixedSize),hexagon:ua(A.prototype.size,!0,.5,!0),curlyBracket:ua(n.prototype.size,!1),display:ua(pa.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,Z.prototype.size,!0),trapezoid:Da(.5),parallelogram:Da(1)};Graph.createHandle=N;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1== this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR); -a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var h=a.absolutePoints,g=h[0],h=h[h.length-1];null!=d&&(d=e.transformControlPoint(a, -d));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,n=va.y,u=wa.x,t=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=h&&null!=g){a=function(a,c,b){a-=k.x;var d=c-k.y;c=(t*a-u*d)/(m*t-n*u);a=(n*a-m*d)/(n*u-m*t);v?(b&&(k=new mxPoint(k.x+m*c,k.y+n*c),f.push(k)),k=new mxPoint(k.x+u*a,k.y+t*a)):(b&&(k=new mxPoint(k.x+u*a,k.y+t*a),f.push(k)),k=new mxPoint(k.x+m*c,k.y+n*c));f.push(k)}; -var k=g;null==d&&(d=new mxPoint(g.x+(h.x-g.x)/2,g.y+(h.y-g.y)/2));a(d.x,d.y,!0);a(h.x,h.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];mxRectangleShape.prototype.constraints= +a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a, +c));null==h&&null!=d&&(h=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=va.x,m=va.y,r=wa.x,u=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,d,b){a-=k.x;var c=d-k.y;d=(u*a-r*c)/(n*u-m*r);a=(m*a-n*c)/(m*r-n*u);v?(b&&(k=new mxPoint(k.x+n*d,k.y+m*d),f.push(k)),k=new mxPoint(k.x+r*a,k.y+u*a)):(b&&(k=new mxPoint(k.x+r*a,k.y+u*a),f.push(k)),k=new mxPoint(k.x+n*d,k.y+m*d));f.push(k)}; +var k=h;null==c&&(c=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];v.prototype.constraints=[];mxRectangleShape.prototype.constraints= [new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, 1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints= -mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;y.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints= +mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints= mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints; Z.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1, .3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0, 1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1, .5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9, .5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0, -1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];r.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75, -0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1, +1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75, +0),!1)];r.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1, .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints= mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375, 0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375, 1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, -.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];f.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, +.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, 0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;X.prototype.constraints=null;W.prototype.constraints=null;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0, .5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];T.prototype.constraints= [new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];L.prototype.constraints=null;ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, .75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} -Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)d.model.contains(c[b])&&(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())}); -this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));b.showDialog((new OpenDialog(this)).container, +Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var d=c.model.getParents(b);c.removeCells(b,a);if(null!=d){a=[];for(b=0;b<d.length;b++)c.model.contains(d[b])&&(c.model.isVertex(d[b])||c.model.isEdge(d[b]))&&a.push(d[b]);c.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,c=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&c.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())}); +this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));b.showDialog((new OpenDialog(this)).container, 320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...", -function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut", -function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&& -a;c++)a=a&&d.model.isEdge(b[c]);var f=d.view.translate,e=d.view.scale,m=f.x,n=f.y,f=null;if(1==b.length&&a){var g=d.getCellGeometry(b[0]);null!=g&&(f=g.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var k=Math.round(d.snap(d.popupMenuHandler.triggerX/e-m)),u=Math.round(d.snap(d.popupMenuHandler.triggerY/e-n));d.cellsMoved(b,k-f.x,u-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete"); -this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){d.setSelectionCells(d.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){d.turnShapes(d.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()}, -null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE, -a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)}, -null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1== -d.getSelectionCount()&&0==d.getModel().getChildCount(d.getSelectionCell())?d.setCellStyles("container","0"):d.setSelectionCells(d.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container, -320,320,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),c="";if(mxUtils.isNode(d.value)){var f=d.value.getAttribute("tooltip");null!=f&&(c=f)}c=new TextareaDialog(b,mxResources.get("editTooltip")+":",c,function(c){a.setTooltipForCell(d,c)});b.showDialog(c.container,320,200,!0,!0);c.init()}});this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell()); -null!=a&&window.open(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),c=a.getLinkForCell(d)||"";b.showLinkDialog(c,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(d,0<c.length?c:null)})}});this.addAction("insertLink...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,e){a=mxUtils.trim(a);if(0<a.length){var c=null,f=a.substring(a.lastIndexOf("/")+ -1);if(d.isPageLink(a)){var h=a.indexOf(",");0<h&&(f=b.getPageById(a.substring(h+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(c=e[0].iconUrl,f=e[0].name||e[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));h=d.getFreeInsertPoint();c=new mxCell(f,new mxGeometry(h.x,h.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c: -"spacing=10;"));c.vertex=!0;d.setLinkForCell(c,a);d.cellSizeUpdated(c,!0);d.getModel().beginUpdate();try{c=d.addCell(c),d.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);d.scrollCellToVisible(d.getSelectionCell())}})}).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),c=""; -null!=d&&(c=d.getAttribute("href")||"");var f=a.cellEditor.saveSelection();b.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(f);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().getChildCount(c))d.updateGroupBounds([c], -20);else{var f=d.view.getState(c),e=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=f&&null!=f.text&&null!=e&&d.isWrapping(c)?(e=e.clone(),e.height=f.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(c,e)):d.updateCellSize(c)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var e="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var e= -null,c=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=c;c=mxUtils.extractTextWithWhitespace(f.childNodes);d.cellLabelChanged(a.cell,c)}else c=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(c));d.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged", -"keys",["html"],"values",[null!=e?e:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=d.getView().getState(d.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b, -a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.zoomOut()},null,null,Editor.ctrlKey+ -" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){d.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale,d.container.scrollLeft=Math.min(a.x*d.view.scale, -(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft= -Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+ -"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this, -function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.isGridEnabled()});l.setEnabled(!1);l=this.addAction("guides",function(){d.graphHandler.guidesEnabled= -!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled= -!d.foldingEnabled;d.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.pageVisible});l=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled= -!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});l=this.addAction("copyConnect", -function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&& -(a="_"+mxClient.language);window.open(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,c,f){return this.addAction(a,function(){null!=c&&d.cellEditor.isContentEditing()?c():(d.stopEditing(!1),d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b))},null,null,f)});l("bold",mxConstants.FONT_BOLD, +function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut", +function(){mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(c)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&mxClipboard.paste(c)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){c.getModel().beginUpdate();try{var b=mxClipboard.paste(c);if(null!=b){a=!0;for(var d=0;d<b.length&& +a;d++)a=a&&c.model.isEdge(b[d]);var f=c.view.translate,e=c.view.scale,n=f.x,m=f.y,f=null;if(1==b.length&&a){var h=c.getCellGeometry(b[0]);null!=h&&(f=h.getTerminalPoint(!0))}f=null!=f?f:c.getBoundingBoxFromGeometry(b,a);if(null!=f){var k=Math.round(c.snap(c.popupMenuHandler.triggerX/e-n)),u=Math.round(c.snap(c.popupMenuHandler.triggerY/e-m));c.cellsMoved(b,k-f.x,u-f.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete"); +this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){c.setSelectionCells(c.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){c.turnShapes(c.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){c.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){c.selectEdges()}, +null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){c.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){c.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!c.isSelectionEmpty()){c.getModel().beginUpdate();try{var a=c.isCellMovable(c.getSelectionCell())?1:0;c.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);c.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);c.toggleCellStyles(mxConstants.STYLE_ROTATABLE, +a);c.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);c.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);c.toggleCellStyles("connectable",a)}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){c.home()},null,null,"Home");this.addAction("exitGroup",function(){c.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){c.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){c.foldCells(!0)}, +null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){c.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){c.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){c.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==c.getSelectionCount()?c.setCellStyles("container","1"):c.setSelectionCell(c.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1== +c.getSelectionCount()&&0==c.getModel().getChildCount(c.getSelectionCell())?c.setCellStyles("container","0"):c.setSelectionCells(c.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){c.removeCellsFromParent()});this.addAction("edit",function(){c.isEnabled()&&c.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=c.getSelectionCell()||c.getModel().getRoot();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container, +320,320,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var f=c.value.getAttribute("tooltip");null!=f&&(d=f)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(d){a.setTooltipForCell(c,d)});b.showDialog(d.container,320,200,!0,!0);d.init()}});this.addAction("openLink",function(){var a=c.getLinkForCell(c.getSelectionCell()); +null!=a&&window.open(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d=a.getLinkForCell(c)||"";b.showLinkDialog(d,mxResources.get("apply"),function(d){d=mxUtils.trim(d);a.setLinkForCell(c,0<d.length?d:null)})}});this.addAction("insertLink...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,f=a.substring(a.lastIndexOf("/")+ +1);if(c.isPageLink(a)){var g=a.indexOf(",");0<g&&(f=b.getPageById(a.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,f=e[0].name||e[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));g=c.getFreeInsertPoint();d=new mxCell(f,new mxGeometry(g.x,g.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d: +"spacing=10;"));d.vertex=!0;c.setLinkForCell(d,a);c.cellSizeUpdated(d,!0);c.getModel().beginUpdate();try{d=c.addCell(d),c.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{c.getModel().endUpdate()}c.setSelectionCell(d);c.scrollCellToVisible(c.getSelectionCell())}})}).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d=""; +null!=c&&(d=c.getAttribute("href")||"");var f=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(f);null!=d&&a.insertLink(d)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=c.getSelectionCells();if(null!=a){c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().getChildCount(d))c.updateGroupBounds([d], +20);else{var f=c.view.getState(d),e=c.getCellGeometry(d);c.getModel().isVertex(d)&&null!=f&&null!=f.text&&null!=e&&c.isWrapping(d)?(e=e.clone(),e.height=f.text.boundingBox.height/c.view.scale,c.getModel().setGeometry(d,e)):c.updateCellSize(d)}}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=c.getView().getState(c.getSelectionCell());if(null!=a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e= +null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=d;d=mxUtils.extractTextWithWhitespace(f.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,c.sanitizeHtml(d));c.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged", +"keys",["html"],"values",[null!=e?e:"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=c.getView().getState(c.getSelectionCell()),b="wrap";c.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);c.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=c.getView().getState(c.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b, +a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&c.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){c.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){c.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){c.zoomOut()},null,null,Editor.ctrlKey+ +" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){c.fit()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/a.width/b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=a.y*c.view.scale,c.container.scrollLeft=Math.min(a.x*c.view.scale, +(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/(2*a.width)/b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=Math.min(a.y,(c.container.scrollHeight-c.container.clientHeight)/2),c.container.scrollLeft= +Math.min(a.x,(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();c.zoomTo(Math.floor(20*(c.container.clientWidth-10)/c.pageFormat.width/c.pageScale)/20);if(mxUtils.hasScrollbars(c.container)){var a=c.getPagePadding();c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-c.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+ +"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&c.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.pageScale),mxResources.get("apply"),mxUtils.bind(this, +function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){c.setGridEnabled(!c.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isGridEnabled()});l.setEnabled(!1);l=this.addAction("guides",function(){c.graphHandler.guidesEnabled= +!c.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){c.tooltipHandler.setEnabled(!c.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled= +!c.foldingEnabled;c.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!c.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return c.pageVisible});l=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled= +!c.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});l=this.addAction("copyConnect", +function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&& +(a="_"+mxClient.language);window.open(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,d,f){return this.addAction(a,function(){null!=d&&c.cellEditor.isContentEditing()?d():(c.stopEditing(!1),c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b))},null,null,f)});l("bold",mxConstants.FONT_BOLD, function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...", function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)}); -this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN, -null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"], -"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED, -"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.view.getState(a[0]),c=null!=e?e.style:d.getCellStyle(a[0]),f="1"==mxUtils.getValue(c,mxConstants.STYLE_ROUNDED,"0")? -"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,f);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys", -[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),e="1";null!=a&&null!=d.getFoldingImage(a)&&(e="0");d.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells(); -if(null!=a&&0<a.length){var b=d.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&& -b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var c=d.view.translate,f=d.view.scale,h=c.x,c=c.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=m;)h+=m.x,c+=m.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);h=Math.round(d.snap(d.popupMenuHandler.triggerX/f-h)); -f=Math.round(d.snap(d.popupMenuHandler.triggerY/f-c));b.addPointAt(b.state,h,f)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().isEdge(c)){var f=d.getCellGeometry(c);null!=f&&(f=f.clone(),f.points=null,d.getModel().setGeometry(c, -f))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a= -mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),c="";null!=e&&(c=e.style[mxConstants.STYLE_IMAGE]||c);var f=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,c,b);else{var e=d.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var h=null;d.getModel().beginUpdate();try{if(0==e.length){var m=d.getFreeInsertPoint(),h=e=[d.insertVertex(d.getDefaultParent(), -null,"",m.x,m.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",h))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var n=d.view.getState(e[0]),t=null!=n?n.style:d.getCellStyle(e[0]);"image"!=t[mxConstants.STYLE_SHAPE]&&"label"!=t[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&& -null!=c&&null!=b){var k=e[0],l=d.getModel().getGeometry(k);null!=l&&(l=l.clone(),l.width=c,l.height=b,d.getModel().setGeometry(k,l))}}finally{d.getModel().endUpdate()}null!=h&&(d.setSelectionCells(h),d.scrollCellToVisible(h[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers", +this.addAction("solid",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,null),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dashed",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN, +null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dotted",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"], +"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("sharp",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("rounded",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED, +"1"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!c.isSelectionEmpty()&&c.isEnabled()){c.getModel().beginUpdate();try{var a=c.getSelectionCells(),e=c.view.getState(a[0]),d=null!=e?e.style:c.getCellStyle(a[0]),f="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")? +"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,f);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("curved",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys", +[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=c.view.getState(c.getSelectionCell()),e="1";null!=a&&null!=c.getFoldingImage(a)&&(e="0");c.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",c.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=c.getSelectionCells(); +if(null!=a&&0<a.length){var b=c.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(d){null!=d&&c.setCellStyle(mxUtils.trim(d),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){c.isEnabled()&&!c.isSelectionEmpty()&&b.setDefaultStyle(c.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){c.isEnabled()&& +b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=c.getSelectionCell();if(null!=a&&c.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var d=c.view.translate,f=c.view.scale,g=d.x,d=d.y,a=c.getModel().getParent(a),n=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=n;)g+=n.x,d+=n.y,a=c.getModel().getParent(a),n=c.getCellGeometry(a);g=Math.round(c.snap(c.popupMenuHandler.triggerX/f-g)); +f=Math.round(c.snap(c.popupMenuHandler.triggerY/f-d));b.addPointAt(b.state,g,f)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var f=c.getCellGeometry(d);null!=f&&(f=f.clone(),f.points=null,c.getModel().setGeometry(d, +f))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a= +mxResources.get("image")+" ("+mxResources.get("url")+"):",e=c.getView().getState(c.getSelectionCell()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var f=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(f),c.insertImage(a,d,b);else{var e=c.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;c.getModel().beginUpdate();try{if(0==e.length){var n=c.getFreeInsertPoint(),g=e=[c.insertVertex(c.getDefaultParent(), +null,"",n.x,n.y,d,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",g))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,e);var m=c.view.getState(e[0]),r=null!=m?m.style:c.getCellStyle(e[0]);"image"!=r[mxConstants.STYLE_SHAPE]&&"label"!=r[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",e):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==c.getSelectionCount()&& +null!=d&&null!=b){var k=e[0],p=c.getModel().getGeometry(k);null!=p&&(p=p.clone(),p.width=d,p.height=b,c.getModel().setGeometry(k,p))}}finally{c.getModel().endUpdate()}null!=g&&(c.setSelectionCells(g),c.scrollCellToVisible(g[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(c.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers", mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+ "+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth- 260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!= -this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]}; -function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled}; +this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,c,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,c,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]}; +function Action(a,b,e,c,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=c;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled}; Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))}; -DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,d){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)}; +DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,c){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)}; DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1}; DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data}; DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){var e=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this|| @@ -2608,12 +2608,12 @@ this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)}; DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"), 0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))}; -DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}), -mxUtils.bind(this,function(a){null!=d&&d(a)}))}else null!=e&&e(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay}; -DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b}; -DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)}; -LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ -(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()}; +DrawioFile.prototype.autosave=function(a,b,e,c){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}), +mxUtils.bind(this,function(a){null!=c&&c(a)}))}else null!=e&&e(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay}; +DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),c=0<e?a.substring(e):"",e=b.lastIndexOf(".");return c===(0<e?b.substring(e):"")}return a==b}; +DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,b,e,c){DrawioFile.call(this,a,b);this.title=e;this.mode=c?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)}; +LocalFile.prototype.saveFile=function(a,b,e,c){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ +(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()}; LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC": IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=": IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==": @@ -2622,357 +2622,357 @@ IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;b IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg=="; Editor.defaultCustomLibraries=[];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; Editor.configure=function(a){if(null!=a){Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength; -if(null!=a.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(c,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle= -a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0], -b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.getElementsByTagName("div"); -null!=d&&0<d.length&&(b=d[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(), -null!=d){var f=new mxCodec(d.ownerDocument);f.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")|| -"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible? -"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(A){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!== -typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);break}0<d.length&&(b=d[0].getAttribute("data-mxgraph"),null!=b?(d=JSON.parse(b),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(b=mxUtils.getTextContent(d[0]),b=this.graph.decompress(b),0<b.length&&(d=mxUtils.parseXml(b),a=d.documentElement))))}if(null!=a&& -"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(d=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=d&& -(b=this.graph.decompress(mxUtils.getTextContent(d)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO; -var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1, -messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}}; -Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var f= -document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g, -function(a,b,d,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); -mxSettings.save()}}if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};var r=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=r.apply(this, -arguments);if(mxClient.IS_SVG){var c=this.editorUi,b=c.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;b.model.execute(d)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}}))}return a};var c=DiagramFormatPanel.prototype.addOptions; -DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var d=b.getCurrentFile();null!=d&&d.isAutosaveOptional()&&(d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(d))}return a}; +if(null!=a.css){var d=document.createElement("style");d.setAttribute("type","text/css");d.appendChild(document.createTextNode(a.css));var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(d,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle= +a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(d=document.createElement("style"),d.setAttribute("type","text/css"),d.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0], +b.parentNode.insertBefore(d,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),d=0;d<a.plugins.length;d++)mxscript(a.plugins[d])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var b=d.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div"); +null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==d.nodeName){b=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(f=new mxCodec(c.ownerDocument),f.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(), +null!=c){var f=new mxCodec(c.ownerDocument);f.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");b=d.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")|| +"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var d=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&d.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));d.setAttribute("math",this.graph.mathEnabled?"1":"0");d.setAttribute("shadow",this.graph.shadowVisible? +"1":"0");return d};Editor.prototype.isDataSvg=function(a){try{var d=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(A){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!== +typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),a=c.documentElement)):(c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0]),b=this.graph.decompress(b),0<b.length&&(c=mxUtils.parseXml(b),a=c.documentElement))))}if(null!=a&& +"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||d||(c=null,"diagram"==a.nodeName?c=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(c=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=c&& +(b=this.graph.decompress(mxUtils.getTextContent(c)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO; +var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,d){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1, +messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}}; +Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,d){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var f= +document.createElement("script");f.type="text/javascript";f.src=a;c[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var d=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g, +function(a,b,c,f){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==f&&d.push(f);return""});/,\s*$/.test(a)&&d.push("");return d};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); +mxSettings.save()}}if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};var t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=t.apply(this, +arguments);if(mxClient.IS_SVG){var d=this.editorUi,b=d.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}}))}return a};var d=DiagramFormatPanel.prototype.addOptions; +DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a}; StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"}, {fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&& -this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c); -c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b= -d.getSelectionCells();for(c=0;c<b.length;c++){for(var f=d.getModel().getStyle(b[c]),h=0;h<e.length;h++)f=mxUtils.removeStylename(f,e[h]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR, -null));d.getModel().setStyle(b[c],f)}}finally{d.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor= -a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight= -"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var h=document.createElement("div");h.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var g=document.createElement("div");g.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(a.appendChild(h),a.appendChild(g));mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(h);b(g);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& -(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this, -function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px": -(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= -"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var m=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}m.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint; -this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a, -c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}return d.apply(this,arguments)}};var n=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){n.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a, -c,b){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,c,d,!1);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1; -var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset"); -e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"): -d.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");f.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"), -null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=e[0];d.appendChild(f);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return f};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", -"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"]; +this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d); +d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);mxUtils.br(a);return g.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b= +c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,e[g]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR, +null));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height="30px";d.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":d.style.backgroundColor= +a.fill,d.style.border="1px solid "+a.stroke):(d.style.backgroundColor="#ffffff",d.style.border="1px solid #000000");f.appendChild(d)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),d(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var c=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight= +"20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));var h=document.createElement("div");h.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(h));mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(h);d(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& +(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var c=this.editorUi.editor.graph,f=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this, +function(a){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom="2px",null==b?d.style.width="202px":(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d)):d.image&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==b?d.style.width="202px": +(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= +"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}n.apply(this,arguments);var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint; +this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):b.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var d=this.graph.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,d){d.height=Math.max(d.height,20);if(1<d.height/20){var b=d.height%20;d.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a, +d)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.resizeParent=!1;return b}return c.apply(this,arguments)}};var m=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){m.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a, +d,b){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,d,c,!1);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,d,b){b=null!=b?b:!1; +var c=a.ownerDocument,f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset"); +e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feComposite"): +c.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feBlend"):c.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");f.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"), +null!=a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)):c=e[0];c.appendChild(f);b||((d||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return f};Graph.prototype.setShadowVisible=function(a,d){mxClient.IS_SVG&&(d=null!=d?d:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter", +"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),d&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),d,b=0;do d=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(d),"locked","0"));null!=d&&this.setDefaultParent(d)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"]; mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5= [STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/transmission"]= [SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]= [SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap= [SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js", STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors= -[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var g=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,e,h,m,n,k){if(null!=b&&null==mxMarker.markers[b]){var u=this.getPackageForType(b);null!=u&&mxStencilRegistry.getStencil(u)}return g.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){x.value=Math.max(1, -Math.min(g,Math.max(parseInt(x.value),parseInt(l.value))));l.value=Math.max(1,Math.min(g,Math.min(parseInt(x.value),parseInt(l.value))))}function d(c){function b(c,b,f){var e=c.getGraphBounds(),h=0,g=0,m=ca.get(),n=1/c.pageScale,k=r.checked;if(k)var n=parseInt(T.value),t=parseInt(O.value),n=Math.min(m.height*t/(e.height/c.view.scale),m.width*n/(e.width/c.view.scale));else n=parseInt(q.value)/(100*c.pageScale),isNaN(n)&&(d=1/c.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width* -d);m.height=Math.ceil(m.height*d);n*=d;!k&&c.pageVisible?(e=c.getPageLayout(),h-=e.x*m.width,g-=e.y*m.height):k=!0;if(null==b){b=PrintDialog.createPrintPreview(c,n,m,0,h,g,k);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var u=b.writeHead;b.writeHead=function(c){u.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=b.renderPage;b.renderPage= -function(a,c,b,d,f,e){var h=v.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:h.className="geDisableMathJax";return h}}b.open(null,null,f,!0)}else{m=c.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=k;b.appendGraph(c,n,h,g,f,!0)}return b}var d=parseInt(V.value)/100;isNaN(d)&&(d=1,V.value="100 %");var d=.75*d,e=l.value,h=x.value,g=!k.checked,n=null;g&&(g=e==m&&h==m);if(!g&&null!=a.pages&&a.pages.length){var t=0,g=a.pages.length-1;k.checked|| -(t=parseInt(e)-1,g=parseInt(h)-1);for(var u=t;u<=g;u++){var v=a.pages[u],e=v==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),h=!0,t=!1,z=null,p=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(h=v.viewState.pageVisible,t=v.viewState.mathEnabled,z=v.viewState.background,p=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(t="0"!=v.mapping.diagramMap.get("mathEnabled"),z=v.mapping.diagramMap.get("background"), -p=v.mapping.diagramMap.get("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null);e.background=z;e.backgroundImage=null!=p?new mxImage(p.src,p.width,p.height):null;e.pageVisible=h;e.mathEnabled=t;var A=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?u+1:A.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(v);e.model.setRoot(v.root)}n=b(e,n,u!=g);e!=f&&e.container.parentNode.removeChild(e.container)}}else n=b(f);n.mathEnabled&& -(g=n.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"), -g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),c&&(g.writeln("MathJax.Hub.Queue(function () {"),g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));n.closeDocument();!n.mathEnabled&&c&&PrintDialog.printPreview(n)}var f=a.editor.graph,e=document.createElement("div"),h=document.createElement("h3"); -h.style.width="100%";h.style.textAlign="center";h.style.marginTop="0px";mxUtils.write(h,c||mxResources.get("print"));e.appendChild(h);var g=1,m=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");n.appendChild(k);h=document.createElement("span"); -mxUtils.write(h,mxResources.get("printAllPages"));n.appendChild(h);mxUtils.br(n);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");n.appendChild(u);h=document.createElement("span");mxUtils.write(h,mxResources.get("pages")+":");n.appendChild(h);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;";l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.style.width="50px";n.appendChild(l);h=document.createElement("span"); -mxUtils.write(h,mxResources.get("to"));n.appendChild(h);var x=l.cloneNode(!0);n.appendChild(x);mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(x,"focus",function(){u.checked=!0});mxEvent.addListener(l,"change",b);mxEvent.addListener(x,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(h=0;h<a.pages.length;h++)if(a.currentPage==a.pages[h]){m=h+1;l.value=m;x.value=m;break}l.setAttribute("max",g);x.setAttribute("max",g);1<g&&e.appendChild(n);var v=document.createElement("div"); -v.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");v.appendChild(p);h=document.createElement("span");mxUtils.write(h,mxResources.get("adjustTo"));v.appendChild(h);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";v.appendChild(q);mxEvent.addListener(q,"focus",function(){p.checked=!0}); -e.appendChild(v);var n=n.cloneNode(!1),r=p.cloneNode(!0);r.setAttribute("value","fit");p.setAttribute("checked","checked");h=document.createElement("div");h.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";h.appendChild(r);n.appendChild(h);v=document.createElement("table");v.style.display="inline-block";var K=document.createElement("tbody"),J=document.createElement("tr"),M=J.cloneNode(!0),S=document.createElement("td"),D=S.cloneNode(!0),W=S.cloneNode(!0),Q=S.cloneNode(!0), -X=S.cloneNode(!0),U=S.cloneNode(!0);S.style.textAlign="right";Q.style.textAlign="right";mxUtils.write(S,mxResources.get("fitTo"));var T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","1");T.setAttribute("min","1");T.setAttribute("type","number");T.style.width="40px";D.appendChild(T);h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsAcross"));W.appendChild(h);mxUtils.write(Q,mxResources.get("fitToBy"));var O=T.cloneNode(!0);X.appendChild(O); -mxEvent.addListener(T,"focus",function(){r.checked=!0});mxEvent.addListener(O,"focus",function(){r.checked=!0});h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsDown"));U.appendChild(h);J.appendChild(S);J.appendChild(D);J.appendChild(W);M.appendChild(Q);M.appendChild(X);M.appendChild(U);K.appendChild(J);K.appendChild(M);v.appendChild(K);n.appendChild(v);e.appendChild(n);n=document.createElement("div");h=document.createElement("div");h.style.fontWeight="bold";h.style.marginBottom= -"12px";mxUtils.write(h,mxResources.get("paperSize"));n.appendChild(h);h=document.createElement("div");h.style.marginBottom="12px";var ca=PageSetupDialog.addPageFormatPanel(h,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(h);h=document.createElement("span");mxUtils.write(h,mxResources.get("pageScale"));n.appendChild(h);var V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","100 %");V.style.width="60px";n.appendChild(V); -e.appendChild(n);h=document.createElement("div");h.style.cssText="text-align:right;margin:62px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&h.appendChild(n);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",h.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog(); -d(!1)}),v.className="geBtn",h.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});v.className="geBtn gePrimaryBtn";h.appendChild(v);a.editor.cancelFirst||h.appendChild(n);e.appendChild(h);this.container=e};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background= -this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(x.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!= +[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var h=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,g,n,m,k){if(null!=b&&null==mxMarker.markers[b]){var r=this.getPackageForType(b);null!=r&&mxStencilRegistry.getStencil(r)}return h.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){p.value=Math.max(1, +Math.min(h,Math.max(parseInt(p.value),parseInt(w.value))));w.value=Math.max(1,Math.min(h,Math.min(parseInt(p.value),parseInt(w.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),g=0,h=0,n=ca.get(),m=1/d.pageScale,k=t.checked;if(k)var m=parseInt(T.value),r=parseInt(O.value),m=Math.min(n.height*r/(e.height/d.view.scale),n.width*m/(e.width/d.view.scale));else m=parseInt(q.value)/(100*d.pageScale),isNaN(m)&&(c=1/d.pageScale,q.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width* +c);n.height=Math.ceil(n.height*c);m*=c;!k&&d.pageVisible?(e=d.getPageLayout(),g-=e.x*n.width,h-=e.y*n.height):k=!0;if(null==b){b=PrintDialog.createPrintPreview(d,m,n,0,g,h,k);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var u=b.writeHead;b.writeHead=function(d){u.apply(this,arguments);null!=a.editor.fontCss&&(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var y=b.renderPage;b.renderPage= +function(a,d,b,c,f,e){var g=y.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{n=d.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=k;b.appendGraph(d,m,g,h,f,!0)}return b}var c=parseInt(V.value)/100;isNaN(c)&&(c=1,V.value="100 %");var c=.75*c,e=w.value,g=p.value,h=!k.checked,m=null;h&&(h=e==n&&g==n);if(!h&&null!=a.pages&&a.pages.length){var r=0,h=a.pages.length-1;k.checked|| +(r=parseInt(e)-1,h=parseInt(g)-1);for(var u=r;u<=h;u++){var y=a.pages[u],e=y==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,r=!1,l=null,v=null;null==y.viewState&&null==y.mapping&&null==y.root&&a.updatePageRoot(y);null!=y.viewState?(g=y.viewState.pageVisible,r=y.viewState.mathEnabled,l=y.viewState.background,v=y.viewState.backgroundImage):null!=y.mapping&&null!=y.mapping.diagramMap&&(r="0"!=y.mapping.diagramMap.get("mathEnabled"),l=y.mapping.diagramMap.get("background"), +v=y.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);e.background=l;e.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height):null;e.pageVisible=g;e.mathEnabled=r;var A=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?y.getName():"pagenumber"==a?u+1:A.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(y);e.model.setRoot(y.root)}m=b(e,m,u!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=b(f);m.mathEnabled&& +(h=m.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"), +h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),d&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&d&&PrintDialog.printPreview(m)}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3"); +g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var h=1,n=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");m.appendChild(k);g=document.createElement("span"); +mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");m.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";w.setAttribute("value","1");w.setAttribute("type","number");w.setAttribute("min","1");w.style.width="50px";m.appendChild(w);g=document.createElement("span"); +mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var p=w.cloneNode(!0);m.appendChild(p);mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(p,"focus",function(){u.checked=!0});mxEvent.addListener(w,"change",b);mxEvent.addListener(p,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;w.value=n;p.value=n;break}w.setAttribute("max",h);p.setAttribute("max",h);1<h&&e.appendChild(m);var l=document.createElement("div"); +l.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");l.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));l.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";l.appendChild(q);mxEvent.addListener(q,"focus",function(){v.checked=!0}); +e.appendChild(l);var m=m.cloneNode(!1),t=v.cloneNode(!0);t.setAttribute("value","fit");v.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(t);m.appendChild(g);l=document.createElement("table");l.style.display="inline-block";var K=document.createElement("tbody"),J=document.createElement("tr"),M=J.cloneNode(!0),S=document.createElement("td"),D=S.cloneNode(!0),W=S.cloneNode(!0),Q=S.cloneNode(!0), +X=S.cloneNode(!0),U=S.cloneNode(!0);S.style.textAlign="right";Q.style.textAlign="right";mxUtils.write(S,mxResources.get("fitTo"));var T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","1");T.setAttribute("min","1");T.setAttribute("type","number");T.style.width="40px";D.appendChild(T);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));W.appendChild(g);mxUtils.write(Q,mxResources.get("fitToBy"));var O=T.cloneNode(!0);X.appendChild(O); +mxEvent.addListener(T,"focus",function(){t.checked=!0});mxEvent.addListener(O,"focus",function(){t.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));U.appendChild(g);J.appendChild(S);J.appendChild(D);J.appendChild(W);M.appendChild(Q);M.appendChild(X);M.appendChild(U);K.appendChild(J);K.appendChild(M);l.appendChild(K);m.appendChild(l);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom= +"12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ca=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);var V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","100 %");V.style.width="60px";m.appendChild(V); +e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),l.className="geBtn",g.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog(); +c(!1)}),l.className="geBtn",g.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";g.appendChild(l);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background= +this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(w.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!= this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})(); -(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; -EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported= -!(!a.getContext||!a.getContext("2d"))}catch(n){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(g){}};d.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(n){}try{b= -document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(a){return window.open(a)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()}; -EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()|| -!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var h=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(h=document.createElement("div"),h.style.position="absolute",h.style.whiteSpace="nowrap",h.style.background="#4B4243",h.style.color= -"white",h.style.fontFamily="Helvetica, Arial",h.style.fontSize="9pt",h.style.padding="6px",h.style.paddingLeft="10px",h.style.paddingRight="10px",h.style.zIndex=2E9,h.style.left=Math.max(0,a)+"px",h.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(h.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(h.style,"boxShadow","2px 2px 3px 0px #ddd"),h.innerHTML=e+"...",d.appendChild(h),c.status=h,mxClient.IS_VML&& -(null==document.documentMode||8>=document.documentMode)&&(h.style.left=Math.round(Math.max(0,a-h.offsetWidth/2))+"px",h.style.top=Math.round(Math.max(0,b+70-h.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),h=!0);return h};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}}; -return c};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var h=c(a,4);if(null!=b&&b(e-8,h,d))break;value=c(a,d);c(a,4);if("IEND"==h)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c= -mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(m){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("<mxfile ");if(0<=d){var e=c.lastIndexOf("</mxfile>");e>d&&(b=c.substring(d,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var n= -mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,null!=this.pages),b=null!=g?mxUtils.getXml(g):""}catch(x){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a, -!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!= -urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}}; -EditorUi.prototype.createFileData=function(a,b,d,e,n,g,k,u,l,t){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;l=null!=l?l:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var m=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(m);if(b.decompress(h)!=m)return m;m=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(m,h);h=a.ownerDocument.createElement("mxfile");h.appendChild(m)}t? -(h=h.cloneNode(!0),h.removeAttribute("userAgent"),h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type")):(h.setAttribute("userAgent",navigator.userAgent),h.setAttribute("version",EditorUi.VERSION),h.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!g&&!n&&(k||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=d?d.getTitle():null,c,f);else if(g||!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null== -d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,l,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var f= -0;f<this.pages.length;f++){var e=this.pages[f].mapping;this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[f].node,d),e.needsUpdate=!1);c.appendChild(this.pages[f].node)}}return c};EditorUi.prototype.getFileData=function(a,b,d,e,n,g,k,u,l){n=null!=n?n:!0;k=null!=k?k:this.getXmlFileData(n,null!= -g?g:!1);l=null!=l?l:this.getCurrentFile();g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var c=g.getGlobalVariable,f=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(f.root)}a=this.createFileData(k,g,l,window.location.href,a,b,d,e,n,u);g!=this.editor.graph&& -g.container.parentNode.removeChild(g.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;g=Math.floor(c.x/h-b.view.translate.x);h=Math.floor(c.y/h-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0", -h)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': -"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+ -"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,n){null!=n&&(n=n.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"}; -null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+ -mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==n?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length? -mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page|| -0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!= -a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,d,e,n,g){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,n));this.saveData(f,a,h,"text/xml")}else if("html"== -a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var f=this.createDownloadRequest(c,a,e,b);this.editor.graph.pageVisible=d;return f}catch(H){this.handleError(H)}}));else{var m=null,k= -mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);var p=this.editor.graph.getSvg(l,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+ -mxUtils.getXml(a))})))}else f=c+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var h= -0;h<this.pages.length;h++)if(this.pages[h]==this.currentPage){f="&from="+h;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear(); -this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a); -a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable? -(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(), -mode:a.getMode()})}catch(n){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(n){}}catch(n){null!=window.console&&console.log("error in fileLoaded:",a,n);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=n&&null!=n.message?":err:"+encodeURIComponent(n.message):"")+(null!= -n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}catch(g){}this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL: -"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,n,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this, -function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()), -".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling; -var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!= -this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(c,b){if(0==c.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding= -"8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var d=0;d<c.length;d++){var e=c[d],h=e.data;if(null!=h){var h=this.convertDataUri(h),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+h,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(h=this.stringToCells(this.editor.graph.decompress(e.xml)),0<h.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(h, -e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var h=0;h<b.length;h++)mxUtils.bind(this,function(a){var c=a.data;null!=c&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){c=this.convertDataUri(c);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+c,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title, -mxUtils.bind(this,function(){var c=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var l=k.parentNode.previousSibling;d=l.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d); -var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");l.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("align","top");p.setAttribute("border","0");p.className="geButton";p.style.marginRight="1px";p.style.marginTop="-1px";t.appendChild(p);var q= -null;mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var w=this.editor.graph,r=null,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0); -a.isAutosave()?(null!=r&&null!=r.parentNode&&r.parentNode.removeChild(r),r=p.cloneNode(!1),r.setAttribute("src",Editor.spinImage),r.setAttribute("title",mxResources.get("saving")),r.style.cursor="default",r.style.marginRight="2px",r.style.marginTop="-2px",t.insertBefore(r,t.firstChild),l.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=r&&null!=r.parentNode&&(r.parentNode.removeChild(r),l.style.paddingRight=18*t.childNodes.length+ -"px")})):null==q&&(q=p.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",mxResources.get("save")),t.insertBefore(q,t.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(l.style.paddingRight=18*t.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(c)})),l.style.paddingRight=18*t.childNodes.length+"px")}),C= -mxUtils.bind(this,function(a,c,d,e){a=w.cloneCells(mxUtils.sortCells(w.model.getTopmostCells(a)));for(var h=0;h<a.length;h++){var g=w.getCellGeometry(a[h]);null!=g&&g.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}), -H=mxUtils.bind(this,function(a){if(w.isSelectionEmpty())w.getRubberband().isActive()?(w.getRubberband().execute(a),w.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=w.getSelectionCells(),b=w.view.getBounds(c),d=w.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=w.view.translate.x;b.y-=w.view.translate.y;C(c,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){}, -mxUtils.bind(this,function(a){w.isMouseDown&&null!=w.panningManager&&null!=w.graphHandler.shape&&(w.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",w.panningManager.stop(),w.autoScroll=!1,null!=w.graphHandler.guide&&w.graphHandler.guide.setVisible(!1),null!=w.graphHandler.hint&&(w.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){w.isMouseDown&& -null!=w.panningManager&&null!=w.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,w.panningManager.stop(),w.graphHandler.reset(),w.isMouseDown=!1,w.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){w.isMouseDown&&null!=w.graphHandler.shape&&(w.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor= -"",w.autoScroll=!0,null!=w.graphHandler.guide&&w.graphHandler.guide.setVisible(!0),null!=w.graphHandler.hint&&(w.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})), -mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,h,g,m,n,t,l,p){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,n),c)],c[0].vertex= -!0,C(c,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(h.documentElement));e(g,k);b=b.concat(g);G(a);this.spinner.stop();u=!0}catch(V){}else if("mxfile"==h.documentElement.nodeName)try{for(var m= -h.documentElement.getElementsByTagName("diagram"),h=0;h<m.length;h++){var g=mxUtils.getTextContent(m[h]),n=this.stringToCells(this.editor.graph.decompress(g)),t=this.editor.graph.getBoundingBoxFromGeometry(n);C(n,new mxRectangle(0,0,t.width,t.height),a)}u=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});!this.isOffline()&& -(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=p?this.parseFile(p,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border= -"3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",IMAGE_PATH+"/edit.gif");p.setAttribute("title",mxResources.get("edit"));t.insertBefore(p,t.firstChild);mxEvent.addListener(p,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));t.insertBefore(d,t.firstChild);mxEvent.addListener(d,"click", -H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;",d.className="geButton",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(d,t.firstChild))}l.appendChild(t);l.style.paddingRight=18*t.childNodes.length+"px"}};"1"==urlParams.offline|| -EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide")); -a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet","styles/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)", -Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet","styles/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme", -Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor= -"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", +EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');svrc=EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport= +!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(h){}};c.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(m){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(a){return window.open(a)}; +EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled= +function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme? +"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(c,e){var g=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top= +Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),g.innerHTML=e+"...",c.appendChild(g),d.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this, +function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),g=!0);return g};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=e;e+=d;return a.substring(b,e)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<< +24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var g=d(a,4);if(null!=b&&b(e-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml; +EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=d.indexOf("<mxfile ");if(0<=c){var e=d.lastIndexOf("</mxfile>");e>c&&(b=d.substring(c,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(d),h=this.editor.extractGraphModel(m.documentElement,null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(w){}return b};EditorUi.prototype.validateFileData=function(a){if(null!= +a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages|| +1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var h=this.updatePageRoot(new DiagramPage(c[e]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", +[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,m,h,k,u,l,r){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;l=null!=l?l:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER? +d="_blank":f=d=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(n);if(b.decompress(g)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(n)}r?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version", +EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!m&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(h||!m&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,l,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a= +null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var e=this.pages[f].mapping;this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel), +e.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[f].node,c),e.needsUpdate=!1);d.appendChild(this.pages[f].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,m,h,k,u,l){m=null!=m?m:!0;k=null!=k?k:this.getXmlFileData(m,null!=h?h:!1);l=null!=l?l:this.getCurrentFile();h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet()); +var d=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(k,h,l,window.location.href,a,b,c,e,m,u);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,m,h){h=null!=h?h:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var d=h?b.getGraphBounds(): +b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;h=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!= +m&&(m=m.replace(/&/g,"&"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m? +'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+ +"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,m){null!=m&&(m=m.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">': +">")+"\n<head>\n"+(null==m?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==m?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ +m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var d=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=d?this.editor.extractGraphModel(d,!0):null;null!=a&&(d=a);if(null!=d&&"mxfile"==d.nodeName&&(a=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode= +d;this.pages=[];for(d=0;d<a.length;d++){var b=new DiagramPage(a[d]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", +[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,m,h){try{e=null!=e?e:this.editor.graph.isSelectionEmpty(); +var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,m));this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this, +function(d,b){try{var c=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(d,a,e,b);this.editor.graph.pageVisible=c;return f}catch(H){this.handleError(H)}}));else{var n=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var l=this.editor.graph.background; +l==mxConstants.NONE&&(l=null);var p=this.editor.graph.getSvg(l,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(F){this.handleError(F)}}; +EditorUi.prototype.createDownloadRequest=function(a,b,c,e){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+ +d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle(); +this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open(); +this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()): +this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(m){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(m){}}catch(m){null!= +window.console&&console.log("error in fileLoaded:",a,m);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=m&&null!=m.message?":err:"+encodeURIComponent(m.message):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}catch(h){}this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this, +function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)): +"")}catch(g){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,m,h,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))}; +EditorUi.prototype.createLibraryDataFromImages=function(a){var d=mxUtils.createXmlDocument(),b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var d=this.sidebar.palettes[a]; +if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var d=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a){var d=mxUtils.parseXml(a.getData()); +if("mxlibrary"==d.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()], +d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=0;c<d.length;c++){var e=d[c],g=e.data;if(null!=g){var g= +this.convertDataUri(g),h="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(h+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(h+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var d= +a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(d, +a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var l=k.parentNode.previousSibling;c=l.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var r=document.createElement("div");r.style.position="absolute";r.style.right="0px";r.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode|| +(r.style.backgroundColor="inherit");l.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("align","top");p.setAttribute("border","0");p.className="geButton";p.style.marginRight="1px";p.style.marginTop="-1px";r.appendChild(p);var q=null;mxEvent.addListener(p,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)}); +null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var z=this.editor.graph,t=null,B=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),G=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=p.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title", +mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",r.insertBefore(t,r.firstChild),l.style.paddingRight=18*r.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),l.style.paddingRight=18*r.childNodes.length+"px")})):null==q&&(q=p.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",mxResources.get("save")),r.insertBefore(q,r.firstChild), +mxEvent.addListener(q,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(l.style.paddingRight=18*r.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(d)})),l.style.paddingRight=18*r.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,d,c,e){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=z.getCellGeometry(a[g]);null!=h&& +h.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);G(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),H=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"), +mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=z.getSelectionCells(),b=z.view.getBounds(d),c=z.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=z.view.translate.x;b.y-=z.view.translate.y;C(d,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)": +k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0, +z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border= +"3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0< +a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,g,h,n,m,r,l,p){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,m),d)],d[0].vertex=!0,C(d,new mxRectangle(0,0,n,m),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f), +f=null);else{var u=!1,w=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var g=mxUtils.parseXml(d);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);G(a);this.spinner.stop();u=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),g=0;g<n.length;g++){var h=mxUtils.getTextContent(n[g]),m=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(m); +C(m,new mxRectangle(0,0,r.width,r.height),a)}u=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=p&&null!=r&&(/(\.vsdx)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r))?this.importVisio(p,function(a){w(a,"text/xml")}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,r)&&null!=p?this.parseFile(p, +mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()})); +p=p.cloneNode(!1);p.setAttribute("src",IMAGE_PATH+"/edit.gif");p.setAttribute("title",mxResources.get("edit"));r.insertBefore(p,r.firstChild);mxEvent.addListener(p,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});c=p.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));r.insertBefore(c,r.firstChild);mxEvent.addListener(c,"click",H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"), +c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),r.insertBefore(c,r.firstChild))}l.appendChild(r);l.style.paddingRight=18*r.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth= +64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top= +"-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet","styles/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight= +41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet","styles/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor= +"#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display= -"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,e,n){a=new ImageDialog(this,a,b,d,e,n);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor= -!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,n){a=new LibraryDialog(this,a,b,d,e,n);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer"); -a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d){var c=null!=this.spinner&&null!= -this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),h=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden")); +"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var d=document.getElementById("geFooter");null!=d&&(this.footerHeight=a,d.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,e,m){a=new ImageDialog(this,a,b,c,e,m);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor= +!0;this.editor.graph.model.execute(a)});var d=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,m){a=new LibraryDialog(this,a,b,c,e,m);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer"); +a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!= +this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){d();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden")); else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a= -mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,d,h)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,n,g,k){a=new ErrorDialog(this,a,b,d,e,n,g,k);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this, -null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,n)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= -function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c}; -EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS}; -EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height= -"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(u){}}else this.createEchoRequest(a, -b,d,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),k=0;k<f;++k){for(var l=1024*k,p=Math.min(l+1024,d),t=Array(p-l),q=0;l<p;++q,++l)t[q]= -c[l].charCodeAt(0);e[k]=new Uint8Array(t)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,n,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a, -!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(y){this.handleError(y)}}))}catch(A){this.handleError(A)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,null,4<n?3:4,a,d,e);this.showDialog(b.container,380,n==(mxClient.IS_IOS?0:1)?160:4<n?390:270,!0,!0);b.init()}; -EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a, -!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div"); -var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left= -d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height= -"auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null, -this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,n,b,c)}),d, -n,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,n,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e, -a,g,!0,c,d)}catch(w){this.handleError(w)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,c,d)}catch(w){this.handleError(w)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"), -!1,!1,k,null,null,4<c?3:4,e,g,n);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,n,g,k,l,p){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background; -c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,k,l,null,d);e&&this.editor.graph.addSvgShadow(f);var h=this.getBaseFilename()+".svg",m=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,p));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c, -this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){g?(null== -this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,m,this.thumbImageCache)):m(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),mxUtils.write(a,b),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a, -b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option"); -d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b|| -b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+ -Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option"); -f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();k.style.padding= -mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,n,g,k,l){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+ -a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),g&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(d&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?d="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),l||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d? -this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a, -b,d,e,n,g,k,l,p,t,q){this.getBasenames();var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==e&&(c.target=e);p||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];k&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);l&&d.push("layers");0<d.length&&(p&&d.push("lightbox"),c.toolbar=d.join(" "));null!=t&&0<t.length&&(c.edit=t);null!= -a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+ -'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;"; -m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");f=m.cloneNode(!0);f.setAttribute("value","copy");h.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(k);mxUtils.br(h);h.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));h.appendChild(k);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(k= -document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),h.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&m.setAttribute("disabled","disabled");c.appendChild(h);var p=this.addLinkSection(c),q=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c, -":");var w=document.createElement("input");w.setAttribute("type","text");w.style.marginRight="16px";w.style.width="60px";w.style.marginLeft="4px";w.style.marginRight="12px";w.value="100%";c.appendChild(w);var r=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(c,mxResources.get("allPages"),h,!h),G=this.addCheckbox(c,mxResources.get("layers"),!0),C=this.addCheckbox(c,mxResources.get("lightbox"),!0),H=this.addEditButton(c,C),z=H.getEditInput(); -z.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");z.checked&&C.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(m.checked?d:null,q.checked,w.value,p.getTarget(),p.getColor(),r.checked,B.checked,G.checked,C.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()}; -EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,k,g){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var h=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384", -m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);c.appendChild(m);n=document.createElement("a"); -n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok")); -this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,p=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",c.appendChild(l),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px", -p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",c.appendChild(p),mxUtils.br(c);var q=this.addLinkSection(c,g);d=null!=this.pages&&1<this.pages.length;var r=null;if(null==h||h.constructor!=window.DriveFile||b)r=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(c,mxResources.get("lightbox"),!0),C=this.addEditButton(c,G),H=C.getEditInput(),z=this.addCheckbox(c,mxResources.get("layers"),!0);z.style.marginLeft=H.style.marginLeft;z.style.marginBottom="16px"; -z.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(z.removeAttribute("disabled"),H.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&G.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(q.getTarget(),q.getColor(),null==r?!0:r.checked,G.checked,C.getLink(),z.checked,null!=l?l.value:null,null!= -p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; -c.appendChild(f);var h=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,k,g,l,p){l=null!=l?l:!0;var c=document.createElement("div");c.style.whiteSpace= -"nowrap";var f=this.editor.graph,h="jpeg"==p?170:280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";c.appendChild(m);mxUtils.write(c,mxResources.get("borderWidth")+ -":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";c.appendChild(u);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=p),x=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),r=document.createElement("input");r.style.marginTop="16px";r.style.marginRight= -"8px";r.style.marginLeft="24px";r.setAttribute("disabled","disabled");r.setAttribute("type","checkbox");g&&(c.appendChild(r),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),h+=26,mxEvent.addListener(x,"change",function(){x.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(r.setAttribute("checked","checked"),r.defaultChecked=!0);var H=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),z=document.createElement("input");z.style.marginTop= -"16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(c.appendChild(z),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),h+=26);var L=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=p),E=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(c,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=p);I.style.marginLeft="24px";I.style.marginBottom="16px";E||(I.style.visibility= -"hidden");mxEvent.addListener(L,"change",function(){L.checked&&E?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});l&&E||I.setAttribute("disabled","disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=m.value;k(m.value,q.checked,!x.checked,H.checked,L.checked,z.checked,u.value,r.checked,!I.checked)}),null,d,e);this.showDialog(a.container,320,h,!0,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var m=this.addCheckbox(c,mxResources.get("fit"),!0),n=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e, -!e),l=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,p),r=q.getEditInput(),B=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(c,mxResources.get("layers"),B,!B);G.style.marginLeft=r.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(B&&G.removeAttribute("disabled"),r.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),r.setAttribute("disabled","disabled")); -r.checked&&p.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(m.checked,n.checked,l.checked,p.checked,q.getLink(),G.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,k,g,l,p){function c(c){var b=" ",h="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(k?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var m="";d&&(m=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+c+'"'+m+(""!=h?' style="'+h+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){p({message:mxResources.get("unknownError")})}), -null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";d&&(h="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+h+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?c("data:image/png;base64,"+m.getText()):p({message:mxResources.get("unknownError")})}))}else p({message:mxResources.get("drawingTooLarge")})}; -EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,g,l){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var h=0;h<f.length;h++){var m=f[h].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[h].getAttribute("target")&&f[h].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",p="";e&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(k?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+n+"/>")}))}else p="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ -(k?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=p&&c.setAttribute("style",p),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+ -" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0< -d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(g){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph, -e=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),f=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container); -c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg= -function(a,b,d,e,k,g,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ -mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,k,g,l,p,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,p):null,q)}catch(y){"Invalid image"==y.message?this.downloadFile(q):this.handleError(y)}}),null, -this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,g,l)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],h=1;h<b.length;h++){var g= -b[h].indexOf(")");f.push('url("');f.push(e[c(b[h].substring(0,g))]);f.push('"'+b[h].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),p=null,t=b[k].indexOf("format(",l);0<t&&(p=c(b[k].substring(t+7,b[k].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))c= -"application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;g()}),mxUtils.bind(this, -function(a){d--;g()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,l)),p)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,g,l,p,q,t,r,y,w,F){g=null!=g?g:!0;y=null!=y?y:this.editor.graph;w=null!=w?w:0;var c=q?null:y.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==q&&(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(y.getSvg(c,null,null,F,null,null!=l?l:!0),mxUtils.bind(this,function(d){var e=new Image;e.onload=mxUtils.bind(this, -function(){try{var f=document.createElement("canvas"),h=parseInt(d.getAttribute("width")),n=parseInt(d.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=g?Math.min(1,Math.min(3*b/(4*n),b/h)):b/h);h=Math.ceil(p*h)+2*w;n=Math.ceil(p*n)+2*w;f.setAttribute("width",h);f.setAttribute("height",n);var m=f.getContext("2d");null!=c&&(m.beginPath(),m.rect(0,0,h,n),m.fillStyle=c,m.fill());m.scale(p,p);m.drawImage(e,w/p,w/p);a(f)}catch(Y){null!=k&&k(Y)}});e.onerror=function(a){null!=k&&k(a)};try{t&&this.editor.graph.addSvgShadow(d); -var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(y,d,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(z){null!=k&&k(z)}}),d,r)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert; -a.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,a.baseUrl.length)==a.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,h){for(var g=a.getElementsByTagName(d),k=0;k<g.length;k++)mxUtils.bind(this,function(d){var g= -e.convert(d.getAttribute(h));if(null!=g&&"data:"!=g.substring(0,5)){var k=f[g];null==k?(c++,this.convertImageToDataUri(g,function(e){null!=e&&(f[g]=e,d.setAttribute(h,e));c--;0==c&&b(a)})):d.setAttribute(h,k)}})(g[k])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,k,g){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<= -a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}g=null!=g?g:"data:image/png;base64,";e=g+this.base64Encode(e)}b(e)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout, -function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=d&&d(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a, -b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),n= -this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){f.model.beginUpdate();try{for(a=0;a<m.length;a++){var l=this.updatePageRoot(new DiagramPage(m[a])),p=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,l,l, -p))}}finally{f.model.endUpdate()}}}null!=n&&"mxGraphModel"===n.nodeName&&(c=f.importGraphModel(n,b,d,e))}}catch(w){throw k||this.handleError(w,mxResources.get("invalidOrMissingFile")),w;}return c};EditorUi.prototype.importLucidChart=function(a,b,d,e,k){var c=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,k)}catch(x){this.handleError(x)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions= -!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,k){k=JSON.parse(a);a=[];if(null!=k.state){k=JSON.parse(k.state);for(var c in k.Pages)a.push(k.Pages[c]);a.sort(function(a,c){return a.Properties.Order<c.Properties.Order?-1:a.Properties.Order>c.Properties.Order?1:0})}else a.push(k);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f= -this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,d,e,k,g,l){g=null!=g?g:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>= -a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),h=this.importXml(f,b,d,g,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&& -!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(f,b,d,g,!0),0<h.length)return h}catch(A){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+ -";"))}),l,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),h=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),h,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d), -1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,g);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,g);else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d), -1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[k])),k.value=a,c.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(k.value)&&c.setLinkForCell(k,k.value),k.geometry.width+=c.gridSize,k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize= -function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile= -function(a,b,d,e,k,g,l,p,q,t,r){t=null!=t?t:!0;var c=!1,f=null;"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=r?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,t),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,k,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ -a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,t);null!=p&&p(a)})):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=l&&".vssx"== -l.toLowerCase().substring(l.length-5)&&(l=l.substring(0,l.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,l))):b=this.importXml(a,d,e,t));null!=p&&p(b)}}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,t));c||null==p||p(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,k;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4);b+="==";break}g=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& -3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,e,k,g,l,p,q,t,r,y){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var m=r||this.resampleThreshold,n=0;n<a.length;n++)if("image/"==a[n].type.substring(0, -6)&&a[n].size>m){h=!0;break}var u=mxUtils.bind(this,function(){var h=this.editor.graph,m=h.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,e,f,h,g,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,d,e,f,h,g,k,m,c,y)});g=null!=g?g:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,q=n,u=[],v=mxUtils.bind(this,function(a, -b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=p)p(u);else{var c=[];h.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(c=c.concat(e))}}finally{h.getModel().endUpdate()}}g(c)}}),x=0;x<n;x++)mxUtils.bind(this,function(c){var g=a[c],n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==l||l(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var n=a.target.result,p=n.indexOf(","),q=decodeURIComponent(escape(atob(n.substring(p+1)))), -z=mxUtils.parseXml(q),q=z.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=y?null:q.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?v(c,mxUtils.bind(this,function(){try{if(n.substring(0,p+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")), -t=parseFloat(f.getAttribute("height")),q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox","0 0 "+l+" "+t);else if(isNaN(l)||isNaN(t)){var u=q.split(" ");3<u.length&&(l=parseFloat(u[2]),t=parseFloat(u[3]))}n=this.createSvgDataUri(mxUtils.getXml(f));var r=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,t)),v=k(n,g.type,b+c*m,d+c*m,Math.max(1,Math.round(l*r)),Math.max(1,Math.round(t*r)),g.name);if(isNaN(l)||isNaN(t)){var E=new Image;E.onload=mxUtils.bind(this,function(){l= -Math.max(1,E.width);t=Math.max(1,E.height);v[0].geometry.width=l;v[0].geometry.height=t;f.setAttribute("viewBox","0 0 "+l+" "+t);n=this.createSvgDataUri(mxUtils.getXml(f));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));h.setCellStyles("image",n,[v[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(f))}return v}}}catch(ba){}return null})):v(c,mxUtils.bind(this,function(){return k(u,"text/xml",b+c*m,d+c*m,0,0,g.name)}))}}else{q=!1;if("image/png"==g.type){var E=y?null: -this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var x=new Image;x.src=a.target.result;v(c,mxUtils.bind(this,function(){return k(E,"text/xml",b+c*m,d+c*m,x.width,x.height,g.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result, -mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,n,l){v(c,mxUtils.bind(this,function(){if(null!=h&&h.length<t){var p=f&&this.isResampleImage(a.target.result,r)?Math.min(1,Math.min(e/n,e/l)):1;return k(h,g.type,b+c*m,d+c*m,Math.round(n*p),Math.round(l*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,r)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result, -g.type,b+c*m,d+c*m,240,160,g.name,function(a){v(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)?"1"==urlParams.dev?/(\.vssx)($|\?)/i.test(g.name)?(new com.mxgraph.io.mxVssxCodec).decodeVssx(g,mxUtils.bind(this,function(a){v(c,mxUtils.bind(this,function(){var b=g.name;null!=b&&".vssx"==b.toLowerCase().substring(b.length-5)&&(b=b.substring(0,b.length-5)+".xml");this.loadLibrary(new LocalLibrary(this,a,b))}))})):(new com.mxgraph.io.mxVsdxCodec).decodeVsdx(g, -mxUtils.bind(this,function(a){v(c,mxUtils.bind(this,function(){return this.importXml(a,b+c*m,d+c*m)}))})):k(null,g.type,b+c*m,d+c*m,240,160,g.name,function(a){v(c,function(){return a})},g):"image"==g.type.substring(0,5)?n.readAsDataURL(g):n.readAsText(g)})(x)});h?this.confirmImageResize(function(a){f=a;u()},q):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP? -mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage|| -mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,k,g){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height); -if(e&&this.isResampleImage(b,g))try{var h=Math.max(c/k,f/k);if(1<h){var m=Math.round(c/h),n=Math.round(f/h),l=document.createElement("canvas");l.width=m;l.height=n;l.getContext("2d").drawImage(a,0,0,m,n);var p=l.toDataURL();if(p.length<b.length){var q=document.createElement("canvas");q.width=m;q.height=n;var r=q.toDataURL();p!==r&&(b=p,c=m,f=n)}}}catch(G){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]= -d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){function c(a,b){var c=m;m+=b;return a.substring(c,m)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a, -!0);var m=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(c(a,4),"IHDR"!=c(a,4))null!=k&&k();else{c(a,17);k=a.substring(0,m);do{var n=f(a);if("IDAT"==c(a,4)){k=a.substring(0,m-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);k+=h(d.length)+b+d+h(e^4294967295);k+=a.substring(m-8,a.length);break}k+=a.substring(m-8,m-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+ -(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a= -a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(n){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)} -"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,d=this.editor.graph,e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var k=d.addClickHandler;d.addClickHandler=function(b,c,e){var f= -c;c=function(b,c){if(null==c){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(c=e.getAttribute("href"))}null==c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=f&&f(b,c)};k.call(this,b,c,e)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)}; -this.defaultFilename=mxResources.get("untitledDiagram");var g=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:g.apply(this,arguments)};var p=d.createLinkForHint;d.createLinkForHint=function(c,e){var f=d.isPageLink(c);if(f){var h=c.indexOf(",");0<h&&(h=b.getPageById(c.substring(h+1)),e=null!=h?h.getName():mxResources.get("pageNotFound"))}h=p.call(this, -c,e);f&&mxEvent.addListener(h,"click",function(b){a(c);mxEvent.consume(b)});return h};var q=d.labelLinkClicked;d.labelLinkClicked=function(b,c,e){var f=c.getAttribute("href");null==f||!d.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?q.apply(this,arguments):(d.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var r=this.actions.get("print");r.setEnabled(!mxClient.IS_IOS|| -!navigator.standalone);r.visible=r.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){A.innerHTML=" ";A.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle"); -this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||d.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var h=f[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,h){b.insertImage(a, -f,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(K){}}),!1);var A=document.createElement("div");A.style.position="absolute";A.style.whiteSpace="nowrap";A.style.overflow="hidden";A.style.display="block";A.contentEditable=!0;mxUtils.setOpacity(A,0);A.style.width="1px";A.style.height="1px";A.innerHTML= -" ";var y=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==d.container||!d.isEnabled()||d.isMouseDown||d.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||y||(A.style.left=d.container.scrollLeft+10+"px",A.style.top= -d.container.scrollTop+10+"px",d.container.appendChild(A),y=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){A.focus();document.execCommand("selectAll",!1,null)},0):(A.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!y||224!=b&&17!=b&&91!=b||(y=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),A.parentNode.removeChild(A))}),0)}));mxEvent.addListener(A, -"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(A),t())}));mxEvent.addListener(A,"cut",mxUtils.bind(this,function(a){d.isEnabled()&&(this.copyCells(A,!0),t())}));mxEvent.addListener(A,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(A.innerHTML=" ",A.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,A);A.innerHTML=" "}),0))}),!0);var w=this.isSelectionAllowed;this.isSelectionAllowed= -function(a){return mxEvent.getSource(a)==A?!0:w.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}), -mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,h){b.insertImage(a,f,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b= -0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<= -mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){r=document.createElement("div");r.style.position="absolute";r.style.top="95px";r.style.left="250px";r.style.width="2000px";r.style.height="30px";r.style.background= -"whiteSmoke";document.body.appendChild(r);var F=document.createElement("div");F.style.position="absolute";F.style.top="125px";F.style.left="220px";F.style.width="30px";F.style.height="1000px";F.style.background="whiteSmoke";document.body.appendChild(F);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph, -F,!0);this.hRuler=new mxRuler(this.editor.graph,r,!1)}if("1"==urlParams.test){r=document.getElementById("geFooter");null!=r&&(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)})),r.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed; -this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}r=document.getElementById("geInfo");null!=r&&r.parentNode.removeChild(r);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null== -C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=d.view.translate,e=d.view.scale,f=b.x/e-c.x,h=b.y/e-c.y;mxEvent.isAltDown(a)&&(h=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files, -f,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,f,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var m=null,c=b.getElementsByTagName("img"); -null!=c&&1==c.length?(k=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(k=b[0].getAttribute("href")));var n=!0,l=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(k,f,h,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;l()},mxEvent.isControlDown(a)):l()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this, -function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,null,"",f,h,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(g,f,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"), -f,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle= -mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged", -mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor); -mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(), -mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus(); -document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent), -f=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(v){}try{var c=b.getElementsByTagName("span"),l=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(l)&&(f=!0,e=l)}catch(v){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&& -(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b), -b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(), -"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types, -"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this, -function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body; -var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=b+"px";g.style.left=c+"px";g.style.width=Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container? -this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c= -0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(), -200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);null!=e&&".vssx"==e.toLowerCase().substring(e.length-5)&&(e=e.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b);else this.handleError({message:mxResources.get(413==a.status? -"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml, -this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile= -function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()? -this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]), -this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])), -c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&& -(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(), -this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct(): -this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified? -null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function h(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a= -decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(I){}return a}if(f.source==(window.opener||window.parent)){var g=f.data;if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(E){g=null}if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"== -g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){l=null;l="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound", -[g.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}), -"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(E){k.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var l=1==g.enableRecent,p=1==g.enableSearch,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml, -name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,p?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container, -620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==g.action)this.searchReadyCallback(g.list,g.errorMsg);else if("recentDocsList"==g.action)this.recentReadyCallback(g.list,g.errorMsg);else{if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"== -g.action){var m=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var n=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0); -this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(n);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(n))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q= -this.createTemporaryGraph(q.getStylesheet()),x=q.getGlobalVariable,z=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+ -"&base64=1&xml="+encodeURIComponent(encodeURIComponent(n)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);m=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),m.xml=mxUtils.getXml(l),m.data=this.getFileData(null,null, -!0,null,null,null,l),m.format=g.format;else if("html"==g.format)n=this.editor.getGraphXml(),m.data=this.getHtml(n,this.editor.graph),m.xml=mxUtils.getXml(n),m.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);m.xml=this.getFileData(!0);m.format="svg";if(g.embedImages||null==g.embedImages){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1), -"xmlsvg"==g.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(m),"*")}));return}l="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0), -this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));m.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(m),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight= -"12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage", -data:JSON.stringify(g)}),"*");return}}}g=h(g);c=!0;try{a(g,f)}catch(E){this.handleError(E)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var L=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=L();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=L();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d, -"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged", -b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme? -"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"), -mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight= -"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}), -null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,k="auto",l="auto",p=40,q=40,r=0,y=this.editor.graph;y.getGraphBounds();for(var w=function(){y.setSelectionCells(T);y.scrollCellToVisible(y.getSelectionCell())},F=y.getFreeInsertPoint(),B=F.x,G=F.y,F=G,C=null,H="auto",z=[],L=null,E=null,I=0;I<b.length&& -"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var R=mxUtils.trim(a.substring(1,Y)),P=mxUtils.trim(a.substring(Y+1));"label"==R?C=y.sanitizeHtml(P):"style"==R?e=P:"identity"==R&&0<P.length&&"-"!=P?g=P:"width"==R?k=P:"height"==R?l=P:"ignore"==R?E=P.split(","):"connect"==R?z.push(JSON.parse(P)):"link"==R?L=P:"padding"==R?r=parseFloat(P): -"edgespacing"==R?p=parseFloat(P):"nodespacing"==R?q=parseFloat(P):"layout"==R&&(H=P)}}}var K=this.editor.csvToArray(b[I]);a=null;if(null!=g)for(var J=0;J<K.length;J++)if(g==K[J]){a=J;break}null==C&&(C="%"+K[0]+"%");if(null!=z)for(var M=0;M<z.length;M++)null==d[z[M].to]&&(d[z[M].to]={});y.model.beginUpdate();try{for(J=I+1;J<b.length;J++){var S=this.editor.csvToArray(b[J]);if(S.length==K.length){var D=null,W=null!=a?S[a]:null;null!=W&&(D=y.model.getCell(W));null==D&&(D=new mxCell(C,new mxGeometry(B, -F,0,0),e||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=W);for(var Q=0;Q<S.length;Q++)y.setAttributeForCell(D,K[Q],S[Q]);y.setAttributeForCell(D,"placeholders","1");D.style=y.replacePlaceholders(D,D.style);for(M=0;M<z.length;M++)d[z[M].to][D.getAttribute(z[M].to)]=D;null!=L&&"link"!=L&&(y.setLinkForCell(D,D.getAttribute(L)),y.setAttributeForCell(D,L,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[D]));var X=this.editor.graph.getPreferredSizeForCell(D);D.geometry.width="auto"==k?X.width+ -r:parseFloat(k);D.geometry.height="auto"==l?X.height+r:parseFloat(l);F+=D.geometry.height+q;c.push(y.addCell(D))}}for(var U=c.slice(),T=c.slice(),M=0;M<z.length;M++)for(var O=z[M],J=0;J<c.length;J++){var D=c[J],ca=D.getAttribute(O.from);if(null!=ca){y.setAttributeForCell(D,O.from,null);for(var V=ca.split(","),Q=0;Q<V.length;Q++){var Z=d[O.to][V[Q]];null!=Z&&(C=O.label,null!=O.fromlabel&&(C=(D.getAttribute(O.fromlabel)||"")+(C||"")),null!=O.tolabel&&(C=(C||"")+(Z.getAttribute(O.tolabel)||"")),T.push(y.insertEdge(null, -null,C||"",O.invert?Z:D,O.invert?D:Z,O.style||y.createCurrentEdgeStyle())),mxUtils.remove(O.invert?D:Z,U))}}}if(null!=E)for(J=0;J<c.length;J++)for(D=c[J],Q=0;Q<E.length;Q++)y.setAttributeForCell(D,mxUtils.trim(E[Q]),null);var aa=new mxParallelEdgeLayout(y);aa.spacing=p;var ia=function(){aa.execute(y.getDefaultParent());for(var a=0;a<c.length;a++){var b=y.getCellGeometry(c[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==k&&(b.width=Math.round(y.snap(b.width)));"auto"==l&&(b.height= -Math.round(y.snap(b.height)))}};if("circle"==H){var da=new mxCircleLayout(y);da.resetEdges=!1;var ma=da.isVertexIgnored;da.isVertexIgnored=function(a){return ma.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(y.getDefaultParent());ia()},!0,w);w=null}else if("horizontaltree"==H||"verticaltree"==H||"auto"==H&&T.length==2*c.length-1&&1==U.length){y.view.validate();var fa=new mxCompactTreeLayout(y,"horizontaltree"==H);fa.levelDistance=q;fa.edgeRouting=!1;fa.resetEdges= -!1;this.executeLayout(function(){fa.execute(y.getDefaultParent(),0<U.length?U[0]:null)},!0,w);w=null}else if("horizontalflow"==H||"verticalflow"==H||"auto"==H&&1==U.length){y.view.validate();var ja=new mxHierarchicalLayout(y,"horizontalflow"==H?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=q;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(y.getDefaultParent(),T);y.moveCells(T,B,G)},!0,w);w=null}else if("organic"==H||"auto"==H&&T.length>c.length){y.view.validate(); -var ba=new mxFastOrganicLayout(y);ba.forceConstant=3*q;ba.resetEdges=!1;var qa=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return qa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(y);aa.spacing=p;this.executeLayout(function(){ba.execute(y.getDefaultParent());ia()},!0,w);w=null}this.hideDialog()}finally{y.model.endUpdate()}null!=w&&w()}}catch(na){this.handleError(na)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&& -null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&& -(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a= -this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2* -a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a, -8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat= -e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var h=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=h.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient|| -c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled(); -this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(d);this.menus.get("newLibrary").setEnabled(d);this.menus.get("extras").setEnabled(d); -a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!= -this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding= -"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b= -'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+ -IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){}; -EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b); -this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b); -this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("rename").setEnabled(null!=d&&d.isRenamable());this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted()); -a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var r=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);r.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,g){var c=a.editor.graph;if("xml"== -d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,g)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),l=Math.floor(h.width*k/c.view.scale),p=Math.floor(h.height*k/c.view.scale);f.length<=MAX_REQUEST_SIZE&&l*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+ -encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")}; +mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,m,h,k){a=new ErrorDialog(this,a,b,c,e,m,h,k);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this, +null,a,mxResources.get("ok"),b);this.showDialog(d.container,340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,m){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,m)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= +function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d}; +EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS}; +EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,m){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height= +"380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var d=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof d.download;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(u){}}else this.createEchoRequest(a, +b,c,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,m,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=m?"&format="+m:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,f=Math.ceil(c/1024),e=Array(f),k=0;k<f;++k){for(var l=1024*k,p=Math.min(l+1024,c),r=Array(p-l),q=0;l<p;++q,++l)r[q]= +d[l].charCodeAt(0);e[k]=new Uint8Array(r)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,m,h,k){h=null!=h?h:!1;k=null!=k?k:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a, +!1)),f.document.close())}else this.openInNewWindow(a,c,e);else b==App.MODE_DEVICE?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(x){this.handleError(x)}}))}catch(A){this.handleError(A)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,k,null,null,4<m?3:4,a,c,e);this.showDialog(b.container,380,m==(mxClient.IS_IOS?0:1)?160:4<m?390:270,!0,!0);b.init()}; +EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a, +!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var d=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div"); +var c=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left= +c.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=c.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height= +"auto";this.exportDialog.style.padding="10px";var d=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",d);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(d.substring(d.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null, +this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,m){this.isLocalFileSave()?this.saveLocalFile(c,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,m,b,d)}),c, +m,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,m,h,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e, +a,h,!0,d,c)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,d,c)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"), +!1,!1,k,null,null,4<d?3:4,e,h,m);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,m,h){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,m,h,k,l,p){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background; +d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,k,l,null,c);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,p));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d, +this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null== +this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,n,this.thumbImageCache)):n(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,m,h){h=null!=h?h:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");h&&(a.appendChild(d),mxUtils.write(a,b),m||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a, +b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));f.appendChild(c);c=document.createElement("option"); +c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");f.appendChild(c);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b|| +b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+ +Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));c.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));c.appendChild(f);f=document.createElement("option"); +f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));c.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(f));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;d()});mxEvent.consume(a)}));d();k.style.padding= +mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,m,h,k,l){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+ +a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=m&&0<m.length&&f.push("edit="+encodeURIComponent(m)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=k?c="#U"+encodeURIComponent(k):(d=this.getCurrentFile(),l||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c? +this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a, +b,c,e,m,h,k,l,p,r,q){this.getBasenames();var d={};""!=m&&m!=mxConstants.NONE&&(d.highlight=m);"auto"!==e&&(d.target=e);p||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];k&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);l&&c.push("layers");0<c.length&&(p&&c.push("lightbox"),d.toolbar=c.join(" "));null!=r&&0<r.length&&(d.edit=r);null!= +a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+ +'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;"; +n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","type-embedhtmldialog");f=n.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var r=this.getCurrentFile();null==c&&null!=r&&r.constructor==window.DriveFile&&(k= +document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(r.getId())})));f.setAttribute("checked","checked");null==c&&n.setAttribute("disabled","disabled");d.appendChild(g);var l=this.addLinkSection(d),p=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d, +":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";d.appendChild(q);var t=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(d,mxResources.get("allPages"),g,!g),G=this.addCheckbox(d,mxResources.get("layers"),!0),C=this.addCheckbox(d,mxResources.get("lightbox"),!0),H=this.addEditButton(d,C),y=H.getEditInput(); +y.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled");y.checked&&C.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(n.checked?c:null,p.checked,q.value,l.getTarget(),l.getColor(),t.checked,B.checked,G.checked,C.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()}; +EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,m,h){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384", +n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));n.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));k.style.marginTop="12px";k.className="geBtn";n.appendChild(k);d.appendChild(n);k=document.createElement("a"); +k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));n.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok")); +this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,p=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",d.appendChild(l),mxUtils.write(d,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px", +p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",d.appendChild(p),mxUtils.br(d);var q=this.addLinkSection(d,h);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==g||g.constructor!=window.DriveFile||b)t=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,G),H=C.getEditInput(),y=this.addCheckbox(d,mxResources.get("layers"),!0);y.style.marginLeft=H.style.marginLeft;y.style.marginBottom="16px"; +y.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(y.removeAttribute("disabled"),H.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&G.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){m(q.getTarget(),q.getColor(),null==t?!0:t.checked,G.checked,C.getLink(),y.checked,null!=l?l.value:null,null!= +p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px"; +d.appendChild(f);var g=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,k,h,l,p){l=null!=l?l:!0;var d=document.createElement("div");d.style.whiteSpace= +"nowrap";var f=this.editor.graph,g="jpeg"==p?170:280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";d.appendChild(m);mxUtils.write(d,mxResources.get("borderWidth")+ +":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";d.appendChild(u);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=p),w=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight= +"8px";t.style.marginLeft="24px";t.setAttribute("disabled","disabled");t.setAttribute("type","checkbox");h&&(d.appendChild(t),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(w,"change",function(){w.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(t.setAttribute("checked","checked"),t.defaultChecked=!0);var H=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),y=document.createElement("input");y.style.marginTop= +"16px";y.style.marginRight="8px";y.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||y.setAttribute("disabled","disabled");b&&(d.appendChild(y),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=26);var L=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=p),E=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(d,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=p);I.style.marginLeft="24px";I.style.marginBottom="16px";E||(I.style.visibility= +"hidden");mxEvent.addListener(L,"change",function(){L.checked&&E?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});l&&E||I.setAttribute("disabled","disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=m.value;k(m.value,q.checked,!w.checked,H.checked,L.checked,y.checked,u.value,t.checked,!I.checked)}),null,c,e);this.showDialog(a.container,320,g,!0,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(g)}var n=this.addCheckbox(d,mxResources.get("fit"),!0),m=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e, +!e),l=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),q=this.addEditButton(d,p),t=q.getEditInput(),B=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(d,mxResources.get("layers"),B,!B);G.style.marginLeft=t.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(B&&G.removeAttribute("disabled"),t.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled")); +t.checked&&p.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(n.checked,m.checked,l.checked,p.checked,q.getLink(),G.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,k,h,l,p){function d(d){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+d+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,mxUtils.bind(this,function(a){p({message:mxResources.get("unknownError")})}), +null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";c&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+n.getText()):p({message:mxResources.get("unknownError")})}))}else p({message:mxResources.get("drawingTooLarge")})}; +EditorUi.prototype.createEmbedSvg=function(a,b,c,e,k,h,l){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var m=" ",p="";e&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+ +(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=p&&d.setAttribute("style",p),l(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+ +" "+mxResources.get("months");d=Math.floor(a/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(a/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(a/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==a.nodeName){var c=a.getElementsByTagName("diagram");if(0< +c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(h){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph, +e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container); +d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(r){null!=b&&b(r)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg= +function(a,b,c,e,k,h,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,e,k,h,l,p,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,c,p):null,q)}catch(x){"Invalid image"==x.message?this.downloadFile(q):this.handleError(x)}}),null, +this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,h,l)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},h=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],g=1;g<b.length;g++){var h= +b[g].indexOf(")");f.push('url("');f.push(e[d(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),p=null,r=b[k].indexOf("format(",l);0<r&&(p=d(b[k].substring(r+7,b[k].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))d= +"application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))d="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){e[a]=d;c--;h()}),mxUtils.bind(this, +function(a){c--;h()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[k].substring(0,l)),p)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,h,p,l,q,r,t,x,z,F){h=null!=h?h:!0;x=null!=x?x:this.editor.graph;z=null!=z?z:0;var d=q?null:x.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==q&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(x.getSvg(d,null,null,F,null,null!=p?p:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this, +function(){try{var f=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*z;m=Math.ceil(l*m)+2*z;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");null!=d&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=d,n.fill());n.scale(l,l);n.drawImage(e,z/l,z/l);a(f)}catch(Y){null!=k&&k(Y)}});e.onerror=function(a){null!=k&&k(a)};try{r&&this.editor.graph.addSvgShadow(c); +var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(x,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(y){null!=k&&k(y)}}),c,t)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert, +c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:e&&d.substring(0,a.baseUrl.length)!=a.baseUrl?d=PROXY_URL+"?url="+encodeURIComponent(d):"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments))}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var h=a.getElementsByTagName(c), +k=0;k<h.length;k++)mxUtils.bind(this,function(c){var h=e.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var k=f[h];null==k?(d++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,k)}else null!=h&&c.setAttribute(g,h)})(h[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,k,h){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k= +null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!= +c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){k&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0, +23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,c=this;d.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}}; +d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),m=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var n=m.getElementsByTagName("diagram");if(1==n.length)m=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){f.model.beginUpdate(); +try{for(a=0;a<n.length;a++){var l=this.updatePageRoot(new DiagramPage(n[a])),p=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[p+1]));f.model.execute(new ChangePage(this,l,l,p))}}finally{f.model.endUpdate()}}}null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,b,c,e))}}catch(z){throw k||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}return d};EditorUi.prototype.importVisio=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)}); +var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)try{this.doImportVisio(a,b,c)}catch(m){c(m)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});"undefined"===typeof VsdxExport|| +this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,k){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,k)}catch(w){this.handleError(w)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js", +d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.insertLucidChart=function(a,b,c,e,k){k=JSON.parse(a);a=[];if(null!=k.state){k=JSON.parse(k.state);for(var d in k.Pages)a.push(k.Pages[d]);a.sort(function(a,d){return a.Properties.Order<d.Properties.Order?-1:a.Properties.Order>d.Properties.Order?1:0})}else a.push(k);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(), +this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,e,k,h,l){h=null!=h?h:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText, +b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,c,h,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+ +1)),g=this.importXml(f,b,c,h,!0),0<g.length)return g}catch(A){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/ +e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells", +[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,h);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,h);else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[k])),k.value= +a,d.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(k.value)&&d.setLinkForCell(k,k.value),k.geometry.width+=d.gridSize,k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d=-1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+ +" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,e,k,h,l,p,q,r,t){r=null!=r?r:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var d=null;null!=a&&"<mxlibrary"==a.substring(0, +10)?this.loadLibrary(new LocalLibrary(this,a,l)):d=this.importXml(a,c,e,r);null!=p&&p(d)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=t?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,r),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),r&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,r);null!=p&&p(a)})):null!=q&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l))?(d=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&& +299>=a.status?g(a.responseText):null!=p&&p(null))}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,r));d||null==p||p(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,e,h,k;d<c;){e=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}h=a.charCodeAt(d++);if(d==c){b+= +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}k=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h& +15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,k,h,l,p,q,r,t,x){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;r=null!=r?r:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=t||this.resampleThreshold,m=0;m<a.length;m++)if("image/"==a[m].type.substring(0,6)&&a[m].size>n){g=!0;break}var u=mxUtils.bind(this,function(){var g=this.editor.graph, +n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,g,h,k,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,e,f,g,h,k,n,d,x)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var m=a.length,q=m,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=p)p(u);else{var d=[];g.getModel().beginUpdate(); +try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}h(d)}}),v=0;v<m;v++)mxUtils.bind(this,function(d){var h=a[d],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==l||l(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var m=a.target.result,p=m.indexOf(","),q=decodeURIComponent(escape(atob(m.substring(p+1)))),y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=x?null:q.getAttribute("content"); +null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?w(d,mxUtils.bind(this,function(){try{if(m.substring(0,p+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")),r=parseFloat(f.getAttribute("height")),q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox", +"0 0 "+l+" "+r);else if(isNaN(l)||isNaN(r)){var u=q.split(" ");3<u.length&&(l=parseFloat(u[2]),r=parseFloat(u[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var t=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,r)),w=k(m,h.type,b+d*n,c+d*n,Math.max(1,Math.round(l*t)),Math.max(1,Math.round(r*t)),h.name);if(isNaN(l)||isNaN(r)){var E=new Image;E.onload=mxUtils.bind(this,function(){l=Math.max(1,E.width);r=Math.max(1,E.height);w[0].geometry.width=l;w[0].geometry.height=r;f.setAttribute("viewBox","0 0 "+ +l+" "+r);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[w[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(f))}return w}}}catch(ba){}return null})):w(d,mxUtils.bind(this,function(){return k(u,"text/xml",b+d*n,c+d*n,0,0,h.name)}))}}else{q=!1;if("image/png"==h.type){var E=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var v=new Image;v.src=a.target.result;w(d,mxUtils.bind(this, +function(){return k(E,"text/xml",b+d*n,c+d*n,v.width,v.height,h.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,l){w(d,mxUtils.bind(this, +function(){if(null!=g&&g.length<r){var p=f&&this.isResampleImage(a.target.result,t)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+d*n,c+d*n,Math.round(m*p),Math.round(l*p),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+d*n,c+d*n,240,160,h.name,function(a){w(d,function(){return a})})});/(\.vsdx)($|\?)/i.test(h.name)|| +/(\.vssx)($|\?)/i.test(h.name)?k(null,h.type,b+d*n,c+d*n,240,160,h.name,function(a){w(d,function(){return a})},h):"image"==h.type.substring(0,5)?m.readAsDataURL(h):m.readAsText(h)})(v)});g?this.confirmImageResize(function(a){f=a;u()},q):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c? +e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,c)};EditorUi.prototype.parseFile=function(a,b, +c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,h){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,h))try{var g=Math.max(d/k,f/k);if(1<g){var n=Math.round(d/ +g),m=Math.round(f/g),l=document.createElement("canvas");l.width=n;l.height=m;l.getContext("2d").drawImage(a,0,0,n,m);var p=l.toDataURL();if(p.length<b.length){var q=document.createElement("canvas");q.width=n;q.height=m;var t=q.toDataURL();p!==t&&(b=p,d=n,f=m)}}}catch(G){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,k=0;8>k;k++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^ +b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,k){function d(a,b){var d=n;n+=b;return a.substring(d,n)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a, +4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,n);do{var m=f(a);if("IDAT"==d(a,4)){k=a.substring(0,n-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);k+=g(c.length)+b+c+g(e^4294967295);k+=a.substring(n-8,a.length);break}k+=a.substring(n-8,n-4+m);d(a,m);d(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b= +null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(m){}null!= +b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph, +e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var d=0;d<b.pages.length;d++)if(b.pages[d]==b.currentPage){0<d&&(a+=(0<a.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var k=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null== +d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};k.call(this,b,d,e)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"== +a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var p=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=g?g.getName():mxResources.get("pageNotFound"))}g=p.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var q=c.labelLinkClicked;c.labelLinkClicked= +function(b,d,e){var f=d.getAttribute("href");null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?q.apply(this,arguments):(c.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r= +function(){window.setTimeout(function(){A.innerHTML=" ";A.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste", +mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var d=a.clipboardData||a.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,d,c,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()}); +else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(K){}}),!1);var A=document.createElement("div");A.style.position="absolute";A.style.whiteSpace="nowrap";A.style.overflow="hidden";A.style.display="block";A.contentEditable=!0;mxUtils.setOpacity(A,0);A.style.width="1px";A.style.height="1px";A.innerHTML=" ";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86, +null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||x||(A.style.left=c.container.scrollLeft+10+"px",A.style.top=c.container.scrollTop+10+"px",c.container.appendChild(A),x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){A.focus();document.execCommand("selectAll", +!1,null)},0):(A.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=b&&17!=b&&91!=b||(x=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),A.parentNode.removeChild(A))}),0)}));mxEvent.addListener(A,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(A),r())}));mxEvent.addListener(A,"cut",mxUtils.bind(this, +function(a){c.isEnabled()&&(this.copyCells(A,!0),r())}));mxEvent.addListener(A,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(A.innerHTML=" ",A.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,A);A.innerHTML=" "}),0))}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==A?!0:z.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight|| +0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation(); +a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=a.dataTransfer.getData("text/uri-list"); +/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types, +"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){t=document.createElement("div");t.style.position="absolute";t.style.top="95px";t.style.left="250px";t.style.width="2000px";t.style.height="30px";t.style.background="whiteSmoke";document.body.appendChild(t);var F=document.createElement("div");F.style.position="absolute";F.style.top="125px";F.style.left="220px"; +F.style.width="30px";F.style.height="1000px";F.style.background="whiteSmoke";document.body.appendChild(F);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,F,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.test){t=document.getElementById("geFooter");null!=t&&(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)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, +mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&& +(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container, +"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")? +a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var n=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&& +(k=b[0].getAttribute("href")));var m=!0,l=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;l()},mxEvent.isControlDown(a)):l()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null, +null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()}; +EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged", +mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat= +mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave); +mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph; +if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var d=b.getElementsByTagName("span");if(null!=d&&0<d.length&&"application/vnd.lucid.chart.objects"=== +d[0].getAttribute("data-lucid-type")){var c=d[0].getAttribute("data-lucid-content");null!=c&&0<c.length&&(this.importLucidChart(c,0,0),mxEvent.consume(a))}else{var c=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(v){}try{var d=b.getElementsByTagName("span"),l=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e); +this.isCompatibleString(l)&&(f=!0,e=l)}catch(v){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,d,d)):(f=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,f.x+d,f.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&& +this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&& +12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0); +else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))): +0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash= +"#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var h=document.documentElement;c=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth, +e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=d+"px";h.style.width=Math.max(0,c-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a); +var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){var c=d.target.result,e=a.name;if(null!= +e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a, +e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})); +else if('{"state":"{\\"Properties\\":'==c.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(c,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==d.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this, +d.target.result,a.name))}catch(r){this.handleError(r,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,e,b)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?d.readAsDataURL(a):d.readAsText(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(), +e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"), +null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root, +a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW]))); +for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")}; +EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()): +(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))}; +EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,h=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))): +this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(I){}return a}if(f.source== +(window.opener||window.parent)){var h=f.data;if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(E){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var l=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey): +null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==h.action){l=null;l="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):g(h.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft", +result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()})); +try{l.init()}catch(E){k.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();var l=1==h.enableRecent,p=1==h.enableSearch,l=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=h.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null, +null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,p?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"== +h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var n=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body, +n):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var m=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(m); +k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(m))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),w=q.getGlobalVariable,y=this.pages[0];q.getGlobalVariable=function(a){return"page"== +a?y.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(y.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(m)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()? +t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);n=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),n.xml=mxUtils.getXml(l),n.data=this.getFileData(null,null,!0,null,null,null,l),n.format=h.format;else if("html"==h.format)m=this.editor.getGraphXml(),n.data=this.getHtml(m,this.editor.graph), +n.xml=mxUtils.getXml(m),n.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);n.xml=this.getFileData(!0);n.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0); +this.spinner.stop();n.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(n),"*")}));return}l="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));n.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(n), +"*")}return}if("load"==h.action)c=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop= +"6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}h=g(h);d=!0;try{a(h,f)}catch(E){this.handleError(E)}d=!1;null!=urlParams.modified&& +this.editor.setStatus("");var L=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=L();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=L();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged", +b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}})); +var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title", +mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding= +"4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b); +this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv= +function(a){try{var b=a.split("\n"),d=[];if(0<b.length){var c={},e=null,h=null,k="auto",l="auto",p=40,q=40,t=0,x=this.editor.graph;x.getGraphBounds();for(var z=function(){x.setSelectionCells(T);x.scrollCellToVisible(x.getSelectionCell())},F=x.getFreeInsertPoint(),B=F.x,G=F.y,F=G,C=null,H="auto",y=[],L=null,E=null,I=0;I<b.length&&"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!= +a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var R=mxUtils.trim(a.substring(1,Y)),P=mxUtils.trim(a.substring(Y+1));"label"==R?C=x.sanitizeHtml(P):"style"==R?e=P:"identity"==R&&0<P.length&&"-"!=P?h=P:"width"==R?k=P:"height"==R?l=P:"ignore"==R?E=P.split(","):"connect"==R?y.push(JSON.parse(P)):"link"==R?L=P:"padding"==R?t=parseFloat(P):"edgespacing"==R?p=parseFloat(P):"nodespacing"==R?q=parseFloat(P):"layout"==R&&(H=P)}}}var K=this.editor.csvToArray(b[I]);a=null;if(null!=h)for(var J=0;J<K.length;J++)if(h== +K[J]){a=J;break}null==C&&(C="%"+K[0]+"%");if(null!=y)for(var M=0;M<y.length;M++)null==c[y[M].to]&&(c[y[M].to]={});x.model.beginUpdate();try{for(J=I+1;J<b.length;J++){var S=this.editor.csvToArray(b[J]);if(S.length==K.length){var D=null,W=null!=a?S[a]:null;null!=W&&(D=x.model.getCell(W));null==D&&(D=new mxCell(C,new mxGeometry(B,F,0,0),e||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=W);for(var Q=0;Q<S.length;Q++)x.setAttributeForCell(D,K[Q],S[Q]);x.setAttributeForCell(D,"placeholders","1");D.style=x.replacePlaceholders(D, +D.style);for(M=0;M<y.length;M++)c[y[M].to][D.getAttribute(y[M].to)]=D;null!=L&&"link"!=L&&(x.setLinkForCell(D,D.getAttribute(L)),x.setAttributeForCell(D,L,null));x.fireEvent(new mxEventObject("cellsInserted","cells",[D]));var X=this.editor.graph.getPreferredSizeForCell(D);D.geometry.width="auto"==k?X.width+t:parseFloat(k);D.geometry.height="auto"==l?X.height+t:parseFloat(l);F+=D.geometry.height+q;d.push(x.addCell(D))}}for(var U=d.slice(),T=d.slice(),M=0;M<y.length;M++)for(var O=y[M],J=0;J<d.length;J++){var D= +d[J],ca=D.getAttribute(O.from);if(null!=ca){x.setAttributeForCell(D,O.from,null);for(var V=ca.split(","),Q=0;Q<V.length;Q++){var Z=c[O.to][V[Q]];null!=Z&&(C=O.label,null!=O.fromlabel&&(C=(D.getAttribute(O.fromlabel)||"")+(C||"")),null!=O.tolabel&&(C=(C||"")+(Z.getAttribute(O.tolabel)||"")),T.push(x.insertEdge(null,null,C||"",O.invert?Z:D,O.invert?D:Z,O.style||x.createCurrentEdgeStyle())),mxUtils.remove(O.invert?D:Z,U))}}}if(null!=E)for(J=0;J<d.length;J++)for(D=d[J],Q=0;Q<E.length;Q++)x.setAttributeForCell(D, +mxUtils.trim(E[Q]),null);var aa=new mxParallelEdgeLayout(x);aa.spacing=p;var ia=function(){aa.execute(x.getDefaultParent());for(var a=0;a<d.length;a++){var b=x.getCellGeometry(d[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==k&&(b.width=Math.round(x.snap(b.width)));"auto"==l&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==H){var da=new mxCircleLayout(x);da.resetEdges=!1;var ma=da.isVertexIgnored;da.isVertexIgnored=function(a){return ma.apply(this,arguments)||0>mxUtils.indexOf(d, +a)};this.executeLayout(function(){da.execute(x.getDefaultParent());ia()},!0,z);z=null}else if("horizontaltree"==H||"verticaltree"==H||"auto"==H&&T.length==2*d.length-1&&1==U.length){x.view.validate();var fa=new mxCompactTreeLayout(x,"horizontaltree"==H);fa.levelDistance=q;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(x.getDefaultParent(),0<U.length?U[0]:null)},!0,z);z=null}else if("horizontalflow"==H||"verticalflow"==H||"auto"==H&&1==U.length){x.view.validate();var ja= +new mxHierarchicalLayout(x,"horizontalflow"==H?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=q;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(x.getDefaultParent(),T);x.moveCells(T,B,G)},!0,z);z=null}else if("organic"==H||"auto"==H&&T.length>d.length){x.view.validate();var ba=new mxFastOrganicLayout(x);ba.forceConstant=3*q;ba.resetEdges=!1;var qa=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return qa.apply(this,arguments)||0>mxUtils.indexOf(d,a)}; +aa=new mxParallelEdgeLayout(x);aa.spacing=p;this.executeLayout(function(){ba.execute(x.getDefaultParent());ia()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(na){this.handleError(na)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}else b=window.location.search;return b}; +EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container, +440,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/ +b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c= +this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ +a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&& +null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var d=0;null==this.drive&&"function"!==typeof window.DriveClient||d++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;b||null==this.gitHub||d++;b||null==this.trello&&"function"!==typeof window.TrelloClient|| +d++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&d++;mxClient.IS_IOS||d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c); +this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").setEnabled(c);a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b); +this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div"); +this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this, +function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b='<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b= +'<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e, +"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates= +function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&& +!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!= +c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog), +this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,h){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),l=Math.floor(g.width*k/d.view.scale), +p=Math.floor(g.height*k/d.view.scale);f.length<=MAX_REQUEST_SIZE&&l*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+p+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")}; DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))} -SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,d=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState); -b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,b,e,d){SelectPage.call(this,a,e);this.relatedPage=b;this.index=d;this.previousIndex=null} +SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,c=b.graph.compress(e.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,c);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState); +b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,b,e,c){SelectPage.call(this,a,e);this.relatedPage=b;this.index=c;this.previousIndex=null} mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)}; EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null}; -EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=this.tabContainer.style.height;this.tabContainer.style.height= -null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,d=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft= -a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),d=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===typeof Editor.MathJaxClear|| -this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}; -Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),d=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"== -a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=d&&null!=k?new mxRectangle(0,0,parseFloat(d),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"), +EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var c=this.tabContainer.style.height;this.tabContainer.style.height= +null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,c=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft= +a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===typeof Editor.MathJaxClear|| +this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}; +Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"== +a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=k?new mxRectangle(0,0,parseFloat(c),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"), selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}}; Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(), arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}}; @@ -2980,132 +2980,132 @@ Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteX a.pageFormat,this.view.scale=a.scale,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultParent,this.connectionArrowsEnabled=a.arrows,this.setTooltips(a.tooltips),this.setConnectable(a.connect),this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=a.translate&&(this.view.translate=a.translate)):(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize= mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.background=this.defaultGraphBackground,this.backgroundImage=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize= this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var b=this.editor.extractGraphModel(a.node);if(null!=b){a.graphModelNode=b;a.viewState=this.editor.graph.createViewState(b);var e=new mxCodec(b.ownerDocument);a.root=e.decode(b).root}else a.root=this.editor.graph.model.createRoot()}return a}; -EditorUi.prototype.selectPage=function(a,b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var d=new SelectPage(this,a);d.execute();e.add(d);e.notify();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))}; +EditorUi.prototype.selectPage=function(a,b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var c=new SelectPage(this,a);c.execute();e.add(c);e.notify();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))}; EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a}; EditorUi.prototype.createPage=function(a){var b=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));b.setName(null!=a?a:this.createPageName());return b};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e}; -EditorUi.prototype.removePage=function(a){var b=this.editor.graph;if(b.isEnabled()){b.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var d=mxUtils.indexOf(this.pages,a);d==this.pages.length-1?d--:d++;e=this.pages[d]}else e=this.insertPage(),b.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));b.model.execute(new ChangePage(this,a,e))}finally{b.model.endUpdate()}}return a}; -EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,d=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),d=a.node.cloneNode(!1),d.removeAttribute("id"),d=new DiagramPage(d),d.root=e.cloneCells([e.model.root])[0],d.viewState=e.getViewState(),d.viewState.scale=1,d.viewState.scrollLeft=null,d.viewState.scrollRight=null,d.setName(b),d=this.insertPage(d,mxUtils.indexOf(this.pages,a)+1));return d}; +EditorUi.prototype.removePage=function(a){var b=this.editor.graph;if(b.isEnabled()){b.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var c=mxUtils.indexOf(this.pages,a);c==this.pages.length-1?c--:c++;e=this.pages[c]}else e=this.insertPage(),b.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));b.model.execute(new ChangePage(this,a,e))}finally{b.model.endUpdate()}}return a}; +EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,c=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),c=a.node.cloneNode(!1),c.removeAttribute("id"),c=new DiagramPage(c),c.root=e.cloneCells([e.model.root])[0],c.viewState=e.getViewState(),c.viewState.scale=1,c.viewState.scrollLeft=null,c.viewState.scrollRight=null,c.setName(b),c=this.insertPage(c,mxUtils.indexOf(this.pages,a)+1));return c}; EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))}; EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a}; -EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- -e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d, -"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b); -d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4," ❮ ");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var q=this.createControlTab(4, -" ❯");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var r=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=r+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,r-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p, -0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,r-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; +EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- +e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",c.style.fontWeight="bold",c.style.borderTopStyle="none"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=d):mxEvent.consume(b)}));mxEvent.addListener(c, +"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=k&&d!=k&&this.movePage(k,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(l,this.createTabForPage(this.pages[l],c,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b); +c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4," ❮ ");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var q=this.createControlTab(4, +" ❯");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=t+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p, +0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor; b.style.cursor="default";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b}; EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e}; -EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this, -function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"), -null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(d,k,null,a);this.setCurrentMenu(b); +EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=0;c<this.pages.length;c++)mxUtils.bind(this, +function(d){var c=a.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),b);this.pages[d]==this.currentPage&&a.addCheckmark(c,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"), +null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var c=mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(c,k,null,a);this.setCurrentMenu(b); mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a}; -EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var d=a.getName();e.setAttribute("title",d);mxUtils.write(e,d);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e}; -EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),r=mxEvent.getClientY(l);p.popup(q,r,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))}; -EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a, -mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};mxCodecRegistry.register(a)})(); -(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,d){d.setAttribute("page",e.page.getId());return d};a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.page=a.ui.getPageById(e.getAttribute("page"));d.previous=d.name;return d};mxCodecRegistry.register(a)})(); -(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,d){d.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(d.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,d));return d};a.beforeDecode=function(a,e,d){d.ui=a.ui;d.relatedPage=d.ui.getPageById(e.getAttribute("relatedPage"));if(null==d.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",e.getAttribute("relatedPage")); -b.setAttribute("name",e.getAttribute("name"));d.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(d.relatedPage.root=a.decodeCell(b,!1),d=b.nextSibling,b.parentNode.removeChild(b),b=d;null!=b;){d=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var l=b.getAttribute("id");null==a.lookup(l)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=d}}return e};a.afterDecode=function(a,e,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells; -Graph.prototype.foldCells=function(a,d,e,q,r){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],h=0;h<e.length;h++){var k=this.view.getState(e[h]),l=null!=k?k.style:this.getCellStyle(e[h]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[h],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[h]&&f.push(a);return a==e[h]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[h], -a))}for(h=0;h<f.length;h++)this.model.setVisible(f[h],!a);e=c;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),g.view.getState(a),b="tree"==(null!=b?b.style:g.getCellStyle(a)).containerType); -return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=g.view.getState(a),g.view.getState(a),b=null!=(null!=b?b.style:g.getCellStyle(a)).childLayout);return b}function q(a){a=g.view.getState(a);if(null!=a){var b=g.getIncomingEdges(a.cell);if(0<b.length&&(b=g.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())< -a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function r(a,b){b=null!=b?b:!0;g.model.beginUpdate();try{var d=g.model.getParent(a),c=g.getIncomingEdges(a),e=g.cloneCells([c[0],a]);g.model.setTerminal(e[0],g.model.getTerminal(c[0],!0),!0);var f=q(a),h=d.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+ -10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);g.view.currentRoot!=d&&(e[1].geometry.x-=h.x,e[1].geometry.y-=h.y);var k=g.view.getState(a),l=g.view.scale;if(null!=k){var p=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?p.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:p.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var m=g.getOutgoingEdges(g.model.getTerminal(c[0], -!0));if(null!=m){for(var n=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=h=c=0;r<m.length;r++){var t=g.model.getTerminal(m[r],!1);if(f==q(t)){var u=g.view.getState(t);t!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(p,u)&&(c=10+Math.max(c,(Math.min(p.x+p.width,u.x+u.width)-Math.max(p.x,u.x))/l),h=10+Math.max(h,(Math.min(p.y+p.height,u.y+u.height)-Math.max(p.y,u.y))/l))}}n?h=0:c=0;for(r=0;r<m.length;r++)if(t=g.model.getTerminal(m[r], -!1),f==q(t)&&(u=g.view.getState(t),t!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY()))){var z=[];g.traverse(u.cell,!0,function(a,b){null!=b&&z.push(b);z.push(a);return!0});g.moveCells(z,(b?1:-1)*c,(b?1:-1)*h)}}}return g.addCells(e,d)}finally{g.model.endUpdate()}}function c(a){g.model.beginUpdate();try{var b=q(a),c=g.getIncomingEdges(a),d=g.cloneCells([c[0],a]);g.model.setTerminal(c[0],d[1],!1);g.model.setTerminal(d[0],d[1],!0);g.model.setTerminal(d[0],a,!1); -var e=g.model.getParent(a),f=e.geometry,h=[];g.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);g.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);g.moveCells(h,k,l);return g.addCells(d,e)}finally{g.model.endUpdate()}}function f(a){g.model.beginUpdate();try{var b= -g.model.getParent(a),d=g.getIncomingEdges(a),c=g.cloneCells([d[0],a]);g.model.setTerminal(c[0],a,!0);var d=g.getOutgoingEdges(a),e=b.geometry,f=[];g.view.currentRoot==b&&(e=new mxRectangle);for(var h=0;h<d.length;h++){var k=g.model.getTerminal(d[h],!1);null!=k&&f.push(k)}var l=g.view.getBounds(f),p=q(a),m=g.view.translate,n=g.view.scale;p==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(l.x+l.width)/n-m.x-e.x+10,c[1].geometry.y+=a.geometry.height- -e.y+40):p==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(l.x+l.width)/n-m.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height-e.y+40):(c[1].geometry.x=p==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width-e.x+40):c[1].geometry.x+(a.geometry.width-e.x+40),c[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-c[1].geometry.height)/2:(l.y+l.height)/n-m.y+-e.y+10);return g.addCells(c,b)}finally{g.model.endUpdate()}}function h(a, -b,c){a=g.getOutgoingEdges(a);c=g.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=g.view.getState(g.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function m(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| -c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=g.getOutgoingEdges(a),null!=d&&0<d.length&&g.setSelectionCell(g.model.getTerminal(d[0],!1))):(c=g.getIncomingEdges(a),null!=c&&0<c.length&&(d=h(g.model.getTerminal(c[0],!0),d,a),c=g.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&g.setSelectionCell(d[c].cell)))))}var n=this,g=n.editor.graph,x=g.getModel();mxResources.parse("selectChildren=Select Children"); -mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var u=n.menus.createPopupMenu;n.menus.createPopupMenu=function(a,c,d){u.apply(this,arguments);if(1==g.getSelectionCount()){c=g.getSelectionCell();var e=g.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(g.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(g.getSelectionCell())&& -(a.addSeparator(),0<g.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(), -a=g.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=g.getOutgoingEdges(g.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(g.model.getTerminal(a[c],!1));g.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),a=g.getIncomingEdges(a);null!=a&&0<a.length&&g.setSelectionCell(g.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants", -function(){if(g.isEnabled()&&1==g.getSelectionCount()){var a=g.getSelectionCell(),b=[];g.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});g.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=g.removeCells;g.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var h=a[f];x.isEdge(h)&&d(h)&&(e.push(h),h=x.getTerminal(h,!1));b(h)?(g.traverse(h,!0, -function(a,b){null!=b&&e.push(b);e.push(a);return!0}),h=g.getIncomingEdges(a[f]),a=a.concat(h)):e.push(a[f])}a=e;return v.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=g.duplicateCells;g.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=g.view.getState(d[e]);if(null!=f&&b(f.cell))for(var h=g.getIncomingEdges(f.cell),f=0;f<h.length;f++)mxUtils.remove(h[f], -a)}this.model.beginUpdate();try{var k=t.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=g.getIncomingEdges(k[e]),h=g.getIncomingEdges(a[e]);if(0==l.length&&0<h.length){var p=this.cloneCells([h[0]])[0];this.addEdge(p,g.getDefaultParent(),this.model.getTerminal(h[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var A=g.moveCells;g.moveCells=function(a,c,d,e,f,h,k){var l=null;this.model.beginUpdate();try{var p=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f); -if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||g.model.isEdge(a[q])&&null==g.model.getTerminal(a[q],!0)){f=g.model.getParent(a[q]);break}if(null!=p&&f!=p&&null!=this.view.getState(a[0])){var r=g.getIncomingEdges(a[0]);if(0<r.length){var t=g.view.getState(g.model.getTerminal(r[0],!0));if(null!=t){var u=g.view.getState(p);null!=u&&(c=(u.getCenterX()-t.getCenterX())/g.view.scale,d=(u.getCenterY()-t.getCenterY())/g.view.scale)}}}}l=A.apply(this,arguments); -if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(p)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],p,!0);else if(b(a[q])&&(r=g.getIncomingEdges(a[q]),0<r.length))if(!e)b(p)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],p,!0);else if(0==g.getIncomingEdges(l[q]).length){m=p;if(null==m||m==g.model.getParent(a[q]))m=g.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e, -g.getDefaultParent(),m,l[q])}}finally{this.model.endUpdate()}return l};if(null!=n.sidebar){var y=n.sidebar.dropAndConnect;n.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,h=null;f.beginUpdate();try{if(h=y.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(f.isEdge(h[k])&&null==f.getTerminal(h[k],!0)){f.setTerminal(h[k],a,!0);var l=g.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return h}}var w={88:n.actions.get("selectChildren"), -84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},F=n.onKeyDown;n.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&b(g.getSelectionCell())&&1==g.getSelectionCount()){var d=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(g.getSelectionCell()):f(g.getSelectionCell()):13==a.which&&(d=r(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&g.model.isEdge(d[0])?g.setSelectionCell(g.model.getTerminal(d[0], -!1)):g.setSelectionCell(d[d.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=w[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(m(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(m(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(m(g.getSelectionCell(), -mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(m(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(I){console.log("error",I)}mxEvent.isConsumed(a)||F.apply(this,arguments)};var B=g.connectVertex;g.connectVertex=function(a,d,e,h,k,l){var p=g.getIncomingEdges(a);return b(a)&&0<p.length?(e=q(a),h=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(a):h==k?c(a):r(a,d!=mxConstants.DIRECTION_NORTH&& -d!=mxConstants.DIRECTION_WEST)):B.call(this,a,d,e,h,k,l)};g.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&g.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"), +EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var c=a.getName();e.setAttribute("title",c);mxUtils.write(e,c);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e}; +EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu(); +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!c){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),t=mxEvent.getClientY(l);p.popup(q,t,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))}; +EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,c){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a, +mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};mxCodecRegistry.register(a)})(); +(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,c){c.setAttribute("page",e.page.getId());return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.page=a.ui.getPageById(e.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})(); +(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,c){c.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(c.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,c));return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(e.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",e.getAttribute("relatedPage")); +b.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var l=b.getAttribute("id");null==a.lookup(l)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return e};a.afterDecode=function(a,e,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells; +Graph.prototype.foldCells=function(a,c,e,q,t){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[g], +a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=b?b.style:h.getCellStyle(a)).containerType); +return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function q(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())< +a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+ +10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),l=h.view.scale;if(null!=k){var p=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?p.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:p.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var m=h.getOutgoingEdges(h.model.getTerminal(d[0], +!0));if(null!=m){for(var n=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<m.length;r++){var t=h.model.getTerminal(m[r],!1);if(f==q(t)){var y=h.view.getState(t);t!=a&&null!=y&&(n&&b!=y.getCenterX()<k.getCenterX()||!n&&b!=y.getCenterY()<k.getCenterY())&&mxUtils.intersects(p,y)&&(d=10+Math.max(d,(Math.min(p.x+p.width,y.x+y.width)-Math.max(p.x,y.x))/l),g=10+Math.max(g,(Math.min(p.y+p.height,y.y+y.height)-Math.max(p.y,y.y))/l))}}n?g=0:d=0;for(r=0;r<m.length;r++)if(t=h.model.getTerminal(m[r], +!1),f==q(t)&&(y=h.view.getState(t),t!=a&&null!=y&&(n&&b!=y.getCenterX()<k.getCenterX()||!n&&b!=y.getCenterY()<k.getCenterY()))){var u=[];h.traverse(y.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});h.moveCells(u,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function d(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1); +var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);h.moveCells(g,k,l);return h.addCells(d,e)}finally{h.model.endUpdate()}}function f(a){h.model.beginUpdate();try{var b= +h.model.getParent(a),d=h.getIncomingEdges(a),c=h.cloneCells([d[0],a]);h.model.setTerminal(c[0],a,!0);var d=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<d.length;g++){var k=h.model.getTerminal(d[g],!1);null!=k&&f.push(k)}var l=h.view.getBounds(f),p=q(a),m=h.view.translate,n=h.view.scale;p==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(l.x+l.width)/n-m.x-e.x+10,c[1].geometry.y+=a.geometry.height- +e.y+40):p==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(l.x+l.width)/n-m.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height-e.y+40):(c[1].geometry.x=p==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width-e.x+40):c[1].geometry.x+(a.geometry.width-e.x+40),c[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-c[1].geometry.height)/2:(l.y+l.height)/n-m.y+-e.y+10);return h.addCells(c,b)}finally{h.model.endUpdate()}}function g(a, +b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=h.view.getState(h.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| +c==mxConstants.DIRECTION_WEST)==d&&c!=b?m.actions.get("selectParent").funct():c==b?(d=h.getOutgoingEdges(a),null!=d&&0<d.length&&h.setSelectionCell(h.model.getTerminal(d[0],!1))):(c=h.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(h.model.getTerminal(c[0],!0),d,a),c=h.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&h.setSelectionCell(d[c].cell)))))}var m=this,h=m.editor.graph,w=h.getModel();mxResources.parse("selectChildren=Select Children"); +mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var u=m.menus.createPopupMenu;m.menus.createPopupMenu=function(a,c,d){u.apply(this,arguments);if(1==h.getSelectionCount()){c=h.getSelectionCell();var e=h.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(h.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(h.getSelectionCell())&& +(a.addSeparator(),0<h.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};m.actions.addAction("selectChildren",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+X");m.actions.addAction("selectSiblings",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(), +a=h.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=h.getOutgoingEdges(h.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+S");m.actions.addAction("selectParent",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);null!=a&&0<a.length&&h.setSelectionCell(h.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");m.actions.addAction("selectDescendants", +function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=h.removeCells;h.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&c(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(h.traverse(g,!0, +function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return v.apply(this,arguments)};m.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var r=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f], +a)}this.model.beginUpdate();try{var k=r.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==l.length&&0<g.length){var p=this.cloneCells([g[0]])[0];this.addEdge(p,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var A=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var p=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f); +if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||h.model.isEdge(a[q])&&null==h.model.getTerminal(a[q],!0)){f=h.model.getParent(a[q]);break}if(null!=p&&f!=p&&null!=this.view.getState(a[0])){var r=h.getIncomingEdges(a[0]);if(0<r.length){var t=h.view.getState(h.model.getTerminal(r[0],!0));if(null!=t){var u=h.view.getState(p);null!=u&&(c=(u.getCenterX()-t.getCenterX())/h.view.scale,d=(u.getCenterY()-t.getCenterY())/h.view.scale)}}}}l=A.apply(this,arguments); +if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(p)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],p,!0);else if(b(a[q])&&(r=h.getIncomingEdges(a[q]),0<r.length))if(!e)b(p)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],p,!0);else if(0==h.getIncomingEdges(l[q]).length){m=p;if(null==m||m==h.model.getParent(a[q]))m=h.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e, +h.getDefaultParent(),m,l[q])}}finally{this.model.endUpdate()}return l};if(null!=m.sidebar){var x=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var l=h.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:m.actions.get("selectChildren"), +84:m.actions.get("selectSubtree"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},F=m.onKeyDown;m.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var c=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(c=t(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&h.model.isEdge(c[0])?h.setSelectionCell(h.model.getTerminal(c[0], +!1)):h.setSelectionCell(c[c.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(h.view.getState(h.getSelectionCell())),h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(h.getSelectionCell(), +mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(n(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(I){console.log("error",I)}mxEvent.isConsumed(a)||F.apply(this,arguments)};var B=h.connectVertex;h.connectVertex=function(a,c,e,g,k,l){var p=h.getIncomingEdges(a);return b(a)&&0<p.length?(e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?f(a):g==k?d(a):t(a,c!=mxConstants.DIRECTION_NORTH&& +c!=mxConstants.DIRECTION_WEST)):B.call(this,a,c,e,g,k,l)};h.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"), this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells); this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top= -this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container", +this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container", function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;"); -b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;"); -e.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");h.geometry.relative=!0;h.edge=!0;b.insertEdge(h,!0);e.insertEdge(h,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var g=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -x.geometry.relative=!0;x.edge=!0;b.insertEdge(x,!0);g.insertEdge(x,!1);a.insert(c);a.insert(h);a.insert(l);a.insert(x);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(g);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], +b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;"); +e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var h=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");h.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);h.insertEdge(w,!1);a.insert(d);a.insert(g);a.insert(l);a.insert(w);a.insert(b);a.insert(c);a.insert(e);a.insert(k);a.insert(h);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0, -0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var d=new mxCell("Organization", -new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");c.geometry.relative=!0;c.edge=!0; -d.insertEdge(c,!0);e.insertEdge(c,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");h.geometry.relative=!0;h.edge=!0;d.insertEdge(h,!0);f.insertEdge(h,!1);a.insert(c);a.insert(h);a.insert(d);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a], +0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization", +new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=!0;d.edge=!0; +c.insertEdge(d,!0);e.insertEdge(d,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;c.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(d);a.insert(g);a.insert(c);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a], a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;"); a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;"); -a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0, -0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],220,60,"Sub Sections")})])}}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; +a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0, +0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1; GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0; GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled= 0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b), -null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)}; -mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:k.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length); -this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var f=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});this.addListener("xmlNodeChanged", -f);f();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow}; +null!=a)){var c=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)}; +mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var k=this.graph.getGlobalVariable,c=this;this.graph.getGlobalVariable=function(a){var b=e[c.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(c.currentPage+1):"pagenumber"==a?c.currentPage+1:k.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length); +this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var f=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=d&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),d=this.xmlNode)});this.addListener("xmlNodeChanged", +f);f();urlParams.page=c.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow}; this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title", -this.graphConfig.title)});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),d())}));l.observe(k,{attributes:!0})}else d()}}; +this.graphConfig.title)});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),c())}));l.observe(k,{attributes:!0})}else c()}}; GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a}; GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))}; GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})}; -GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<b.width+this.graph.border?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},b={left:b.left- +GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var c=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<b.width+this.graph.border?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},b={left:b.left- c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),k=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||l||(l=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom|| -(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container, -d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,this.toolbarHeight),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(p);l||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph), -100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var q=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var c= -null;null!=this.graphConfig["max-height"]&&(c=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(c)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}}; +(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",c),this.graph.addListener("size",c)):new ResizeSensor(this.graph.container, +c));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,this.toolbarHeight),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=k=null,c=mxUtils.bind(this,function(){window.clearTimeout(p);l||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph), +100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",c):new ResizeSensor(this.graph.container,c))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",c);var q=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d= +null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}}; GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"}; -GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),p=0;p<l;p++)k.setVisible(k.getChildAt(k.root,p),null!=b?d.isVisible(d.getChildAt(d.root,p)):!1);if(null==d)for(p=0;p<e.length;p++)k.setVisible(k.getChildAt(k.root,parseInt(e[p])),!0)}finally{k.endUpdate()}}}; -GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var h=document.createElement("div");h.style.borderRight="1px solid #d0d0d0";h.style.padding="3px 6px 3px 6px";mxEvent.addListener(h,"click",a);null!=c&&h.setAttribute("title",c);h.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(h,"mouseenter",function(){h.style.backgroundColor="#ddd"}),mxEvent.addListener(h,"mouseleave", -function(){h.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),h.style.cursor="pointer"):mxUtils.setOpacity(h,30);h.appendChild(a);e.appendChild(h);f++;return h}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box"; -e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e, -0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove": -"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,r=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft= -q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<r&&Math.abs(this.scrollTop-q.container.scrollTop)<r&&Math.abs(this.startX-b.getGraphX())<r&&Math.abs(this.startY-b.getGraphY())<r&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var c=this.toolbarItems,f=0,h=null,m=null,n=0;n<c.length;n++){var g=c[n];if("pages"==g){m=b.ownerDocument.createElement("div"); -m.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(m,70);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");x.style.borderRightStyle="none";x.style.paddingLeft="0px";x.style.paddingRight="0px";e.appendChild(m);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ -1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";g=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,this.currentPage+1+" / "+this.diagrams.length);m.style.display=1<this.diagrams.length?"inline-block":"none";x.style.display=m.style.display;u.style.display=m.style.display});this.addListener("graphChanged",g);g()}else if("zoom"==g)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, -mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==g){if(this.layersEnabled){var v=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=h)h.parentNode.removeChild(h), -h=null;else{h=this.graph.createLayersDialog();mxEvent.addListener(h,"mouseleave",function(){h.parentNode.removeChild(h);h=null});a=t.getBoundingClientRect();h.style.width="140px";h.style.padding="2px 0px 2px 0px";h.style.border="1px solid #d0d0d0";h.style.backgroundColor="#eee";h.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";h.style.fontSize="11px";h.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(h,80);var b=mxUtils.getDocumentScrollOrigin(document);h.style.left=b.x+a.left+ -"px";h.style.top=b.y+a.bottom+"px";document.body.appendChild(h)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){t.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});t.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==g?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(g=this.graphConfig["toolbar-buttons"][g], -null!=g&&a(null==g.enabled||g.enabled?g.handler:function(){},g.image,g.title,g.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(c=b.ownerDocument.createElement("div"),c.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",c.setAttribute("title",this.graphConfig.title),mxUtils.write(c,this.graphConfig.title),mxUtils.setOpacity(c, -70),e.appendChild(c));this.minToolbarWidth=34*f;var A=b.style.border,c=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px"; -e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=h&&(h.parentNode.removeChild(h), -h=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==h)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",c)}; -GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null==d||!a.isPageLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(k=d.indexOf(","),0<k&&(k=d.substring(k+ +GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),p=0;p<l;p++)k.setVisible(k.getChildAt(k.root,p),null!=b?c.isVisible(c.getChildAt(c.root,p)):!1);if(null==c)for(p=0;p<e.length;p++)k.setVisible(k.getChildAt(k.root,parseInt(e[p])),!0)}finally{k.endUpdate()}}}; +GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=c&&g.setAttribute("title",c);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave", +function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box"; +e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,k=null,l=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);c=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e, +0);c=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove": +"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,t=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft= +q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<t&&Math.abs(this.scrollTop-q.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var d=this.toolbarItems,f=0,g=null,n=null,m=0;m<d.length;m++){var h=d[m];if("pages"==h){n=b.ownerDocument.createElement("div"); +n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");w.style.borderRightStyle="none";w.style.paddingLeft="0px";w.style.paddingRight="0px";e.appendChild(n);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ +1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";h=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";w.style.display=n.style.display;u.style.display=n.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, +mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==h){if(this.layersEnabled){var v=this.graph.getModel(),r=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g), +g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=r.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+ +"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});r.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h], +null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d, +70),e.appendChild(d));this.minToolbarWidth=34*f;var A=b.style.border,d=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px"; +e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g), +g=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==g)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",d)}; +GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,c){if(null==c){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(c=k.getAttribute("href"))}null!=b?null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null==c||!a.isPageLink(c)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(k=c.indexOf(","),0<k&&(k=c.substring(k+ 1),this.selectPageById(k),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))}; GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&& (e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev= "1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()}; GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b); -var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode|| -10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh=function(){};mxEvent.addListener(b,"click",function(){d.destroy()}); -var k=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=d.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown", -k)):(b.style.display="none",e.style.display="none");var r=this;p.getImageFromBundles=function(a){return r.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return r.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= -"hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom= -"60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute", -d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(p,this.graph)}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})}; -GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var k=d[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[e]))}return b}; -GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}}; +var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){c.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode|| +10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var c=new EditorUi(new Editor(!0),document.createElement("div"),!0);c.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";c.refresh=function(){};mxEvent.addListener(b,"click",function(){c.destroy()}); +var k=mxUtils.bind(this,function(a){27==a.keyCode&&c.destroy()}),l=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=c.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown", +k)):(b.style.display="none",e.style.display="none");var t=this;p.getImageFromBundles=function(a){return t.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return t.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow= +"hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,c);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom= +"60px";c.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(c.chromelessToolbar);c.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",c.chromelessToolbar.style.display="block",c.chromelessToolbar.style.position="absolute", +c.chromelessToolbar.style.bottom="",c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(p,this.graph)}),0);return c};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})}; +GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var c=document.getElementsByTagName("*"),b=[],e=0;e<c.length;e++){var k=c[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(c[e]))}return b}; +GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var c=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,c);null!=b&&b(e)};null!=c.url?GraphViewer.getUrl(c.url,function(a){k(a)}):k(c.xml)}}; GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}}; -GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; -(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached= +GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var c=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;c.open("GET",a);c.onload=function(){b(null!=c.getText?c.getText():c.responseText)};c.onerror=e;c.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; +(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,c){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached= new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>'; -b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],h=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};h();var m=!1,p=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(p))};a(p);var q,r,w,F,B=function(){if((w=b.offsetWidth)!=q||(F=b.offsetHeight)!=r)m=!0,q=w,r=F;h()},G=function(a,b,c){a.attachEvent? -a.attachEvent("on"+b,c):a.addEventListener(b,c)};G(d,"scroll",B);G(f,"scroll",B)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},r=Object.prototype.toString.call(e),c="[object Array]"===r||"[object NodeList]"===r||"[object HTMLCollection]"===r||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(c)for(var r=0,f=e.length;r<f;r++)p(e[r],q);else p(e,q);this.detach=function(){if(c)for(var a=0,d=e.length;a<d;a++)b.detach(e[a]);else b.detach(e)}}; +b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,t,z,F,B=function(){if((z=b.offsetWidth)!=q||(F=b.offsetHeight)!=t)n=!0,q=z,t=F;g()},G=function(a,b,c){a.attachEvent? +a.attachEvent("on"+b,c):a.addEventListener(b,c)};G(d,"scroll",B);G(f,"scroll",B)}var q=function(){GraphViewer.resizeSensorEnabled&&c()},t=Object.prototype.toString.call(e),d="[object Array]"===t||"[object NodeList]"===t||"[object HTMLCollection]"===t||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var t=0,f=e.length;t<f;t++)p(e[t],q);else p(e,q);this.detach=function(){if(d)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}}; b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})(); (function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})(); diff --git a/src/main/webapp/js/vsdx.min.js b/src/main/webapp/js/vsdx.min.js deleted file mode 100644 index 68fb08197b55965cd0d002c9d5d4ebcacb66381c..0000000000000000000000000000000000000000 --- a/src/main/webapp/js/vsdx.min.js +++ /dev/null @@ -1,75 +0,0 @@ -function VsdxExport(a){function e(c,d){var h={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>", -"_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>", -"docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>", -"docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>", -"visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>", -"visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>", -"visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"}, -g;for(g in h)if(1<d&&g==p.CONTENT_TYPES_XML){for(var y=mxUtils.parseXml(h[g]),a=y.documentElement,k=a.children,b=null,f=0;f<k.length;f++){var e=k[f];"/visio/pages/page1.xml"==e.getAttribute(p.PART_NAME)&&(b=e)}for(f=2;f<=d;f++)k=b.cloneNode(),k.setAttribute(p.PART_NAME,"/visio/pages/page"+f+".xml"),a.appendChild(k);C(c,g,y,!0)}else c.file(g,h[g])}function k(c,d,h){return null!=c.createElementNS?c.createElementNS(d,h):c.createElement(h)}function l(c){var d=E[c];null==d&&(d=D++,E[c]=d);return d}function b(c){var d= -{};try{var h=c.getGraphBounds().clone(),g=c.view.scale,y=c.view.translate,a=Math.round(h.x/g)-y.x,k=Math.round(h.y/g)-y.y,b=c.pageFormat.width,f=c.pageFormat.height;0>a&&(a+=Math.ceil((y.x-h.x/g)/b)*b);0>k&&(k+=Math.ceil((y.y-h.y/g)/f)*f);var e=Math.max(1,Math.ceil((h.width/g+a)/b)),l=Math.max(1,Math.ceil((h.height/g+k)/f));d.gridEnabled=c.gridEnabled;d.gridSize=c.gridSize;d.guidesEnabled=c.graphHandler.guidesEnabled;d.pageVisible=c.pageVisible;d.pageScale=c.pageScale;d.pageWidth=c.pageFormat.width* -e;d.pageHeight=c.pageFormat.height*l;d.backgroundClr=c.background;d.mathEnabled=c.mathEnabled;d.shadowVisible=c.shadowVisible}catch(I){}return d}function m(c,d,h,g){return f(c,d/p.CONVERSION_FACTOR,h,g)}function f(c,d,h,g){h=k(h,p.XMLNS,"Cell");h.setAttribute("N",c);h.setAttribute("V",d);g&&h.setAttribute("F",g);return h}function t(c,d,h,g,a){var y=k(a,p.XMLNS,"Row");y.setAttribute("T",c);y.setAttribute("IX",d);y.appendChild(m("X",h,a));y.appendChild(m("Y",g,a));return y}function r(c,d,h){var g=c.style[mxConstants.STYLE_FILLCOLOR]; -if(g&&"none"!=g){if(d.appendChild(f("FillForegnd",g,h)),(g=c.style[mxConstants.STYLE_GRADIENTCOLOR])&&"none"!=g){d.appendChild(f("FillBkgnd",g,h));var g=c.style[mxConstants.STYLE_GRADIENT_DIRECTION],a=28;if(g)switch(g){case mxConstants.DIRECTION_EAST:a=25;break;case mxConstants.DIRECTION_WEST:a=27;break;case mxConstants.DIRECTION_NORTH:a=30}d.appendChild(f("FillPattern",a,h))}}else d.appendChild(f("FillPattern",0,h));(g=c.style[mxConstants.STYLE_STROKECOLOR])&&"none"!=g?d.appendChild(f("LineColor", -g,h)):d.appendChild(f("LinePattern",0,h));(g=c.style[mxConstants.STYLE_STROKEWIDTH])&&d.appendChild(m("LineWeight",g,h));(a=c.style[mxConstants.STYLE_OPACITY])?g=a:(g=c.style[mxConstants.STYLE_FILL_OPACITY],a=c.style[mxConstants.STYLE_STROKE_OPACITY]);g&&d.appendChild(f("FillForegndTrans",1-parseInt(g)/100,h));a&&d.appendChild(f("LineColorTrans",1-parseInt(a)/100,h));if(1==c.style[mxConstants.STYLE_DASHED]){g=c.style[mxConstants.STYLE_DASH_PATTERN];a=9;if(g)switch(g){case "1 1":a=10;break;case "1 2":a= -3;break;case "1 4":a=17}d.appendChild(f("LinePattern",a,h))}1==c.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(f("ShdwPattern",1,h)),d.appendChild(f("ShdwForegnd","#000000",h)),d.appendChild(f("ShdwForegndTrans",.6,h)),d.appendChild(f("ShapeShdwType",1,h)),d.appendChild(f("ShapeShdwOffsetX","0.02946278254943948",h)),d.appendChild(f("ShapeShdwOffsetY","-0.02946278254943948",h)),d.appendChild(f("ShapeShdwScaleFactor","1",h)),d.appendChild(f("ShapeShdwBlur","0.05555555555555555",h)),d.appendChild(f("ShapeShdwShow", -2,h)));1==c.style[mxConstants.STYLE_FLIPH]&&d.appendChild(f("FlipX",1,h));1==c.style[mxConstants.STYLE_FLIPV]&&d.appendChild(f("FlipY",1,h));1==c.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(m("Rounding",.1*c.cell.geometry.width,h));(c=c.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(f("TextBkgnd",c,h))}function v(c,a,h,g){var d=k(h,p.XMLNS,"Shape");d.setAttribute("ID",c);d.setAttribute("NameU","Shape"+c);d.setAttribute("LineStyle","0");d.setAttribute("FillStyle","0");d.setAttribute("TextStyle", -"0");c=a.width/2;var b=a.height/2;d.appendChild(m("PinX",a.x+c+q.shiftX,h));d.appendChild(m("PinY",g-a.y-b-q.shiftY,h));d.appendChild(m("Width",a.width,h));d.appendChild(m("Height",a.height,h));d.appendChild(m("LocPinX",c,h));d.appendChild(m("LocPinY",b,h));return d}function n(c,a){var d=p.ARROWS_MAP[(null==c?"none":c)+"|"+(null==a?"1":a)];return null!=d?d:1}function A(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?3:9>=a?4:22>=a?5:6}function G(a,d,h,g){var c=d.view.getState(a);d=k(h,p.XMLNS,"Shape"); -var b=l(a.id);d.setAttribute("ID",b);d.setAttribute("NameU","Dynamic connector."+b);d.setAttribute("Name","Dynamic connector."+b);d.setAttribute("Type","Shape");d.setAttribute("Master","4");var e=q.state,b=c.absolutePoints,z=c.cellBounds,B=z.width/2,w=z.height/2;d.appendChild(m("PinX",z.x+B,h));d.appendChild(m("PinY",g-z.y-w,h));d.appendChild(m("Width",z.width,h));d.appendChild(m("Height",z.height,h));d.appendChild(m("LocPinX",B,h));d.appendChild(m("LocPinY",w,h));q.newEdge(d,c,h);B=function(a,c){var g= -a.x,d=a.y,g=g*e.scale-z.x+e.dx+q.shiftX,d=(c?0:z.height)-d*e.scale+z.y-e.dy-q.shiftY;return{x:g,y:d}};w=B(b[0],!0);d.appendChild(m("BeginX",z.x+w.x,h,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));d.appendChild(m("BeginY",g-z.y+w.y,h,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));w=B(b[b.length-1],!0);d.appendChild(m("EndX",z.x+w.x,h,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));d.appendChild(m("EndY",g-z.y+w.y,h,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));d.appendChild(f("BegTrigger", -"2",h,a.source?"_XFTRIGGER(Sheet."+l(a.source.id)+"!EventXFMod)":null));d.appendChild(f("EndTrigger","2",h,a.target?"_XFTRIGGER(Sheet."+l(a.target.id)+"!EventXFMod)":null));d.appendChild(f("ConFixedCode","6",h));d.appendChild(f("LayerMember","0",h));r(c,d,h);g=c.style[mxConstants.STYLE_STARTSIZE];a=n(c.style[mxConstants.STYLE_STARTARROW],c.style[mxConstants.STYLE_STARTFILL]);d.appendChild(f("BeginArrow",a,h));d.appendChild(f("BeginArrowSize",A(g),h));g=c.style[mxConstants.STYLE_ENDSIZE];a=n(c.style[mxConstants.STYLE_ENDARROW], -c.style[mxConstants.STYLE_ENDFILL]);d.appendChild(f("EndArrow",a,h));d.appendChild(f("EndArrowSize",A(g),h));null!=c.text&&c.text.checkBounds()&&(q.save(),c.text.paint(q),q.restore());c=k(h,p.XMLNS,"Section");c.setAttribute("N","Geometry");c.setAttribute("IX","0");for(a=0;a<b.length;a++)g=B(b[a]),c.appendChild(t(0==a?"MoveTo":"LineTo",a+1,g.x,g.y,h));c.appendChild(f("NoFill","1",h));c.appendChild(f("NoLine","0",h));d.appendChild(c);return d}function u(a,d,h,g,b){var c=a.geometry;if(null!=c){c.relative&& -b&&(c=c.clone(),c.x*=b.width,c.y*=b.height,c.relative=0);b=l(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){g=v(b+"10000",c,h,g);g.setAttribute("Type","Group");b=k(h,p.XMLNS,"Shapes");q.save();q.translate(-c.x,-c.y);var f=c.clone();f.x=0;f.y=0;a.setGeometry(f);a.treatAsSingle=!0;f=u(a,d,h,c.height,c);a.treatAsSingle=!1;a.setGeometry(c);b.appendChild(f);for(var e=0;e<a.children.length;e++)f=u(a.children[e],d,h,c.height,c),b.appendChild(f);g.appendChild(b);q.restore();return g}return a.vertex?(g=v(b, -c,h,g),a=d.view.getState(a),r(a,g,h),q.newShape(g,a,h),null!=a.text&&a.text.checkBounds()&&(q.save(),a.text.paint(q),q.restore()),null!=a.shape&&a.shape.checkBounds()&&(q.save(),a.shape.paint(q),q.restore()),g.appendChild(q.getShapeGeo()),q.endShape(),g.setAttribute("Type",q.getShapeType()),g):G(a,d,h,g)}return null}function x(a,d){var c=mxUtils.createXmlDocument(),g=k(c,p.XMLNS,"PageContents");g.setAttribute("xmlns:r",p.XMLNS_R);g.setAttribute("xml:space",p.XML_SPACE);var b=k(c,p.XMLNS,"Shapes"); -g.appendChild(b);var f=a.model,e=a.view.translate,m=a.view.scale,B=a.getGraphBounds();q.shiftX=0;q.shiftY=0;if(B.x/m<e.x||B.y/m<e.y)q.shiftX=Math.ceil((e.x-B.x/m)/a.pageFormat.width)*a.pageFormat.width,q.shiftY=Math.ceil((e.y-B.y/m)/a.pageFormat.height)*a.pageFormat.height;q.save();q.translate(-e.x,-e.y);q.scale(1/m);q.newPage();var m=a.getDefaultParent(),w;for(w in f.cells)e=f.cells[w],e.parent==m&&(e=u(e,a,c,d.pageHeight),null!=e&&b.appendChild(e));b=k(c,p.XMLNS,"Connects");g.appendChild(b);for(w in f.cells)e= -f.cells[w],e.edge&&(e.source&&(m=k(c,p.XMLNS,"Connect"),m.setAttribute("FromSheet",l(e.id)),m.setAttribute("FromCell","BeginX"),m.setAttribute("ToSheet",l(e.source.id)),b.appendChild(m)),e.target&&(m=k(c,p.XMLNS,"Connect"),m.setAttribute("FromSheet",l(e.id)),m.setAttribute("FromCell","EndX"),m.setAttribute("ToSheet",l(e.target.id)),b.appendChild(m)));c.appendChild(g);q.restore();return c}function C(a,d,b,g){a.file(d,(g?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(b))} -function F(a,b,e){var g=mxUtils.createXmlDocument(),d=mxUtils.createXmlDocument(),c=k(g,p.XMLNS,"Pages");c.setAttribute("xmlns:r",p.XMLNS_R);c.setAttribute("xml:space",p.XML_SPACE);var h=k(d,p.RELS_XMLNS,"Relationships"),l=1,q;for(q in b){var w="page"+l+".xml",n=k(g,p.XMLNS,"Page");n.setAttribute("ID",l-1);n.setAttribute("NameU",q);n.setAttribute("Name",q);var t=k(g,p.XMLNS,"PageSheet"),u=e[q];t.appendChild(m("PageWidth",u.pageWidth,g));t.appendChild(m("PageHeight",u.pageHeight,g));t.appendChild(f("PageScale", -u.pageScale,g));t.appendChild(f("DrawingScale",1,g));u=k(g,p.XMLNS,"Rel");u.setAttribute("r:id","rId"+l);var v=k(g,p.XMLNS,"Section");v.setAttribute("N","Layer");var r=k(g,p.XMLNS,"Row");r.setAttribute("IX","0");v.appendChild(r);r.appendChild(f("Name","Connector",g));r.appendChild(f("Color","255",g));r.appendChild(f("Status","0",g));r.appendChild(f("Visible","1",g));r.appendChild(f("Print","1",g));r.appendChild(f("Active","0",g));r.appendChild(f("Lock","0",g));r.appendChild(f("Snap","1",g));r.appendChild(f("Glue", -"1",g));r.appendChild(f("NameUniv","Connector",g));r.appendChild(f("ColorTrans","0",g));t.appendChild(v);n.appendChild(t);n.appendChild(u);c.appendChild(n);n=k(d,p.RELS_XMLNS,"Relationship");n.setAttribute("Id","rId"+l);n.setAttribute("Type",p.PAGES_TYPE);n.setAttribute("Target",w);h.appendChild(n);C(a,p.VISIO_PAGES+w,b[q]);l++}g.appendChild(c);d.appendChild(h);C(a,p.VISIO_PAGES+"pages.xml",g);C(a,p.VISIO_PAGES+"_rels/pages.xml.rels",d)}function H(a,b){var d=p.VISIO_PAGES_RELS+"page"+b+".xml.rels", -g=mxUtils.createXmlDocument(),c=k(g,p.RELS_XMLNS,"Relationships"),e=k(g,p.RELS_XMLNS,"Relationship");e.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");e.setAttribute("Id","rId1");e.setAttribute("Target","../masters/master1.xml");c.appendChild(e);var f=q.images;if(0<f.length)for(var l=0;l<f.length;l++)e=k(g,p.RELS_XMLNS,"Relationship"),e.setAttribute("Type",p.XMLNS_R+"/image"),e.setAttribute("Id","rId"+(l+2)),e.setAttribute("Target","../media/"+f[l]),c.appendChild(e); -g.appendChild(c);C(a,d,g)}var p=this,q=new mxVsdxCanvas2D,E={},D=1;this.exportCurrentDiagrams=function(){try{if(a.spinner.spin(document.body,mxResources.get("exporting"))){var c=new JSZip;q.init(c);E={};D=1;var d={},f={},g=null!=a.pages?a.pages.length:1;if(null!=a.pages){for(var k=a.editor.graph.getSelectionCells(),l=a.currentPage,m=0;m<a.pages.length;m++){var p=a.pages[m];a.currentPage!=p&&a.selectPage(p,!0);var n=p.getName(),w=a.editor.graph,r=b(w);d[n]=x(w,r);H(c,m+1);f[n]=r}l!=a.currentPage&& -a.selectPage(l,!0);a.editor.graph.setSelectionCells(k)}else w=a.editor.graph,r=b(w),n="Page1",d[n]=x(w,r),H(c,1),f[n]=r;e(c,g);F(c,d,f);d=function(){c.generateAsync({type:"base64"}).then(function(g){a.spinner.stop();var b=a.getBaseFilename();a.saveData(b+".vsdx","vsdx",g,"application/vnd.visio2013",!0)})};0<q.filesLoading?q.onFilesLoaded=d:d()}return!0}catch(I){return console.log(I),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page"; -VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1"; -VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/"; -VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(a){this.filesLoading=0;this.zip=a};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(a){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,a):this.xmlDoc.createElement(a)}; -mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var a=this.createElt("Section");a.setAttribute("N","Geometry");a.setAttribute("IX",this.geoIndex++);this.geoSec=a;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(a,e,k){this.geoIndex=0;this.shape=a;this.cellState=e;this.xmGeo=e.cell.geometry;this.xmlDoc=k;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()}; -mxVsdxCanvas2D.prototype.newEdge=function(a,e,k){this.shape=a;this.cellState=e;this.xmGeo=e.cellBounds;this.xmlDoc=k};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec}; -mxVsdxCanvas2D.prototype.createCellElemScaled=function(a,e,k){return this.createCellElem(a,e/VsdxExport.prototype.CONVERSION_FACTOR,k)};mxVsdxCanvas2D.prototype.createCellElem=function(a,e,k){var l=this.createElt("Cell");l.setAttribute("N",a);l.setAttribute("V",e);k&&l.setAttribute("F",k);return l}; -mxVsdxCanvas2D.prototype.createRowScaled=function(a,e,k,l,b,m,f,t,r,v,n,A,G,u){return this.createRowRel(a,e,k/VsdxExport.prototype.CONVERSION_FACTOR,l/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,f/VsdxExport.prototype.CONVERSION_FACTOR,t/VsdxExport.prototype.CONVERSION_FACTOR,r,v,n,A,G,u)}; -mxVsdxCanvas2D.prototype.createRowRel=function(a,e,k,l,b,m,f,t,r,v,n,A,G,u){var x=this.createElt("Row");x.setAttribute("T",a);x.setAttribute("IX",e);x.appendChild(this.createCellElem("X",k,r));x.appendChild(this.createCellElem("Y",l,v));null!=b&&x.appendChild(this.createCellElem("A",b,n));null!=m&&x.appendChild(this.createCellElem("B",m,A));null!=f&&x.appendChild(this.createCellElem("C",f,G));null!=t&&x.appendChild(this.createCellElem("D",t,u));return x}; -mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()}; -mxVsdxCanvas2D.prototype.rect=function(a,e,k,l){1<this.geoStepIndex&&this.createGeoSec();var b=this.state;k*=b.scale;l*=b.scale;var m=this.xmGeo;a=(a-m.x+b.dx)*b.scale/k;e=(m.height-e+m.y-b.dy)*b.scale/l;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,a,e));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,a+1,e));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,a+1,e-1));this.geoSec.appendChild(this.createRowRel("RelLineTo", -this.geoStepIndex++,a,e-1));this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,a,e))};mxVsdxCanvas2D.prototype.roundrect=function(a,e,k,l,b,m){this.rect(a,e,k,l);this.shape.appendChild(this.createCellElemScaled("Rounding",b))}; -mxVsdxCanvas2D.prototype.ellipse=function(a,e,k,l){1<this.geoStepIndex&&this.createGeoSec();var b=this.state;k*=b.scale;l*=b.scale;var m=this.xmGeo,f=m.height*b.scale,t=m.width*b.scale;a=(a-m.x+b.dx)*b.scale;e=f+(-e+m.y-b.dy)*b.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,a+k/2,e-l/2,a,e-l/2,a+k/2,e,"Width*"+(a+k/2)/t,"Height*"+(e-l/2)/f,"Width*"+a/t,"Height*"+(e-l/2)/f,"Width*"+(a+k/2)/t,"Height*"+e/f))}; -mxVsdxCanvas2D.prototype.moveTo=function(a,e){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=a;this.lastMoveToY=e;this.lastX=a;this.lastY=e;var k=this.xmGeo,l=this.state;a=(a-k.x+l.dx)*l.scale;e=(k.height-e+k.y-l.dy)*l.scale;var b=k.height*l.scale,k=k.width*l.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,a/k,e/b))}; -mxVsdxCanvas2D.prototype.lineTo=function(a,e){this.lastX=a;this.lastY=e;var k=this.xmGeo,l=this.state;a=(a-k.x+l.dx)*l.scale;e=(k.height-e+k.y-l.dy)*l.scale;var b=k.height*l.scale,k=k.width*l.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,a/k,e/b))}; -mxVsdxCanvas2D.prototype.quadTo=function(a,e,k,l){this.lastX=k;this.lastY=l;var b=this.state,m=this.xmGeo,f=m.height*b.scale,t=m.width*b.scale;a=(a-m.x+b.dx)*b.scale;e=(m.height-e+m.y-b.dy)*b.scale;k=(k-m.x+b.dx)*b.scale;l=(m.height-l+m.y-b.dy)*b.scale;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,k/t,l/f,a/t,e/f))}; -mxVsdxCanvas2D.prototype.curveTo=function(a,e,k,l,b,m){this.lastX=b;this.lastY=m;var f=this.state,t=this.xmGeo,r=t.height*f.scale,v=t.width*f.scale;a=(a-t.x+f.dx)*f.scale;e=(t.height-e+t.y-f.dy)*f.scale;k=(k-t.x+f.dx)*f.scale;l=(t.height-l+t.y-f.dy)*f.scale;b=(b-t.x+f.dx)*f.scale;m=(t.height-m+t.y-f.dy)*f.scale;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,b/v,m/r,a/v,e/r,k/v,l/r))}; -mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(a,e){var k=this.createElt("ForeignData");k.setAttribute("ForeignType","Bitmap");a=a.toUpperCase();"BMP"!=a&&k.setAttribute("CompressionType",a);var l=this.createElt("Rel");l.setAttribute("r:id","rId"+e);k.appendChild(l);this.shape.appendChild(k);this.shapeType="Foreign"}; -mxVsdxCanvas2D.prototype.convertSvg2Png=function(a,e,k){var l=this;this.filesLoading++;try{var b=document.createElement("canvas"),m=b.getContext("2d");e||(a=String.fromCharCode.apply(null,new Uint8Array(a)),a=window.btoa?btoa(a):Base64.encode(a,!0));e="data:image/svg+xml;base64,"+a;img=new Image;img.onload=function(){b.width=this.width;b.height=this.height;m.drawImage(this,0,0);try{k(b.toDataURL("image/png"))}catch(f){}l.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed"); -try{k(a)}catch(f){}l.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()};img.src=e}catch(f){console.log("SVG2PNG conversion failed"+f.message);try{k(a)}catch(t){}this.filesLoading--;if(0==l.filesLoading)l.onFilesLoaded()}}; -mxVsdxCanvas2D.prototype.image=function(a,e,k,l,b,m,f,t){var r=this,v="image"+(this.images.length+1)+".",n;if(0==b.indexOf("data:"))n=b.indexOf("base64,"),m=b.substring(n+7),n=b.substring(11,n-1),0==n.indexOf("svg")?(n="png",v+=n,this.convertSvg2Png(m,!0,function(a){r.zip.file("visio/media/"+v,a.substring(22),{base64:!0})})):(v+=n,this.zip.file("visio/media/"+v,m,{base64:!0}));else if(window.XMLHttpRequest){b=this.converter.convert(b);this.filesLoading++;n=b.lastIndexOf(".");n=b.substring(n+1);var A= -!1;0==n.indexOf("svg")&&(n="png",A=!0);v+=n;m=new XMLHttpRequest;m.open("GET",b,!0);m.responseType="arraybuffer";m.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(A?r.convertSvg2Png(this.response,!1,function(a){r.zip.file("visio/media/"+v,a.substring(22),{base64:!0})}):r.zip.file("visio/media/"+v,this.response)),r.filesLoading--,0==r.filesLoading))r.onFilesLoaded()};m.send()}this.images.push(v);this.shapeImg={type:n,id:this.images.length+1};b=this.state;k*=b.scale;l*=b.scale; -n=this.xmGeo;a=(a-n.x+b.dx)*b.scale;e=(n.height-e+n.y-b.dy)*b.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",a));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",e-l));this.shape.appendChild(this.createCellElemScaled("ImgWidth",k));this.shape.appendChild(this.createCellElemScaled("ImgHeight",l))}; -mxVsdxCanvas2D.prototype.text=function(a,e,k,l,b,m,f,t,r,v,n,A,G){var u=this;if(this.textEnabled&&null!=b){mxUtils.isNode(b)&&(b=mxUtils.getOuterHtml(b));"html"==r&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(b=b.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=b,b=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));v=this.state;n=this.xmGeo;k*=v.scale;l*=v.scale;var x=this.createElt("Section"); -x.setAttribute("N","Character");var C=this.createElt("Section");C.setAttribute("N","Paragraph");var F=this.createElt("Text"),H=0,p=0,q=0,E=0,D=0,c=0,d=function(a,b,d,e,f){d=a.fontSize;var g=a.fontFamily,h=mxUtils.getSizeForString(f,d,g);t&&h.width>k&&(h=mxUtils.getSizeForString(f,d,g,k));a.blockElem?(E+=h.width,p=Math.min(Math.max(p,E),k),E=0,D=Math.max(D,h.height),q+=D+c,c=D,D=0):(E+=h.width,p=Math.min(Math.max(p,E),k),D=Math.max(D,h.height),q=Math.max(q,D));h=u.createElt("Row");h.setAttribute("IX", -H);a.fontColor&&h.appendChild(u.createCellElem("Color",a.fontColor));d&&h.appendChild(u.createCellElemScaled("Size",.97*d));g&&h.appendChild(u.createCellElem("Font",g));d=0;a.bold&&(d|=17);a.italic&&(d|=34);a.underline&&(d|=4);h.appendChild(u.createCellElem("Style",d));h.appendChild(u.createCellElem("Case","0"));h.appendChild(u.createCellElem("Pos","0"));h.appendChild(u.createCellElem("FontScale","1"));h.appendChild(u.createCellElem("Letterspace","0"));b.appendChild(h);b=u.createElt("cp");b.setAttribute("IX", -H++);e.appendChild(b);a=u.xmlDoc.createTextNode(f+(a.blockElem?"\n":""));e.appendChild(a)},h=function(a,b){b=b||{};for(var c=0;c<a.length;c++)if(3==a[c].nodeType){var e={fontColor:b.fontColor||u.cellState.style.fontColor,fontSize:b.fontSize||u.cellState.style.fontSize,fontFamily:b.fontFamily||u.cellState.style.fontFamily,align:b.align||u.cellState.style.align,bold:b.bold,italic:b.italic,underline:b.underline};d(e,x,C,F,a[c].textContent)}else if(1==a[c].nodeType){var e=a[c].nodeName.toUpperCase(), -g=a[c].childNodes.length,f=window.getComputedStyle(a[c],null),k="bold"==f.getPropertyValue("font-weight")||b.bold,l="italic"==f.getPropertyValue("font-style")||b.italic,m=0<=f.getPropertyValue("text-decoration").indexOf("underline")||b.underline,p=f.getPropertyValue("text-align"),n;n=f.getPropertyValue("color");n=(n=n.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===n.length?"#"+("0"+parseInt(n[1],10).toString(16)).slice(-2)+("0"+parseInt(n[2],10).toString(16)).slice(-2)+ -("0"+parseInt(n[3],10).toString(16)).slice(-2):"";e={bold:k,italic:l,underline:m,align:p,fontColor:n,fontSize:parseFloat(f.getPropertyValue("font-size")),fontFamily:f.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==f.getPropertyValue("display")||"BR"==e||"LI"==e};0<g?(d(e,x,C,F,""),h(a[c].childNodes,e)):d(e,x,C,F,a[c].textContent)}};"html"==r&&mxClient.IS_SVG?(b=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1].childNodes,h(b,{})):d({fontColor:u.cellState.style.fontColor, -fontSize:u.cellState.style.fontSize,fontFamily:u.cellState.style.fontFamily},x,C,F,b);r=b=0;switch(m){case "right":b=p/2;break;case "center":b=0;break;case "left":b=-p/2}switch(f){case "top":r=q/2;break;case "middle":r=0;break;case "bottom":r=-q/2}l=Math.max(l,q);k=Math.max(k,p);a=(a-n.x+v.dx)*v.scale;e=(n.height-e+n.y-v.dy)*v.scale;m=k/2;f=l/2;this.shape.appendChild(this.createCellElemScaled("TxtPinX",a));this.shape.appendChild(this.createCellElemScaled("TxtPinY",e));this.shape.appendChild(this.createCellElemScaled("TxtWidth", -k));this.shape.appendChild(this.createCellElemScaled("TxtHeight",l));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",m+b));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",f+r));0!=A&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-A)*Math.PI/180));this.shape.appendChild(x);this.shape.appendChild(F)}}; -mxVsdxCanvas2D.prototype.rotate=function(a,e,k,l,b){0!=a&&(e=this.state,l+=e.dx,b+=e.dy,l*=e.scale,b*=e.scale,this.shape.appendChild(this.createCellElem("Angle",(360-a)*Math.PI/180)),e.rotation+=a,e.rotationCx=l,e.rotationCy=b)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))}; -mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};/*! - -JSZip v3.1.3 - A Javascript class for generating and reading zip files -<http://stuartk.com/jszip> - -(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com> -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/master/LICENSE -*/ -!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d=a("./utils"),e=a("./support"),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a){for(var b,c,e,g,h,i,j,k=[],l=0,m=a.length,n=m,o="string"!==d.getTypeOf(a);l<a.length;)n=m-l,o?(b=a[l++],c=l<m?a[l++]:0,e=l<m?a[l++]:0):(b=a.charCodeAt(l++),c=l<m?a.charCodeAt(l++):0,e=l<m?a.charCodeAt(l++):0),g=b>>2,h=(3&b)<<4|c>>4,i=n>1?(15&c)<<2|e>>6:64,j=n>2?63&e:64,k.push(f.charAt(g)+f.charAt(h)+f.charAt(i)+f.charAt(j));return k.join("")},c.decode=function(a){var b,c,d,g,h,i,j,k=0,l=0,m="data:";if(a.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");var n=3*a.length/4;if(a.charAt(a.length-1)===f.charAt(64)&&n--,a.charAt(a.length-2)===f.charAt(64)&&n--,n%1!==0)throw new Error("Invalid base64 input, bad content length.");var o;for(o=e.uint8array?new Uint8Array(0|n):new Array(0|n);k<a.length;)g=f.indexOf(a.charAt(k++)),h=f.indexOf(a.charAt(k++)),i=f.indexOf(a.charAt(k++)),j=f.indexOf(a.charAt(k++)),b=g<<2|h>>4,c=(15&h)<<4|i>>2,d=(3&i)<<6|j,o[l++]=b,64!==i&&(o[l++]=c),64!==j&&(o[l++]=d);return o}},{"./support":30,"./utils":32}],2:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.compressedSize=a,this.uncompressedSize=b,this.crc32=c,this.compression=d,this.compressedContent=e}var e=a("./external"),f=a("./stream/DataWorker"),g=a("./stream/DataLengthProbe"),h=a("./stream/Crc32Probe"),g=a("./stream/DataLengthProbe");d.prototype={getContentWorker:function(){var a=new f(e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new g("data_length")),b=this;return a.on("end",function(){if(this.streamInfo.data_length!==b.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),a},getCompressedWorker:function(){return new f(e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(a,b,c){return a.pipe(new h).pipe(new g("uncompressedSize")).pipe(b.compressWorker(c)).pipe(new g("compressedSize")).withStreamInfo("compression",b)},b.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,b,c){"use strict";var d=a("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(a){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},c.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=h,f=d+c;a^=-1;for(var g=d;g<f;g++)a=a>>>8^e[255&(a^b[g])];return a^-1}function f(a,b,c,d){var e=h,f=d+c;a^=-1;for(var g=d;g<f;g++)a=a>>>8^e[255&(a^b.charCodeAt(g))];return a^-1}var g=a("./utils"),h=d();b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var c="string"!==g.getTypeOf(a);return c?e(0|b,a,a.length,0):f(0|b,a,a.length,0)}},{"./utils":32}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(a,b,c){"use strict";var d=null;d="undefined"!=typeof Promise?Promise:a("lie"),b.exports={Promise:d}},{lie:58}],7:[function(a,b,c){"use strict";function d(a,b){h.call(this,"FlateWorker/"+a),this._pako=new f[a]({raw:!0,level:b.level||-1}),this.meta={};var c=this;this._pako.onData=function(a){c.push({data:a,meta:c.meta})}}var e="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,f=a("pako"),g=a("./utils"),h=a("./stream/GenericWorker"),i=e?"uint8array":"array";c.magic="\b\0",g.inherits(d,h),d.prototype.processChunk=function(a){this.meta=a.meta,this._pako.push(g.transformTo(i,a.data),!1)},d.prototype.flush=function(){h.prototype.flush.call(this),this._pako.push([],!0)},d.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},c.compressWorker=function(a){return new d("Deflate",a)},c.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:59}],8:[function(a,b,c){"use strict";function d(a,b,c,d){f.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=c,this.encodeFileName=d,this.streamFiles=a,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var e=a("../utils"),f=a("../stream/GenericWorker"),g=a("../utf8"),h=a("../crc32"),i=a("../signature"),j=function(a,b){var c,d="";for(c=0;c<b;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},k=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},l=function(a,b){return 63&(a||0)},m=function(a,b,c,d,f,m){var n,o,p=a.file,q=a.compression,r=m!==g.utf8encode,s=e.transformTo("string",m(p.name)),t=e.transformTo("string",g.utf8encode(p.name)),u=p.comment,v=e.transformTo("string",m(u)),w=e.transformTo("string",g.utf8encode(u)),x=t.length!==p.name.length,y=w.length!==u.length,z="",A="",B="",C=p.dir,D=p.date,E={crc32:0,compressedSize:0,uncompressedSize:0};b&&!c||(E.crc32=a.crc32,E.compressedSize=a.compressedSize,E.uncompressedSize=a.uncompressedSize);var F=0;b&&(F|=8),r||!x&&!y||(F|=2048);var G=0,H=0;C&&(G|=16),"UNIX"===f?(H=798,G|=k(p.unixPermissions,C)):(H=20,G|=l(p.dosPermissions,C)),n=D.getUTCHours(),n<<=6,n|=D.getUTCMinutes(),n<<=5,n|=D.getUTCSeconds()/2,o=D.getUTCFullYear()-1980,o<<=4,o|=D.getUTCMonth()+1,o<<=5,o|=D.getUTCDate(),x&&(A=j(1,1)+j(h(s),4)+t,z+="up"+j(A.length,2)+A),y&&(B=j(1,1)+j(h(v),4)+w,z+="uc"+j(B.length,2)+B);var I="";I+="\n\0",I+=j(F,2),I+=q.magic,I+=j(n,2),I+=j(o,2),I+=j(E.crc32,4),I+=j(E.compressedSize,4),I+=j(E.uncompressedSize,4),I+=j(s.length,2),I+=j(z.length,2);var J=i.LOCAL_FILE_HEADER+I+s+z,K=i.CENTRAL_FILE_HEADER+j(H,2)+I+j(v.length,2)+"\0\0\0\0"+j(G,4)+j(d,4)+s+z+v;return{fileRecord:J,dirRecord:K}},n=function(a,b,c,d,f){var g="",h=e.transformTo("string",f(d));return g=i.CENTRAL_DIRECTORY_END+"\0\0\0\0"+j(a,2)+j(a,2)+j(b,4)+j(c,4)+j(h.length,2)+h},o=function(a){var b="";return b=i.DATA_DESCRIPTOR+j(a.crc32,4)+j(a.compressedSize,4)+j(a.uncompressedSize,4)};e.inherits(d,f),d.prototype.push=function(a){var b=a.meta.percent||0,c=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(a):(this.bytesWritten+=a.data.length,f.prototype.push.call(this,{data:a.data,meta:{currentFile:this.currentFile,percent:c?(b+100*(c-d-1))/c:100}}))},d.prototype.openedSource=function(a){this.currentSourceOffset=this.bytesWritten,this.currentFile=a.file.name;var b=this.streamFiles&&!a.file.dir;if(b){var c=m(a,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:c.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(a){this.accumulate=!1;var b=this.streamFiles&&!a.file.dir,c=m(a,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(c.dirRecord),b)this.push({data:o(a),meta:{percent:100}});else for(this.push({data:c.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var a=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var c=this.bytesWritten-a,d=n(this.dirRecords.length,c,a,this.zipComment,this.encodeFileName);this.push({data:d,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(a){this._sources.push(a);var b=this;return a.on("data",function(a){b.processChunk(a)}),a.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),a.on("error",function(a){b.error(a)}),this},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(a){var b=this._sources;if(!f.prototype.error.call(this,a))return!1;for(var c=0;c<b.length;c++)try{b[c].error(a)}catch(a){}return!0},d.prototype.lock=function(){f.prototype.lock.call(this);for(var a=this._sources,b=0;b<a.length;b++)a[b].lock()},b.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(a,b,c){"use strict";var d=a("../compressions"),e=a("./ZipFileWorker"),f=function(a,b){var c=a||b,e=d[c];if(!e)throw new Error(c+" is not a valid compression method !");return e};c.generateWorker=function(a,b,c){var d=new e(b.streamFiles,c,b.platform,b.encodeFileName),g=0;try{a.forEach(function(a,c){g++;var e=f(c.options.compression,b.compression),h=c.options.compressionOptions||b.compressionOptions||{},i=c.dir,j=c.date;c._compressWorker(e,h).withStreamInfo("file",{name:a,dir:i,date:j,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(d)}),d.entriesCount=g}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(a,b,c){"use strict";function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}d.prototype=a("./object"),d.prototype.loadAsync=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.version="3.1.3",d.loadAsync=function(a,b){return(new d).loadAsync(a,b)},d.external=a("./external"),b.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(a,b,c){"use strict";function d(a){return new f.Promise(function(b,c){var d=a.decompressed.getContentWorker().pipe(new i);d.on("error",function(a){c(a)}).on("end",function(){d.streamInfo.crc32!==a.decompressed.crc32?c(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}var e=a("./utils"),f=a("./external"),g=a("./utf8"),e=a("./utils"),h=a("./zipEntries"),i=a("./stream/Crc32Probe"),j=a("./nodejsUtils");b.exports=function(a,b){var c=this;return b=e.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),j.isNode&&j.isStream(a)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):e.prepareContent("the loaded zip file",a,!0,b.optimizedBinaryString,b.base64).then(function(a){var c=new h(b);return c.load(a),c}).then(function(a){var c=[f.Promise.resolve(a)],e=a.files;if(b.checkCRC32)for(var g=0;g<e.length;g++)c.push(d(e[g]));return f.Promise.all(c)}).then(function(a){for(var d=a.shift(),e=d.files,f=0;f<e.length;f++){var g=e[f];c.file(g.fileNameStr,g.decompressed,{binary:!0,optimizedBinaryString:!0,date:g.date,dir:g.dir,comment:g.fileCommentStr.length?g.fileCommentStr:null,unixPermissions:g.unixPermissions,dosPermissions:g.dosPermissions,createFolders:b.createFolders})}return d.zipComment.length&&(c.comment=d.zipComment),c})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(a,b,c){"use strict";function d(a,b){f.call(this,"Nodejs stream input adapter for "+a),this._upstreamEnded=!1,this._bindStream(b)}var e=a("../utils"),f=a("../stream/GenericWorker");e.inherits(d,f),d.prototype._bindStream=function(a){var b=this;this._stream=a,a.pause(),a.on("data",function(a){b.push({data:a,meta:{percent:0}})}).on("error",function(a){b.isPaused?this.generatedError=a:b.error(a)}).on("end",function(){b.isPaused?b._upstreamEnded=!0:b.end()})},d.prototype.pause=function(){return!!f.prototype.pause.call(this)&&(this._stream.pause(),!0)},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},b.exports=d},{"../stream/GenericWorker":28,"../utils":32}],13:[function(a,b,c){"use strict";function d(a,b,c){e.call(this,b),this._helper=a;var d=this;a.on("data",function(a,b){d.push(a)||d._helper.pause(),c&&c(b)}).on("error",function(a){d.emit("error",a)}).on("end",function(){d.push(null)})}var e=a("readable-stream").Readable,f=a("util");f.inherits(d,e),d.prototype._read=function(){this._helper.resume()},b.exports=d},{"readable-stream":16,util:void 0}],14:[function(a,b,c){"use strict";b.exports={isNode:"undefined"!=typeof Buffer,newBuffer:function(a,b){return new Buffer(a,b)},isBuffer:function(a){return Buffer.isBuffer(a)},isStream:function(a){return a&&"function"==typeof a.on&&"function"==typeof a.pause&&"function"==typeof a.resume}}},{}],15:[function(a,b,c){"use strict";function d(a){return"[object RegExp]"===Object.prototype.toString.call(a)}var e=a("./utf8"),f=a("./utils"),g=a("./stream/GenericWorker"),h=a("./stream/StreamHelper"),i=a("./defaults"),j=a("./compressedObject"),k=a("./zipObject"),l=a("./generate"),m=a("./nodejsUtils"),n=a("./nodejs/NodejsStreamInputAdapter"),o=function(a,b,c){var d,e=f.getTypeOf(b),h=f.extend(c||{},i);h.date=h.date||new Date,null!==h.compression&&(h.compression=h.compression.toUpperCase()),"string"==typeof h.unixPermissions&&(h.unixPermissions=parseInt(h.unixPermissions,8)),h.unixPermissions&&16384&h.unixPermissions&&(h.dir=!0),h.dosPermissions&&16&h.dosPermissions&&(h.dir=!0),h.dir&&(a=q(a)),h.createFolders&&(d=p(a))&&r.call(this,d,!0);var l="string"===e&&h.binary===!1&&h.base64===!1;c&&"undefined"!=typeof c.binary||(h.binary=!l);var o=b instanceof j&&0===b.uncompressedSize;(o||h.dir||!b||0===b.length)&&(h.base64=!1,h.binary=!0,b="",h.compression="STORE",e="string");var s=null;s=b instanceof j||b instanceof g?b:m.isNode&&m.isStream(b)?new n(a,b):f.prepareContent(a,b,h.binary,h.optimizedBinaryString,h.base64);var t=new k(a,s,h);this.files[a]=t},p=function(a){"/"===a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},q=function(a){return"/"!==a.slice(-1)&&(a+="/"),a},r=function(a,b){return b="undefined"!=typeof b?b:i.createFolders,a=q(a),this.files[a]||o.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},s={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(a){var b,c,d;for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],c=b.slice(this.root.length,b.length),c&&b.slice(0,this.root.length)===this.root&&a(c,d))},filter:function(a){var b=[];return this.forEach(function(c,d){a(c,d)&&b.push(d)}),b},file:function(a,b,c){if(1===arguments.length){if(d(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}var f=this.files[this.root+a];return f&&!f.dir?f:null}return a=this.root+a,o.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=r.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!==a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(a){var b,c={};try{if(c=f.extend(a||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:e.utf8encode}),c.type=c.type.toLowerCase(),c.compression=c.compression.toUpperCase(),"binarystring"===c.type&&(c.type="string"),!c.type)throw new Error("No output type specified.");f.checkSupport(c.type),"darwin"!==c.platform&&"freebsd"!==c.platform&&"linux"!==c.platform&&"sunos"!==c.platform||(c.platform="UNIX"),"win32"===c.platform&&(c.platform="DOS");var d=c.comment||this.comment||"";b=l.generateWorker(this,c,d)}catch(i){b=new g("error"),b.error(i)}return new h(b,c.type||"string",c.mimeType)},generateAsync:function(a,b){return this.generateInternalStream(a).accumulate(b)},generateNodeStream:function(a,b){return a=a||{},a.type||(a.type="nodebuffer"),this.generateInternalStream(a).toNodejsStream(b)}};b.exports=s},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(a,b,c){b.exports=a("stream")},{stream:void 0}],17:[function(a,b,c){"use strict";function d(a){e.call(this,a);for(var b=0;b<this.data.length;b++)a[b]=255&a[b]}var e=a("./DataReader"),f=a("../utils");f.inherits(d,e),d.prototype.byteAt=function(a){return this.data[this.zero+a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f-this.zero;return-1},d.prototype.readAndCheckSignature=function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.readData(4);return b===f[0]&&c===f[1]&&d===f[2]&&e===f[3]},d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return[];var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./DataReader":18}],18:[function(a,b,c){"use strict";function d(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}var e=a("../utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readAndCheckSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},b.exports=d},{"../utils":32}],19:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./Uint8ArrayReader"),f=a("../utils");f.inherits(d,e),d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./DataReader"),f=a("../utils");f.inherits(d,e),d.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},d.prototype.readAndCheckSignature=function(a){var b=this.readData(4);return a===b},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./DataReader":18}],21:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./ArrayReader"),f=a("../utils");f.inherits(d,e),d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./ArrayReader":17}],22:[function(a,b,c){"use strict";var d=a("../utils"),e=a("../support"),f=a("./ArrayReader"),g=a("./StringReader"),h=a("./NodeBufferReader"),i=a("./Uint8ArrayReader");b.exports=function(a){var b=d.getTypeOf(a);return d.checkSupport(b),"string"!==b||e.uint8array?"nodebuffer"===b?new h(a):e.uint8array?new i(d.transformTo("uint8array",a)):new f(d.transformTo("array",a)):new g(a)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],24:[function(a,b,c){"use strict";function d(a){e.call(this,"ConvertWorker to "+a),this.destType=a}var e=a("./GenericWorker"),f=a("../utils");f.inherits(d,e),d.prototype.processChunk=function(a){this.push({data:f.transformTo(this.destType,a.data),meta:a.meta})},b.exports=d},{"../utils":32,"./GenericWorker":28}],25:[function(a,b,c){"use strict";function d(){e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var e=a("./GenericWorker"),f=a("../crc32"),g=a("../utils");g.inherits(d,e),d.prototype.processChunk=function(a){this.streamInfo.crc32=f(a.data,this.streamInfo.crc32||0),this.push(a)},b.exports=d},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(a,b,c){"use strict";function d(a){f.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}var e=a("../utils"),f=a("./GenericWorker");e.inherits(d,f),d.prototype.processChunk=function(a){if(a){var b=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=b+a.data.length}f.prototype.processChunk.call(this,a)},b.exports=d},{"../utils":32,"./GenericWorker":28}],27:[function(a,b,c){"use strict";function d(a){f.call(this,"DataWorker");var b=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(a){b.dataIsReady=!0,b.data=a,b.max=a&&a.length||0,b.type=e.getTypeOf(a),b.isPaused||b._tickAndRepeat()},function(a){b.error(a)})}var e=a("../utils"),f=a("./GenericWorker"),g=16384;e.inherits(d,f),d.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,e.delay(this._tickAndRepeat,[],this)),!0)},d.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(e.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},d.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=g,b=null,c=Math.min(this.max,this.index+a);if(this.index>=this.max)return this.end();switch(this.type){case"string":b=this.data.substring(this.index,c);break;case"uint8array":b=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":b=this.data.slice(this.index,c)}return this.index=c,this.push({data:b,meta:{percent:this.max?this.index/this.max*100:0}})},b.exports=d},{"../utils":32,"./GenericWorker":28}],28:[function(a,b,c){"use strict";function d(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,b){return this._listeners[a].push(b),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,b){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,b)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var b=this;return a.on("data",function(a){b.processChunk(a)}),a.on("end",function(){b.end()}),a.on("error",function(a){b.error(a)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var a=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,b){return this.extraStreamInfo[a]=b,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},b.exports=d},{}],29:[function(a,b,c){"use strict";function d(a,b,c,d){var f=null;switch(a){case"blob":return h.newBlob(c,d);case"base64":return f=e(b,c),k.encode(f);default:return f=e(b,c),h.transformTo(a,f)}}function e(a,b){var c,d=0,e=null,f=0;for(c=0;c<b.length;c++)f+=b[c].length;switch(a){case"string":return b.join("");case"array":return Array.prototype.concat.apply([],b);case"uint8array":for(e=new Uint8Array(f),c=0;c<b.length;c++)e.set(b[c],d),d+=b[c].length;return e;case"nodebuffer":return Buffer.concat(b);default:throw new Error("concat : unsupported type '"+a+"'")}}function f(a,b){return new m.Promise(function(c,e){var f=[],g=a._internalType,h=a._outputType,i=a._mimeType;a.on("data",function(a,c){f.push(a),b&&b(c)}).on("error",function(a){f=[],e(a)}).on("end",function(){try{var a=d(h,g,f,i);c(a)}catch(b){e(b)}f=[]}).resume()})}function g(a,b,c){var d=b;switch(b){case"blob":d="arraybuffer";break;case"arraybuffer":d="uint8array";break;case"base64":d="string"}try{this._internalType=d,this._outputType=b,this._mimeType=c,h.checkSupport(d),this._worker=a.pipe(new i(d)),a.lock()}catch(e){this._worker=new j("error"),this._worker.error(e)}}var h=a("../utils"),i=a("./ConvertWorker"),j=a("./GenericWorker"),k=a("../base64"),l=a("../support"),m=a("../external"),n=null;if(l.nodestream)try{n=a("../nodejs/NodejsStreamOutputAdapter")}catch(o){}g.prototype={accumulate:function(a){return f(this,a)},on:function(a,b){var c=this;return"data"===a?this._worker.on(a,function(a){b.call(c,a.data,a.meta)}):this._worker.on(a,function(){h.delay(b,arguments,c)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(a){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new n(this,{objectMode:"nodebuffer"!==this._outputType},a)}},b.exports=g},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(a,b,c){"use strict";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer="undefined"!=typeof Buffer,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var d=new ArrayBuffer(0);try{c.blob=0===new Blob([d],{type:"application/zip"}).size}catch(e){try{var f=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,g=new f;g.append(d),c.blob=0===g.getBlob("application/zip").size}catch(e){c.blob=!1}}}try{c.nodestream=!!a("readable-stream").Readable}catch(e){c.nodestream=!1}},{"readable-stream":16}],31:[function(a,b,c){"use strict";function d(){i.call(this,"utf-8 decode"),this.leftOver=null}function e(){i.call(this,"utf-8 encode")}for(var f=a("./utils"),g=a("./support"),h=a("./nodejsUtils"),i=a("./stream/GenericWorker"),j=new Array(256),k=0;k<256;k++)j[k]=k>=252?6:k>=248?5:k>=240?4:k>=224?3:k>=192?2:1;j[254]=j[254]=1;var l=function(a){var b,c,d,e,f,h=a.length,i=0;for(e=0;e<h;e++)c=a.charCodeAt(e),55296===(64512&c)&&e+1<h&&(d=a.charCodeAt(e+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),e++)),i+=c<128?1:c<2048?2:c<65536?3:4;for(b=g.uint8array?new Uint8Array(i):new Array(i),f=0,e=0;f<i;e++)c=a.charCodeAt(e),55296===(64512&c)&&e+1<h&&(d=a.charCodeAt(e+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),e++)),c<128?b[f++]=c:c<2048?(b[f++]=192|c>>>6,b[f++]=128|63&c):c<65536?(b[f++]=224|c>>>12,b[f++]=128|c>>>6&63,b[f++]=128|63&c):(b[f++]=240|c>>>18,b[f++]=128|c>>>12&63,b[f++]=128|c>>>6&63,b[f++]=128|63&c);return b},m=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return c<0?b:0===c?b:c+j[a[c]]>b?c:b},n=function(a){var b,c,d,e,g=a.length,h=new Array(2*g);for(c=0,b=0;b<g;)if(d=a[b++],d<128)h[c++]=d;else if(e=j[d],e>4)h[c++]=65533,b+=e-1;else{for(d&=2===e?31:3===e?15:7;e>1&&b<g;)d=d<<6|63&a[b++],e--;e>1?h[c++]=65533:d<65536?h[c++]=d:(d-=65536,h[c++]=55296|d>>10&1023,h[c++]=56320|1023&d)}return h.length!==c&&(h.subarray?h=h.subarray(0,c):h.length=c),f.applyFromCharCode(h)};c.utf8encode=function(a){return g.nodebuffer?h.newBuffer(a,"utf-8"):l(a)},c.utf8decode=function(a){return g.nodebuffer?f.transformTo("nodebuffer",a).toString("utf-8"):(a=f.transformTo(g.uint8array?"uint8array":"array",a),n(a))},f.inherits(d,i),d.prototype.processChunk=function(a){var b=f.transformTo(g.uint8array?"uint8array":"array",a.data);if(this.leftOver&&this.leftOver.length){if(g.uint8array){var d=b;b=new Uint8Array(d.length+this.leftOver.length),b.set(this.leftOver,0),b.set(d,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var e=m(b),h=b;e!==b.length&&(g.uint8array?(h=b.subarray(0,e),this.leftOver=b.subarray(e,b.length)):(h=b.slice(0,e),this.leftOver=b.slice(e,b.length))),this.push({data:c.utf8decode(h),meta:a.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=d,f.inherits(e,i),e.prototype.processChunk=function(a){this.push({data:c.utf8encode(a.data),meta:a.meta})},c.Utf8EncodeWorker=e},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(a,b,c){"use strict";function d(a){var b=null;return b=i.uint8array?new Uint8Array(a.length):new Array(a.length),f(a,b)}function e(a){return a}function f(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function g(a){var b=65536,d=c.getTypeOf(a),e=!0;if("uint8array"===d?e=n.applyCanBeUsed.uint8array:"nodebuffer"===d&&(e=n.applyCanBeUsed.nodebuffer),e)for(;b>1;)try{return n.stringifyByChunk(a,d,b)}catch(f){b=Math.floor(b/2)}return n.stringifyByChar(a)}function h(a,b){for(var c=0;c<a.length;c++)b[c]=a[c];return b}var i=a("./support"),j=a("./base64"),k=a("./nodejsUtils"),l=a("core-js/library/fn/set-immediate"),m=a("./external");c.newBlob=function(a,b){c.checkSupport("blob");try{return new Blob(a,{type:b})}catch(d){try{for(var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e,g=0;g<a.length;g++)f.append(a[g]); -return f.getBlob(b)}catch(d){throw new Error("Bug : can't construct the Blob.")}}};var n={stringifyByChunk:function(a,b,c){var d=[],e=0,f=a.length;if(f<=c)return String.fromCharCode.apply(null,a);for(;e<f;)"array"===b||"nodebuffer"===b?d.push(String.fromCharCode.apply(null,a.slice(e,Math.min(e+c,f)))):d.push(String.fromCharCode.apply(null,a.subarray(e,Math.min(e+c,f)))),e+=c;return d.join("")},stringifyByChar:function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(a[c]);return b},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(a){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,k.newBuffer(1)).length}catch(a){return!1}}()}};c.applyFromCharCode=g;var o={};o.string={string:e,array:function(a){return f(a,new Array(a.length))},arraybuffer:function(a){return o.string.uint8array(a).buffer},uint8array:function(a){return f(a,new Uint8Array(a.length))},nodebuffer:function(a){return f(a,k.newBuffer(a.length))}},o.array={string:g,array:e,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return k.newBuffer(a)}},o.arraybuffer={string:function(a){return g(new Uint8Array(a))},array:function(a){return h(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:e,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return k.newBuffer(new Uint8Array(a))}},o.uint8array={string:g,array:function(a){return h(a,new Array(a.length))},arraybuffer:function(a){var b=new Uint8Array(a.length);return a.length&&b.set(a,0),b.buffer},uint8array:e,nodebuffer:function(a){return k.newBuffer(a)}},o.nodebuffer={string:g,array:function(a){return h(a,new Array(a.length))},arraybuffer:function(a){return o.nodebuffer.uint8array(a).buffer},uint8array:function(a){return h(a,new Uint8Array(a.length))},nodebuffer:e},c.transformTo=function(a,b){if(b||(b=""),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=o[d][a](b);return e},c.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":i.nodebuffer&&k.isBuffer(a)?"nodebuffer":i.uint8array&&a instanceof Uint8Array?"uint8array":i.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(a){var b=i[a.toLowerCase()];if(!b)throw new Error(a+" is not supported by this platform")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d="";for(c=0;c<(a||"").length;c++)b=a.charCodeAt(c),d+="\\x"+(b<16?"0":"")+b.toString(16).toUpperCase();return d},c.delay=function(a,b,c){l(function(){a.apply(c||null,b||[])})},c.inherits=function(a,b){var c=function(){};c.prototype=b.prototype,a.prototype=new c},c.extend=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&"undefined"==typeof c[b]&&(c[b]=arguments[a][b]);return c},c.prepareContent=function(a,b,e,f,g){var h=m.Promise.resolve(b).then(function(a){var b=i.blob&&(a instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(a))!==-1);return b&&"undefined"!=typeof FileReader?new m.Promise(function(b,c){var d=new FileReader;d.onload=function(a){b(a.target.result)},d.onerror=function(a){c(a.target.error)},d.readAsArrayBuffer(a)}):a});return h.then(function(b){var h=c.getTypeOf(b);return h?("arraybuffer"===h?b=c.transformTo("uint8array",b):"string"===h&&(g?b=j.decode(b):e&&f!==!0&&(b=d(b))),b):m.Promise.reject(new Error("The data of '"+a+"' is in an unsupported format !"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"core-js/library/fn/set-immediate":36}],33:[function(a,b,c){"use strict";function d(a){this.files=[],this.loadOptions=a}var e=a("./reader/readerFor"),f=a("./utils"),g=a("./signature"),h=a("./zipEntry"),i=(a("./utf8"),a("./support"));d.prototype={checkSignature:function(a){if(!this.reader.readAndCheckSignature(a)){this.reader.index-=4;var b=this.reader.readString(4);throw new Error("Corrupted zip or bug : unexpected signature ("+f.pretty(b)+", expected "+f.pretty(a)+")")}},isSignature:function(a,b){var c=this.reader.index;this.reader.setIndex(a);var d=this.reader.readString(4),e=d===b;return this.reader.setIndex(c),e},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var a=this.reader.readData(this.zipCommentLength),b=i.uint8array?"uint8array":"array",c=f.transformTo(b,a);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;e<d;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readData(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8(),b.processAttributes()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)a=new h({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(a<0){var b=!this.isSignature(0,g.LOCAL_FILE_HEADER);throw b?new Error("Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip : can't find end of central directory")}this.reader.setIndex(a);var c=a;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===f.MAX_VALUE_16BITS||this.diskWithCentralDirStart===f.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===f.MAX_VALUE_16BITS||this.centralDirRecords===f.MAX_VALUE_16BITS||this.centralDirSize===f.MAX_VALUE_32BITS||this.centralDirOffset===f.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),a<0)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(a),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip : can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var e=c-d;if(e>0)this.isSignature(c,g.CENTRAL_FILE_HEADER)||(this.reader.zero=e);else if(e<0)throw new Error("Corrupted zip: missing "+Math.abs(e)+" bytes.")},prepareReader:function(a){this.reader=e(a)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(a,b,c){"use strict";function d(a,b){this.options=a,this.loadOptions=b}var e=a("./reader/readerFor"),f=a("./utils"),g=a("./compressedObject"),h=a("./crc32"),i=a("./utf8"),j=a("./compressions"),k=a("./support"),l=0,m=3,n=function(a){for(var b in j)if(j.hasOwnProperty(b)&&j[b].magic===a)return j[b];return null};d.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readData(this.fileNameLength),a.skip(c),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(b=n(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,b,a.readData(this.compressedSize))},readCentralPart:function(a){this.versionMadeBy=a.readInt(2),a.skip(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4);var b=a.readInt(2);if(this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");a.skip(b),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var a=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),a===l&&(this.dosPermissions=63&this.externalFileAttributes),a===m&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(a){if(this.extraFields[1]){var b=e(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});a.index<e;)b=a.readInt(2),c=a.readInt(2),d=a.readData(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){var a=k.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=i.utf8decode(this.fileName),this.fileCommentStr=i.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(null!==b)this.fileNameStr=b;else{var c=f.transformTo(a,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(c)}var d=this.findExtraFieldUnicodeComment();if(null!==d)this.fileCommentStr=d;else{var e=f.transformTo(a,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(e)}}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=e(a.value);return 1!==b.readInt(1)?null:h(this.fileName)!==b.readInt(4)?null:i.utf8decode(b.readData(a.length-5))}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=e(a.value);return 1!==b.readInt(1)?null:h(this.fileComment)!==b.readInt(4)?null:i.utf8decode(b.readData(a.length-5))}return null}},b.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(a,b,c){"use strict";var d=a("./stream/StreamHelper"),e=a("./stream/DataWorker"),f=a("./utf8"),g=a("./compressedObject"),h=a("./stream/GenericWorker"),i=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this.unixPermissions=c.unixPermissions,this.dosPermissions=c.dosPermissions,this._data=b,this._dataBinary=c.binary,this.options={compression:c.compression,compressionOptions:c.compressionOptions}};i.prototype={internalStream:function(a){var b=a.toLowerCase(),c="string"===b||"text"===b;"binarystring"!==b&&"text"!==b||(b="string");var e=this._decompressWorker(),g=!this._dataBinary;return g&&!c&&(e=e.pipe(new f.Utf8EncodeWorker)),!g&&c&&(e=e.pipe(new f.Utf8DecodeWorker)),new d(e,b,"")},async:function(a,b){return this.internalStream(a).accumulate(b)},nodeStream:function(a,b){return this.internalStream(a||"nodebuffer").toNodejsStream(b)},_compressWorker:function(a,b){if(this._data instanceof g&&this._data.compression.magic===a.magic)return this._data.getCompressedWorker();var c=this._decompressWorker();return this._dataBinary||(c=c.pipe(new f.Utf8EncodeWorker)),g.createWorkerFrom(c,a,b)},_decompressWorker:function(){return this._data instanceof g?this._data.getContentWorker():this._data instanceof h?this._data:new e(this._data)}};for(var j=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},l=0;l<j.length;l++)i.prototype[j[l]]=k;b.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(a,b,c){a("../modules/web.immediate"),b.exports=a("../modules/_core").setImmediate},{"../modules/_core":40,"../modules/web.immediate":56}],37:[function(a,b,c){b.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},{}],38:[function(a,b,c){var d=a("./_is-object");b.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},{"./_is-object":51}],39:[function(a,b,c){var d={}.toString;b.exports=function(a){return d.call(a).slice(8,-1)}},{}],40:[function(a,b,c){var d=b.exports={version:"2.3.0"};"number"==typeof __e&&(__e=d)},{}],41:[function(a,b,c){var d=a("./_a-function");b.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},{"./_a-function":37}],42:[function(a,b,c){b.exports=!a("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":45}],43:[function(a,b,c){var d=a("./_is-object"),e=a("./_global").document,f=d(e)&&d(e.createElement);b.exports=function(a){return f?e.createElement(a):{}}},{"./_global":46,"./_is-object":51}],44:[function(a,b,c){var d=a("./_global"),e=a("./_core"),f=a("./_ctx"),g=a("./_hide"),h="prototype",i=function(a,b,c){var j,k,l,m=a&i.F,n=a&i.G,o=a&i.S,p=a&i.P,q=a&i.B,r=a&i.W,s=n?e:e[b]||(e[b]={}),t=s[h],u=n?d:o?d[b]:(d[b]||{})[h];n&&(c=b);for(j in c)k=!m&&u&&void 0!==u[j],k&&j in s||(l=k?u[j]:c[j],s[j]=n&&"function"!=typeof u[j]?c[j]:q&&k?f(l,d):r&&u[j]==l?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[h]=a[h],b}(l):p&&"function"==typeof l?f(Function.call,l):l,p&&((s.virtual||(s.virtual={}))[j]=l,a&i.R&&t&&!t[j]&&g(t,j,l)))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,b.exports=i},{"./_core":40,"./_ctx":41,"./_global":46,"./_hide":47}],45:[function(a,b,c){b.exports=function(a){try{return!!a()}catch(b){return!0}}},{}],46:[function(a,b,c){var d=b.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=d)},{}],47:[function(a,b,c){var d=a("./_object-dp"),e=a("./_property-desc");b.exports=a("./_descriptors")?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},{"./_descriptors":42,"./_object-dp":52,"./_property-desc":53}],48:[function(a,b,c){b.exports=a("./_global").document&&document.documentElement},{"./_global":46}],49:[function(a,b,c){b.exports=!a("./_descriptors")&&!a("./_fails")(function(){return 7!=Object.defineProperty(a("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":42,"./_dom-create":43,"./_fails":45}],50:[function(a,b,c){b.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},{}],51:[function(a,b,c){b.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},{}],52:[function(a,b,c){var d=a("./_an-object"),e=a("./_ie8-dom-define"),f=a("./_to-primitive"),g=Object.defineProperty;c.f=a("./_descriptors")?Object.defineProperty:function(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},{"./_an-object":38,"./_descriptors":42,"./_ie8-dom-define":49,"./_to-primitive":55}],53:[function(a,b,c){b.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},{}],54:[function(a,b,c){var d,e,f,g=a("./_ctx"),h=a("./_invoke"),i=a("./_html"),j=a("./_dom-create"),k=a("./_global"),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==a("./_cof")(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),b.exports={set:m,clear:n}},{"./_cof":39,"./_ctx":41,"./_dom-create":43,"./_global":46,"./_html":48,"./_invoke":50}],55:[function(a,b,c){var d=a("./_is-object");b.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":51}],56:[function(a,b,c){var d=a("./_export"),e=a("./_task");d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},{"./_export":44,"./_task":54}],57:[function(a,b,c){(function(a){"use strict";function c(){k=!0;for(var a,b,c=l.length;c;){for(b=l,l=[],a=-1;++a<c;)b[a]();c=l.length}k=!1}function d(a){1!==l.push(a)||k||e()}var e,f=a.MutationObserver||a.WebKitMutationObserver;if(f){var g=0,h=new f(c),i=a.document.createTextNode("");h.observe(i,{characterData:!0}),e=function(){i.data=g=++g%2}}else if(a.setImmediate||"undefined"==typeof a.MessageChannel)e="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var b=a.document.createElement("script");b.onreadystatechange=function(){c(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},a.document.documentElement.appendChild(b)}:function(){setTimeout(c,0)};else{var j=new a.MessageChannel;j.port1.onmessage=c,e=function(){j.port2.postMessage(0)}}var k,l=[];b.exports=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],58:[function(a,b,c){"use strict";function d(){}function e(a){if("function"!=typeof a)throw new TypeError("resolver must be a function");this.state=s,this.queue=[],this.outcome=void 0,a!==d&&i(this,a)}function f(a,b,c){this.promise=a,"function"==typeof b&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),"function"==typeof c&&(this.onRejected=c,this.callRejected=this.otherCallRejected)}function g(a,b,c){o(function(){var d;try{d=b(c)}catch(e){return p.reject(a,e)}d===a?p.reject(a,new TypeError("Cannot resolve promise with itself")):p.resolve(a,d)})}function h(a){var b=a&&a.then;if(a&&"object"==typeof a&&"function"==typeof b)return function(){b.apply(a,arguments)}}function i(a,b){function c(b){f||(f=!0,p.reject(a,b))}function d(b){f||(f=!0,p.resolve(a,b))}function e(){b(d,c)}var f=!1,g=j(e);"error"===g.status&&c(g.value)}function j(a,b){var c={};try{c.value=a(b),c.status="success"}catch(d){c.status="error",c.value=d}return c}function k(a){return a instanceof this?a:p.resolve(new this(d),a)}function l(a){var b=new this(d);return p.reject(b,a)}function m(a){function b(a,b){function d(a){g[b]=a,++h!==e||f||(f=!0,p.resolve(j,g))}c.resolve(a).then(d,function(a){f||(f=!0,p.reject(j,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=new Array(e),h=0,i=-1,j=new this(d);++i<e;)b(a[i],i);return j}function n(a){function b(a){c.resolve(a).then(function(a){f||(f=!0,p.resolve(h,a))},function(a){f||(f=!0,p.reject(h,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=-1,h=new this(d);++g<e;)b(a[g]);return h}var o=a("immediate"),p={},q=["REJECTED"],r=["FULFILLED"],s=["PENDING"];b.exports=e,e.prototype["catch"]=function(a){return this.then(null,a)},e.prototype.then=function(a,b){if("function"!=typeof a&&this.state===r||"function"!=typeof b&&this.state===q)return this;var c=new this.constructor(d);if(this.state!==s){var e=this.state===r?a:b;g(c,e,this.outcome)}else this.queue.push(new f(c,a,b));return c},f.prototype.callFulfilled=function(a){p.resolve(this.promise,a)},f.prototype.otherCallFulfilled=function(a){g(this.promise,this.onFulfilled,a)},f.prototype.callRejected=function(a){p.reject(this.promise,a)},f.prototype.otherCallRejected=function(a){g(this.promise,this.onRejected,a)},p.resolve=function(a,b){var c=j(h,b);if("error"===c.status)return p.reject(a,c.value);var d=c.value;if(d)i(a,d);else{a.state=r,a.outcome=b;for(var e=-1,f=a.queue.length;++e<f;)a.queue[e].callFulfilled(b)}return a},p.reject=function(a,b){a.state=q,a.outcome=b;for(var c=-1,d=a.queue.length;++c<d;)a.queue[c].callRejected(b);return a},e.resolve=k,e.reject=l,e.all=m,e.race=n},{immediate:57}],59:[function(a,b,c){"use strict";var d=a("./lib/utils/common").assign,e=a("./lib/deflate"),f=a("./lib/inflate"),g=a("./lib/zlib/constants"),h={};d(h,e,f,g),b.exports=h},{"./lib/deflate":60,"./lib/inflate":61,"./lib/utils/common":62,"./lib/zlib/constants":65}],60:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=i.assign({level:s,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:t,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=h.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==p)throw new Error(k[c]);if(b.header&&h.deflateSetHeader(this.strm,b.header),b.dictionary){var e;if(e="string"==typeof b.dictionary?j.string2buf(b.dictionary):"[object ArrayBuffer]"===m.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary,c=h.deflateSetDictionary(this.strm,e),c!==p)throw new Error(k[c]);this._dict_set=!0}}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}function g(a,b){return b=b||{},b.gzip=!0,e(a,b)}var h=a("./zlib/deflate"),i=a("./utils/common"),j=a("./utils/strings"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=Object.prototype.toString,n=0,o=4,p=0,q=1,r=2,s=-1,t=0,u=8;d.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?o:n,"string"==typeof a?e.input=j.string2buf(a):"[object ArrayBuffer]"===m.call(a)?e.input=new Uint8Array(a):e.input=a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new i.Buf8(f),e.next_out=0,e.avail_out=f),c=h.deflate(e,d),c!==q&&c!==p)return this.onEnd(c),this.ended=!0,!1;0!==e.avail_out&&(0!==e.avail_in||d!==o&&d!==r)||("string"===this.options.to?this.onData(j.buf2binstring(i.shrinkBuf(e.output,e.next_out))):this.onData(i.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||0===e.avail_out)&&c!==q);return d===o?(c=h.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===p):d!==r||(this.onEnd(p),e.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=d,c.deflate=e,c.deflateRaw=f,c.gzip=g},{"./utils/common":62,"./utils/strings":63,"./zlib/deflate":67,"./zlib/messages":72,"./zlib/zstream":74}],61:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=g.inflateInit2(this.strm,b.windowBits);if(c!==j.Z_OK)throw new Error(k[c]);this.header=new m,g.inflateGetHeader(this.strm,this.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}var g=a("./zlib/inflate"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/constants"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=a("./zlib/gzheader"),n=Object.prototype.toString;d.prototype.push=function(a,b){var c,d,e,f,k,l,m=this.strm,o=this.options.chunkSize,p=this.options.dictionary,q=!1;if(this.ended)return!1;d=b===~~b?b:b===!0?j.Z_FINISH:j.Z_NO_FLUSH,"string"==typeof a?m.input=i.binstring2buf(a):"[object ArrayBuffer]"===n.call(a)?m.input=new Uint8Array(a):m.input=a,m.next_in=0,m.avail_in=m.input.length;do{if(0===m.avail_out&&(m.output=new h.Buf8(o),m.next_out=0,m.avail_out=o),c=g.inflate(m,j.Z_NO_FLUSH),c===j.Z_NEED_DICT&&p&&(l="string"==typeof p?i.string2buf(p):"[object ArrayBuffer]"===n.call(p)?new Uint8Array(p):p,c=g.inflateSetDictionary(this.strm,l)),c===j.Z_BUF_ERROR&&q===!0&&(c=j.Z_OK,q=!1),c!==j.Z_STREAM_END&&c!==j.Z_OK)return this.onEnd(c),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&c!==j.Z_STREAM_END&&(0!==m.avail_in||d!==j.Z_FINISH&&d!==j.Z_SYNC_FLUSH)||("string"===this.options.to?(e=i.utf8border(m.output,m.next_out),f=m.next_out-e,k=i.buf2string(m.output,e),m.next_out=f,m.avail_out=o-f,f&&h.arraySet(m.output,m.output,e,f,0),this.onData(k)):this.onData(h.shrinkBuf(m.output,m.next_out)))),0===m.avail_in&&0===m.avail_out&&(q=!0)}while((m.avail_in>0||0===m.avail_out)&&c!==j.Z_STREAM_END);return c===j.Z_STREAM_END&&(d=j.Z_FINISH),d===j.Z_FINISH?(c=g.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===j.Z_OK):d!==j.Z_SYNC_FLUSH||(this.onEnd(j.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===j.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=d,c.inflate=e,c.inflateRaw=f,c.ungzip=e},{"./utils/common":62,"./utils/strings":63,"./zlib/constants":65,"./zlib/gzheader":68,"./zlib/inflate":70,"./zlib/messages":72,"./zlib/zstream":74}],62:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;f<d;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;b<c;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;b<c;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;f<d;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],63:[function(a,b,c){"use strict";function d(a,b){if(b<65537&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;d<b;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;j<256;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;f<h;f++)c=a.charCodeAt(f),55296===(64512&c)&&f+1<h&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=c<128?1:c<2048?2:c<65536?3:4;for(b=new e.Buf8(i),g=0,f=0;g<i;f++)c=a.charCodeAt(f),55296===(64512&c)&&f+1<h&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),c<128?b[g++]=c:c<2048?(b[g++]=192|c>>>6,b[g++]=128|63&c):c<65536?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;c<d;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;c<h;)if(f=a[c++],f<128)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&c<h;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:f<65536?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return c<0?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":62}],64:[function(a,b,c){"use strict";function d(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=d},{}],65:[function(a,b,c){"use strict";b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],66:[function(a,b,c){"use strict";function d(){ -for(var a,b=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=f,g=d+c;a^=-1;for(var h=d;h<g;h++)a=a>>>8^e[255&(a^b[h])];return a^-1}var f=d();b.exports=e},{}],67:[function(a,b,c){"use strict";function d(a,b){return a.msg=I[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(E.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){F._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,E.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=G(a.adler,b,e,c):2===a.state.wrap&&(a.adler=H(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-la?a.strstart-(a.w_size-la):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ka,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&f<m);if(d=ka-(m-f),f=m-ka,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-la)){E.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ja)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+ja-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<ja)););}while(a.lookahead<la&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===J)return ua;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return ua;if(a.strstart-a.block_start>=a.w_size-la&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?ua:ua}function o(a,b){for(var c,d;;){if(a.lookahead<la){if(m(a),a.lookahead<la&&b===J)return ua;if(0===a.lookahead)break}if(c=0,a.lookahead>=ja&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-la&&(a.match_length=l(a,c)),a.match_length>=ja)if(d=F._tr_tally(a,a.strstart-a.match_start,a.match_length-ja),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ja){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=a.strstart<ja-1?a.strstart:ja-1,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function p(a,b){for(var c,d,e;;){if(a.lookahead<la){if(m(a),a.lookahead<la&&b===J)return ua;if(0===a.lookahead)break}if(c=0,a.lookahead>=ja&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=ja-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-la&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===U||a.match_length===ja&&a.strstart-a.match_start>4096)&&(a.match_length=ja-1)),a.prev_length>=ja&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ja,d=F._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ja),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=ja-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return ua}else if(a.match_available){if(d=F._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return ua}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=F._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<ja-1?a.strstart:ja-1,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ka){if(m(a),a.lookahead<=ka&&b===J)return ua;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=ja&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ka;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&e<f);a.match_length=ka-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ja?(c=F._tr_tally(a,1,a.match_length-ja),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===J)return ua;break}if(a.match_length=0,c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function s(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e}function t(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=D[a.level].max_lazy,a.good_match=D[a.level].good_length,a.nice_match=D[a.level].nice_length,a.max_chain_length=D[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ja-1,a.match_available=0,a.ins_h=0}function u(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E.Buf16(2*ha),this.dyn_dtree=new E.Buf16(2*(2*fa+1)),this.bl_tree=new E.Buf16(2*(2*ga+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E.Buf16(ia+1),this.heap=new E.Buf16(2*ea+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E.Buf16(2*ea+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=Z,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?na:sa,a.adler=2===b.wrap?0:1,b.last_flush=J,F._tr_init(b),O):d(a,Q)}function w(a){var b=v(a);return b===O&&t(a.state),b}function x(a,b){return a&&a.state?2!==a.state.wrap?Q:(a.state.gzhead=b,O):Q}function y(a,b,c,e,f,g){if(!a)return Q;var h=1;if(b===T&&(b=6),e<0?(h=0,e=-e):e>15&&(h=2,e-=16),f<1||f>_||c!==$||e<8||e>15||b<0||b>9||g<0||g>X)return d(a,Q);8===e&&(e=9);var i=new u;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+ja-1)/ja),i.window=new E.Buf8(2*i.w_size),i.head=new E.Buf16(i.hash_size),i.prev=new E.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new E.Buf8(i.pending_buf_size),i.d_buf=1*i.lit_bufsize,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,w(a)}function z(a,b){return y(a,b,$,aa,ba,Y)}function A(a,b){var c,h,k,l;if(!a||!a.state||b>N||b<0)return a?d(a,Q):Q;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ta&&b!==M)return d(a,0===a.avail_out?S:Q);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===na)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=H(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=oa):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,ya),h.status=sa);else{var m=$+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=V||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ma),m+=31-m%31,h.status=sa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===oa)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=pa)}else h.status=pa;if(h.status===pa)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=qa)}else h.status=qa;if(h.status===qa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=ra)}else h.status=ra;if(h.status===ra&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=sa)):h.status=sa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,O}else if(0===a.avail_in&&e(b)<=e(c)&&b!==M)return d(a,S);if(h.status===ta&&0!==a.avail_in)return d(a,S);if(0!==a.avail_in||0!==h.lookahead||b!==J&&h.status!==ta){var o=h.strategy===V?r(h,b):h.strategy===W?q(h,b):D[h.level].func(h,b);if(o!==wa&&o!==xa||(h.status=ta),o===ua||o===wa)return 0===a.avail_out&&(h.last_flush=-1),O;if(o===va&&(b===K?F._tr_align(h):b!==N&&(F._tr_stored_block(h,0,0,!1),b===L&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,O}return b!==M?O:h.wrap<=0?P:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?O:P)}function B(a){var b;return a&&a.state?(b=a.state.status,b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra&&b!==sa&&b!==ta?d(a,Q):(a.state=null,b===sa?d(a,R):O)):Q}function C(a,b){var c,d,e,g,h,i,j,k,l=b.length;if(!a||!a.state)return Q;if(c=a.state,g=c.wrap,2===g||1===g&&c.status!==na||c.lookahead)return Q;for(1===g&&(a.adler=G(a.adler,b,l,0)),c.wrap=0,l>=c.w_size&&(0===g&&(f(c.head),c.strstart=0,c.block_start=0,c.insert=0),k=new E.Buf8(c.w_size),E.arraySet(k,b,l-c.w_size,c.w_size,0),b=k,l=c.w_size),h=a.avail_in,i=a.next_in,j=a.input,a.avail_in=l,a.next_in=0,a.input=b,m(c);c.lookahead>=ja;){d=c.strstart,e=c.lookahead-(ja-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[d+ja-1])&c.hash_mask,c.prev[d&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=d,d++;while(--e);c.strstart=d,c.lookahead=ja-1,m(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=ja-1,c.match_available=0,a.next_in=i,a.input=j,a.avail_in=h,c.wrap=g,O}var D,E=a("../utils/common"),F=a("./trees"),G=a("./adler32"),H=a("./crc32"),I=a("./messages"),J=0,K=1,L=3,M=4,N=5,O=0,P=1,Q=-2,R=-3,S=-5,T=-1,U=1,V=2,W=3,X=4,Y=0,Z=2,$=8,_=9,aa=15,ba=8,ca=29,da=256,ea=da+1+ca,fa=30,ga=19,ha=2*ea+1,ia=15,ja=3,ka=258,la=ka+ja+1,ma=32,na=42,oa=69,pa=73,qa=91,ra=103,sa=113,ta=666,ua=1,va=2,wa=3,xa=4,ya=3;D=[new s(0,0,0,0,n),new s(4,4,8,4,o),new s(4,5,16,8,o),new s(4,6,32,32,o),new s(4,4,16,16,p),new s(8,16,32,32,p),new s(8,16,128,128,p),new s(8,32,128,256,p),new s(32,128,258,1024,p),new s(32,258,258,4096,p)],c.deflateInit=z,c.deflateInit2=y,c.deflateReset=w,c.deflateResetKeep=v,c.deflateSetHeader=x,c.deflate=A,c.deflateEnd=B,c.deflateSetDictionary=C,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":62,"./adler32":64,"./crc32":66,"./messages":72,"./trees":73}],68:[function(a,b,c){"use strict";function d(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=d},{}],69:[function(a,b,c){"use strict";var d=30,e=12;b.exports=function(a,b){var c,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;c=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=c.dmax,l=c.wsize,m=c.whave,n=c.wnext,o=c.window,p=c.hold,q=c.bits,r=c.lencode,s=c.distcode,t=(1<<c.lenbits)-1,u=(1<<c.distbits)-1;a:do{q<15&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){c.mode=e;break a}a.msg="invalid literal/length code",c.mode=d;break a}x=65535&v,w&=15,w&&(q<w&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),q<15&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",c.mode=d;break a}if(y=65535&v,w&=15,q<w&&(p+=B[f++]<<q,q+=8,q<w&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",c.mode=d;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&c.sane){a.msg="invalid distance too far back",c.mode=d;break a}if(z=0,A=o,0===n){if(z+=l-w,w<x){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(n<w){if(z+=l+n-w,w-=n,w<x){x-=w;do C[h++]=o[z++];while(--w);if(z=0,n<x){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,w<x){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(f<g&&h<j);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=f<g?5+(g-f):5-(f-g),a.avail_out=h<j?257+(j-h):257-(h-j),c.hold=p,c.bits=q}},{}],70:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=L,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new s.Buf32(pa),b.distcode=b.distdyn=new s.Buf32(qa),b.sane=1,b.back=-1,D):G}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):G}function h(a,b){var c,d;return a&&a.state?(d=a.state,b<0?(c=0,b=-b):(c=(b>>4)+1,b<48&&(b&=15)),b&&(b<8||b>15)?G:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):G}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==D&&(a.state=null),c):G}function j(a){return i(a,sa)}function k(a){if(ta){var b;for(q=new s.Buf32(512),r=new s.Buf32(32),b=0;b<144;)a.lens[b++]=8;for(;b<256;)a.lens[b++]=9;for(;b<280;)a.lens[b++]=7;for(;b<288;)a.lens[b++]=8;for(w(y,a.lens,0,288,q,0,a.work,{bits:9}),b=0;b<32;)a.lens[b++]=5;w(z,a.lens,0,32,r,0,a.work,{bits:5}),ta=!1}a.lencode=q,a.lenbits=9,a.distcode=r,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new s.Buf8(f.wsize)),d>=f.wsize?(s.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),s.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(s.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,r,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa=0,Ba=new s.Buf8(4),Ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return G;c=a.state,c.mode===W&&(c.mode=X),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xa=D;a:for(;;)switch(c.mode){case L:if(0===c.wrap){c.mode=X;break}for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0),m=0,n=0,c.mode=M;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=ma;break}if((15&m)!==K){a.msg="unknown compression method",c.mode=ma;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=ma;break}c.dmax=1<<wa,a.adler=c.check=1,c.mode=512&m?U:W,m=0,n=0;break;case M:for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==K){a.msg="unknown compression method",c.mode=ma;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=ma;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=N;case N:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=u(c.check,Ba,4,0)),m=0,n=0,c.mode=O;case O:for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=P;case P:if(1024&c.flags){for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=Q;case Q:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),s.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=R;case R:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&q<i);if(512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=S;case S:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&q<i);if(512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=T;case T:if(512&c.flags){for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=ma;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=W;break;case U:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=V;case V:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,F;a.adler=c.check=1,c.mode=W;case W:if(b===B||b===C)break a;case X:if(c.last){m>>>=7&n,n-=7&n,c.mode=ja;break}for(;n<3;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=Y;break;case 1:if(k(c),c.mode=ca,b===C){m>>>=2,n-=2;break a}break;case 2:c.mode=_;break;case 3:a.msg="invalid block type",c.mode=ma}m>>>=2,n-=2;break;case Y:for(m>>>=7&n,n-=7&n;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=ma;break}if(c.length=65535&m,m=0,n=0,c.mode=Z,b===C)break a;case Z:c.mode=$;case $:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;s.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=W;break;case _:for(;n<14;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=ma;break}c.have=0,c.mode=aa;case aa:for(;c.have<c.ncode;){for(;n<3;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Ca[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=w(x,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=ma;break}c.have=0,c.mode=ba;case ba:for(;c.have<c.nlen+c.ndist;){for(;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(sa<16)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=ma;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=ma;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===ma)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=ma;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=w(y,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=ma;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=w(z,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=ma;break}if(c.mode=ca,b===C)break a;case ca:c.mode=da;case da:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,v(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===W&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(ra&&0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.lencode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ia;break}if(32&ra){c.back=-1,c.mode=W;break}if(64&ra){a.msg="invalid literal/length code",c.mode=ma;break}c.extra=15&ra,c.mode=ea;case ea:if(c.extra){for(za=c.extra;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=fa;case fa:for(;Aa=c.distcode[m&(1<<c.distbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.distcode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=ma;break}c.offset=sa,c.extra=15&ra,c.mode=ga;case ga:if(c.extra){for(za=c.extra;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=ma;break}c.mode=ha;case ha:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=ma;break}q>c.wnext?(q-=c.wnext,r=c.wsize-q):r=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,r=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[r++];while(--q);0===c.length&&(c.mode=da);break;case ia:if(0===j)break a;f[h++]=c.length,j--,c.mode=da;break;case ja:if(c.wrap){for(;n<32;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?u(c.check,f,p,h-p):t(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=ma;break}m=0,n=0}c.mode=ka;case ka:if(c.wrap&&c.flags){for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=ma;break}m=0,n=0}c.mode=la;case la:xa=E;break a;case ma:xa=H;break a;case na:return I;case oa:default:return G}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<ma&&(c.mode<ja||b!==A))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=na,I):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?u(c.check,f,p,a.next_out-p):t(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===W?128:0)+(c.mode===ca||c.mode===Z?256:0),(0===o&&0===p||b===A)&&xa===D&&(xa=J),xa)}function n(a){if(!a||!a.state)return G;var b=a.state;return b.window&&(b.window=null),a.state=null,D}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?G:(c.head=b,b.done=!1,D)):G}function p(a,b){var c,d,e,f=b.length;return a&&a.state?(c=a.state,0!==c.wrap&&c.mode!==V?G:c.mode===V&&(d=1,d=t(d,b,f,0),d!==c.check)?H:(e=l(a,b,f,f))?(c.mode=na,I):(c.havedict=1,D)):G}var q,r,s=a("../utils/common"),t=a("./adler32"),u=a("./crc32"),v=a("./inffast"),w=a("./inftrees"),x=0,y=1,z=2,A=4,B=5,C=6,D=0,E=1,F=2,G=-2,H=-3,I=-4,J=-5,K=8,L=1,M=2,N=3,O=4,P=5,Q=6,R=7,S=8,T=9,U=10,V=11,W=12,X=13,Y=14,Z=15,$=16,_=17,aa=18,ba=19,ca=20,da=21,ea=22,fa=23,ga=24,ha=25,ia=26,ja=27,ka=28,la=29,ma=30,na=31,oa=32,pa=852,qa=592,ra=15,sa=ra,ta=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateSetDictionary=p,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":62,"./adler32":64,"./crc32":66,"./inffast":69,"./inftrees":71}],71:[function(a,b,c){"use strict";var d=a("../utils/common"),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;D<=e;D++)P[D]=0;for(E=0;E<o;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;F<G&&0===P[F];F++);for(H<F&&(H=F),K=1,D=1;D<=e;D++)if(K<<=1,K-=P[D],K<0)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;D<e;D++)Q[D+1]=Q[D]+P[D];for(E=0;E<o;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===i&&L>f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;I+J<G&&(K-=P[I+J],!(K<=0));)I++,K<<=1;if(L+=1<<I,a===i&&L>f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":62}],72:[function(a,b,c){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],73:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length}function f(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b}function g(a){return a<256?ia[a]:ia[256+(a>>>7)]}function h(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function i(a,b,c){a.bi_valid>X-c?(a.bi_buf|=b<<a.bi_valid&65535,h(a,a.bi_buf),a.bi_buf=b>>X-a.bi_valid,a.bi_valid+=c-X):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function j(a,b,c){i(a,c[2*b],c[2*b+1])}function k(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function l(a){16===a.bi_valid?(h(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function m(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;f<=W;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;c<V;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function n(a,b,c){var d,e,f=new Array(W+1),g=0; -for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2*e]=k(f[h]++,h))}}function o(){var a,b,c,d,f,g=new Array(W+1);for(c=0,d=0;d<Q-1;d++)for(ka[d]=c,a=0;a<1<<ba[d];a++)ja[c++]=d;for(ja[c-1]=d,f=0,d=0;d<16;d++)for(la[d]=f,a=0;a<1<<ca[d];a++)ia[f++]=d;for(f>>=7;d<T;d++)for(la[d]=f<<7,a=0;a<1<<ca[d]-7;a++)ia[256+f++]=d;for(b=0;b<=W;b++)g[b]=0;for(a=0;a<=143;)ga[2*a+1]=8,a++,g[8]++;for(;a<=255;)ga[2*a+1]=9,a++,g[9]++;for(;a<=279;)ga[2*a+1]=7,a++,g[7]++;for(;a<=287;)ga[2*a+1]=8,a++,g[8]++;for(n(ga,S+1,g),a=0;a<T;a++)ha[2*a+1]=5,ha[2*a]=k(a,5);ma=new e(ga,ba,R+1,S,W),na=new e(ha,ca,0,T,W),oa=new e(new Array(0),da,0,U,Y)}function p(a){var b;for(b=0;b<S;b++)a.dyn_ltree[2*b]=0;for(b=0;b<T;b++)a.dyn_dtree[2*b]=0;for(b=0;b<U;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*Z]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function q(a){a.bi_valid>8?h(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function r(a,b,c,d){q(a),d&&(h(a,c),h(a,~c)),G.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function s(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function t(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&s(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!s(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function u(a,b,c){var d,e,f,h,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],e=a.pending_buf[a.l_buf+k],k++,0===d?j(a,e,b):(f=ja[e],j(a,f+R+1,b),h=ba[f],0!==h&&(e-=ka[f],i(a,e,h)),d--,f=g(d),j(a,f,c),h=ca[f],0!==h&&(d-=la[f],i(a,d,h)));while(k<a.last_lit);j(a,Z,b)}function v(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=V,c=0;c<i;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=j<2?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)t(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],t(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,t(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],m(a,b),n(f,j,a.bl_count)}function w(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;d<=c;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(h<j?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*$]++):h<=10?a.bl_tree[2*_]++:a.bl_tree[2*aa]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function x(a,b,c){var d,e,f=-1,g=b[1],h=0,k=7,l=4;for(0===g&&(k=138,l=3),d=0;d<=c;d++)if(e=g,g=b[2*(d+1)+1],!(++h<k&&e===g)){if(h<l){do j(a,e,a.bl_tree);while(0!==--h)}else 0!==e?(e!==f&&(j(a,e,a.bl_tree),h--),j(a,$,a.bl_tree),i(a,h-3,2)):h<=10?(j(a,_,a.bl_tree),i(a,h-3,3)):(j(a,aa,a.bl_tree),i(a,h-11,7));h=0,f=e,0===g?(k=138,l=3):e===g?(k=6,l=3):(k=7,l=4)}}function y(a){var b;for(w(a,a.dyn_ltree,a.l_desc.max_code),w(a,a.dyn_dtree,a.d_desc.max_code),v(a,a.bl_desc),b=U-1;b>=3&&0===a.bl_tree[2*ea[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function z(a,b,c,d){var e;for(i(a,b-257,5),i(a,c-1,5),i(a,d-4,4),e=0;e<d;e++)i(a,a.bl_tree[2*ea[e]+1],3);x(a,a.dyn_ltree,b-1),x(a,a.dyn_dtree,c-1)}function A(a){var b,c=4093624447;for(b=0;b<=31;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return I;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return J;for(b=32;b<R;b++)if(0!==a.dyn_ltree[2*b])return J;return I}function B(a){pa||(o(),pa=!0),a.l_desc=new f(a.dyn_ltree,ma),a.d_desc=new f(a.dyn_dtree,na),a.bl_desc=new f(a.bl_tree,oa),a.bi_buf=0,a.bi_valid=0,p(a)}function C(a,b,c,d){i(a,(L<<1)+(d?1:0),3),r(a,b,c,!0)}function D(a){i(a,M<<1,3),j(a,Z,ga),l(a)}function E(a,b,c,d){var e,f,g=0;a.level>0?(a.strm.data_type===K&&(a.strm.data_type=A(a)),v(a,a.l_desc),v(a,a.d_desc),g=y(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,f<=e&&(e=f)):e=f=c+5,c+4<=e&&b!==-1?C(a,b,c,d):a.strategy===H||f===e?(i(a,(M<<1)+(d?1:0),3),u(a,ga,ha)):(i(a,(N<<1)+(d?1:0),3),z(a,a.l_desc.max_code+1,a.d_desc.max_code+1,g+1),u(a,a.dyn_ltree,a.dyn_dtree)),p(a),d&&q(a)}function F(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ja[c]+R+1)]++,a.dyn_dtree[2*g(b)]++),a.last_lit===a.lit_bufsize-1}var G=a("../utils/common"),H=4,I=0,J=1,K=2,L=0,M=1,N=2,O=3,P=258,Q=29,R=256,S=R+1+Q,T=30,U=19,V=2*S+1,W=15,X=16,Y=7,Z=256,$=16,_=17,aa=18,ba=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ca=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],da=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fa=512,ga=new Array(2*(S+2));d(ga);var ha=new Array(2*T);d(ha);var ia=new Array(fa);d(ia);var ja=new Array(P-O+1);d(ja);var ka=new Array(Q);d(ka);var la=new Array(T);d(la);var ma,na,oa,pa=!1;c._tr_init=B,c._tr_stored_block=C,c._tr_flush_block=E,c._tr_tally=F,c._tr_align=D},{"../utils/common":62}],74:[function(a,b,c){"use strict";function d(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=d},{}]},{},[10])(10)}); diff --git a/src/main/webapp/js/vsdx/resources/edgeNameU.txt b/src/main/webapp/js/vsdx/resources/edgeNameU.txt deleted file mode 100644 index 08bb686d24ccdc292cc2939a657925c6a7b7b2e8..0000000000000000000000000000000000000000 --- a/src/main/webapp/js/vsdx/resources/edgeNameU.txt +++ /dev/null @@ -1,5 +0,0 @@ -Comm-link=mxgraph.lean_mapping.comm_link_edge -Comm-link\ 1=mxgraph.lean_mapping.comm_link_edge -Comm-link\ 2=mxgraph.lean_mapping.comm_link_edge -Electronic\ information=mxgraph.lean_mapping.electronic_info_flow_edge -Generalization=connector;endArrow\=block;endSize\=16;endFill\=0 diff --git a/src/main/webapp/js/vsdx/resources/nameU.txt b/src/main/webapp/js/vsdx/resources/nameU.txt deleted file mode 100644 index 513178f083014e06b80f25b36de807cc4a62e050..0000000000000000000000000000000000000000 --- a/src/main/webapp/js/vsdx/resources/nameU.txt +++ /dev/null @@ -1,207 +0,0 @@ -Swimlane=swimlane;horizontal\=0; -#new additions for custom Electrical set from here -#Fundamental Items -Resistor=mxgraph.electrical.resistors.resistor_1 -Capacitor=mxgraph.electrical.capacitors.capacitor_1 -AC source=mxgraph.electrical.signal_sources.ac_source -DC source=mxgraph.electrical.signal_sources.dc_source_3 -Equipotentiality=mxgraph.electrical.signal_sources.signal_ground -Ground=mxgraph.electrical.signal_sources.protective_earth -Inductor=mxgraph.electrical.inductors.inductor -Crystal=mxgraph.electrical.miscellaneous.crystal_1;direction=south -Antenna=mxgraph.electrical.radio.aerial_-_antenna_2 -Chassis=mxgraph.electrical.miscellaneous.chassis -Circuit breaker=mxgraph.electrical.miscellaneous.circuit_breaker;direction=south -Ideal source=mxgraph.electrical.signal_sources.ideal_source -Generic component=mxgraph.electrical.miscellaneous.generic_component -Accumulator=mxgraph.electrical.miscellaneous.monocell_battery -Alternating pulse=mxgraph.electrical.waveforms.sine_wave -Half inductor=mxgraph.electrical.inductors.half_inductor -Explosive squib=mxgraph.electrical.signal_sources.explosive_squib -Ferrite core=mxgraph.electrical.inductors.ferrite_core -Fuse=mxgraph.electrical.miscellaneous.fuse_4;direction=south -Permanent magnet=mxgraph.electrical.miscellaneous.permanent_magnet -Bell=mxgraph.electrical.electro-mechanical.bell -Magnet core=mxgraph.electrical.inductors.magnetic_core;direction=south -Thermal element=mxgraph.electrical.miscellaneous.thermal_element -Saw tooth=mxgraph.electrical.waveforms.sawtooth -Igniter plug=mxgraph.electrical.miscellaneous.igniter_plug -Loop antenna=mxgraph.electrical.miscellaneous.loop_antenna -Microphone 2=mxgraph.electrical.radio.microphone_2 -Oscillator=mxgraph.electrical.signal_sources.ac_source -Pickup head=mxgraph.electrical.abstract.dac;flipH=1 -Squib ignitor=mxgraph.electrical.miscellaneous.squib_ignitor -Battery=mxgraph.electrical.miscellaneous.monocell_battery;flipH=1 -Pulse=mxgraph.electrical.waveforms.pulse_1 -Speaker=mxgraph.electrical.electro-mechanical.loudspeaker -Transducer=mxgraph.electrical.miscellaneous.transducer -Transducer 2=mxgraph.electrical.miscellaneous.transducer_2 -Thermocouple=mxgraph.electrical.miscellaneous.thermocouple -Thermopile=mxgraph.electrical.miscellaneous.thermopile -Lamp=mxgraph.electrical.opto_electronics.lamp -Lamp 2=mxgraph.electrical.miscellaneous.light_bulb -Indicator=mxgraph.electrical.miscellaneous.indicator -Surge protectors=mxgraph.electrical.miscellaneous.surge_protector -Surge protectors 2=mxgraph.electrical.miscellaneous.surge_protector_2 -Material=rect -Sensing link squib=mxgraph.electrical.miscellaneous.sensing_link_squib -Fluorescent lamp=mxgraph.electrical.miscellaneous.flourescent_lamp -Delay element=mxgraph.electrical.miscellaneous.delay_element -Microphone=mxgraph.electrical.radio.microphone_1;flipH=1 -Step function=mxgraph.electrical.waveforms.step_1 -Buzzer=mxgraph.electrical.radio.buzzer -Current controlled current source=mxgraph.electrical.signal_sources.dependent_source_2;flipV=1 -Voltage controlled current source=mxgraph.electrical.signal_sources.dependent_source_2;flipV=1 -Current controlled voltage source=mxgraph.electrical.signal_sources.dependent_source_3 -Voltage controlled voltage source=mxgraph.electrical.signal_sources.dependent_source_3 -Multicell battery=mxgraph.electrical.miscellaneous.multicell_battery;flipV=1 -Multicell battery with taps=mxgraph.electrical.miscellaneous.multicell_battery_tapped;flipV=1 -Attenuator=mxgraph.electrical.resistors.attenuator -#Rotating Equipment and Mech. Functions -Rotating machine=ellipse -Armature=mxgraph.electrical.rot_mech.armature -#Brush= -Field=mxgraph.electrical.rot_mech.field -Permanent magnet=mxgraph.electrical.miscellaneous.permanent_magnet -Winding connection=mxgraph.electrical.rot_mech.winding_connection -Synchro=mxgraph.electrical.rot_mech.synchro -Brake=trapezoid -Gearing=mxgraph.electrical.rot_mech.gearing -Rotation=mxgraph.electrical.rot_mech.rotation -Clutch=mxgraph.electrical.rot_mech.clutch -Clutch 2=mxgraph.electrical.rot_mech.clutch_2 -Delayed action=mxgraph.electrical.rot_mech.delayed_action -Manual control=mxgraph.electrical.rot_mech.manual_control -Blocking device=mxgraph.electrical.rot_mech.blocking_device -Latching device=mxgraph.electrical.rot_mech.latching_device -Mechanical interlock=mxgraph.electrical.rot_mech.mechanical_interlock -Automatic return=mxgraph.electrical.rot_mech.automatic_return -Detent=mxgraph.electrical.rot_mech.detent -#Switches and Relays -Relay=mxgraph.electrical.electro-mechanical.relay -Relay contacts=mxgraph.electrical.electro-mechanical.relay_contacts -Switch disconnector=mxgraph.electrical.electro-mechanical.switch_disconnector;direction=north -Fuse=mxgraph.electrical.electro-mechanical.fuse;direction=north -Pilot light=mxgraph.electrical.electro-mechanical.pilot_light -Relay coil=mxgraph.electrical.electro-mechanical.relay_coil_2 -Mercury switch=mxgraph.electrical.electro-mechanical.mercury_switch -Mercury switch 2=mxgraph.electrical.electro-mechanical.mercury_switch_2 -Liquid level actuated=mxgraph.electrical.electro-mechanical.liquid_level_actuated -Liquid level actuated 2=mxgraph.electrical.electro-mechanical.liquid_level_actuated_2 -Gas flow actuated=mxgraph.electrical.electro-mechanical.gas_flow_actuated -Flow actuated=mxgraph.electrical.electro-mechanical.flow_actuated -Pressure actuated=mxgraph.electrical.electro-mechanical.pressure_actuated -Temperature actuated=mxgraph.electrical.electro-mechanical.temperature_actuated -Safety interlock=mxgraph.electrical.electro-mechanical.safety_interlock -Temperature switch=mxgraph.electrical.electro-mechanical.temperature_switch -Thermostat=mxgraph.electrical.electro-mechanical.thermostat -Limit switch=mxgraph.electrical.electro-mechanical.limit_switch;direction=north -Circuit breaker=mxgraph.electrical.electro-mechanical.circuit_breaker;direction=north -Selector switch=mxgraph.electrical.electro-mechanical.selector_switch -Shorting selector=mxgraph.electrical.electro-mechanical.shorting_selector -Proximity limit switch=mxgraph.electrical.electro-mechanical.proximity_limit_switch -Inertia switch=mxgraph.electrical.electro-mechanical.inertia_switch -Pushbutton break=mxgraph.electrical.electro-mechanical.pushbutton_break -Manual switch=mxgraph.electrical.electro-mechanical.manual_switch;direction=north -Make contact=mxgraph.electrical.electro-mechanical.make_contact;direction=north -SPST=mxgraph.electrical.electro-mechanical.simple_switch -SPDT=mxgraph.electrical.electro-mechanical.2-way_switch -Break contact=mxgraph.electrical.electro-mechanical.break_contact -Two way contact=mxgraph.electrical.electro-mechanical.two_way_contact;direction=north -Passing make-contact=mxgraph.electrical.electro-mechanical.passing_make_contact;direction=north -Stay put=mxgraph.electrical.electro-mechanical.stay_put;direction=north -DPST=mxgraph.electrical.electro-mechanical.dpst -Spring return=mxgraph.electrical.electro-mechanical.spring_return;direction=north -Spring return 2=mxgraph.electrical.electro-mechanical.spring_return_2 -Spring return 3=mxgraph.electrical.electro-mechanical.spring_return_2;flipV=1 -Limit switch n/o=mxgraph.electrical.electro-mechanical.limit_switch_no -Limit switch n/c=mxgraph.electrical.electro-mechanical.limit_switch_nc -DPDT=mxgraph.electrical.electro-mechanical.dpdt -2 position switch=mxgraph.electrical.electro-mechanical.2_position_switch -3 position switch=mxgraph.electrical.electro-mechanical.3_position_switch -4 position switch=mxgraph.electrical.electro-mechanical.4_position_switch -Pushbutton make=mxgraph.electrical.electro-mechanical.pushbutton_make -Pushbutton 2-circuit=mxgraph.electrical.electro-mechanical.pushbutton_2_circuit -Time delay make=mxgraph.electrical.electro-mechanical.time_delay_make -Time delay break=mxgraph.electrical.electro-mechanical.time_delay_break -Time delay make 2=mxgraph.electrical.electro-mechanical.time_delay_make_2;direction=north -Time delay break 2=mxgraph.electrical.electro-mechanical.time_delay_break_2;direction=north -Isolator=mxgraph.electrical.electro-mechanical.isolator;direction=north -Change-over contact=mxgraph.electrical.electro-mechanical.changeover_contact;direction=north -#Terminals and Connectors -Adapter=mxgraph.electrical.miscellaneous.adapter -Circuit terminal=ellipse;perimeter=ellipsePerimeter -#M/F contact= -M/F contact 2=mxgraph.electrical.miscellaneous.mf_contact_2 -Terminal board=mxgraph.electrical.miscellaneous.terminal_board -Cable termination=mxgraph.electrical.miscellaneous.cable_termination -2-conductor jack=mxgraph.electrical.miscellaneous.2_conductor_jack -3-conductor jack=mxgraph.electrical.miscellaneous.3_conductor_jack -2-conductor plug=mxgraph.electrical.miscellaneous.2_conductor_plug -3-conductor plug=mxgraph.electrical.miscellaneous.3_conductor_plug -Normalled jacks=mxgraph.electrical.miscellaneous.normalled_jacks -Normalled jack=mxgraph.electrical.miscellaneous.normalled_jack -Coaxial outside conductor=mxgraph.electrical.miscellaneous.coaxial_outside_conductor -Coaxial center conductor=mxgraph.electrical.miscellaneous.coaxial_center_conductor -Large D connector=mxgraph.electrical.miscellaneous.large_d_connector -Small D connector=mxgraph.electrical.miscellaneous.small_d_connector -C header connector=mxgraph.electrical.miscellaneous.c_header_connector -AC out=mxgraph.electrical.miscellaneous.ac_out -Shielded jack/plug=mxgraph.electrical.miscellaneous.shielded_jack_plug -Coaxial jack/plug=mxgraph.electrical.miscellaneous.coaxial_jack_plug -F/M 2-conductor 1=mxgraph.electrical.miscellaneous.f_m_2_conductor_1 -F/M 2-conductor 2=mxgraph.electrical.miscellaneous.f_m_2_conductor_2 -F/M 2-conductor 3=mxgraph.electrical.miscellaneous.f_m_2_conductor_3 -F/M 3-conductor 1=mxgraph.electrical.miscellaneous.f_m_3_conductor_1 -F/M 3-conductor 2=mxgraph.electrical.miscellaneous.f_m_3_conductor_2 -F/M 3-conductor 3=mxgraph.electrical.miscellaneous.f_m_3_conductor_3 -F/M 3-conductor 4=mxgraph.electrical.miscellaneous.f_m_3_conductor_4 -F/M 3-conductor 5=mxgraph.electrical.miscellaneous.f_m_3_conductor_5 -#Transformers and Windings -Transformer=mxgraph.electrical.inductors.transformer;direction=north -Magnetic core=mxgraph.electrical.inductors.magnetic_core -Inductor=mxgraph.electrical.inductors.inductor -Choke=mxgraph.electrical.inductors.choke -Variometer=mxgraph.electrical.inductors.variometer -Coaxial choke=mxgraph.electrical.inductors.coaxial_choke -Transductor=mxgraph.electrical.inductors.transductor -Saturating transformer=mxgraph.electrical.inductors.saturating_transformer -Transformer 2=mxgraph.electrical.signal_sources.current_source -Adjustable transformer=mxgraph.electrical.inductors.adjustable_transformer -1-phase induction volt. reg.=mxgraph.electrical.inductors.1_phase_induction_volt_reg -Triplex induction volt. reg.=mxgraph.electrical.inductors.triplex_induction_volt_reg -Induction voltage regulator=mxgraph.electrical.inductors.induction_voltage_regulator -Current transformer 1=mxgraph.electrical.inductors.current_transformer_1 -Current transformer 2=mxgraph.electrical.inductors.current_transformer_2 -Current transformer 3=mxgraph.electrical.inductors.current_transformer_3 -Potential transformer=mxgraph.electrical.inductors.potential_transformer -Potential transformer 2=mxgraph.electrical.signal_sources.current_source;direction=north -Pot. trans. 3 windings=mxgraph.electrical.inductors.pot_trans_3_windings -Outdoor metering device=mxgraph.electrical.inductors.outdoor_metering_device -Linear coupler=mxgraph.electrical.inductors.linear_coupler -#Transmission paths -Bus width=mxgraph.electrical.transmission.bus_width -Straight bus=mxgraph.electrical.transmission.straightBus -Line concentrator=mxgraph.electrical.transmission.line_concentrator -Cable group=mxgraph.electrical.transmission.cable_group -#Lead group= -Overground enclosure=mxgraph.electrical.transmission.overground_enclosure -Optical fiber=mxgraph.electrical.transmission.optical_fiber -Terminal=ellipse -Terminal 3-phase=mxgraph.electrical.transmission.terminal_3_phase -Test point=mxgraph.electrical.transmission.testPoint -Label=ellipse;perimeter=ellipsePerimeter -Line/cable=mxgraph.electrical.transmission.line_cable -Anticreepage device=mxgraph.electrical.transmission.anticreepage_device -#Transmission path= -#Direction of flow= -Elbow bus 1=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;direction=south -Elbow bus 2=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;direction=south;flipV=1 -2-line bus=mxgraph.electrical.transmission.2_line_bus -3-line bus=mxgraph.electrical.transmission.3_line_bus -4-line bus=mxgraph.electrical.transmission.4_line_bus -8-line bus=mxgraph.electrical.transmission.8_line_bus -2-line bus elbow=mxgraph.electrical.transmission.twoLineBusElbow;notch=25 -3-line bus elbow=mxgraph.electrical.transmission.threeLineBusElbow;notch=25 -4-line bus elbow=mxgraph.electrical.transmission.fourLineBusElbow;notch=25 -8-line bus elbow=mxgraph.electrical.transmission.eightLineBusElbow;notch=25 diff --git a/src/main/webapp/package.json b/src/main/webapp/package.json index 072c324b265896635bbb7de5cf0a7a92a0606ebe..a102bddfdddc8a08f4cce28a5667d02018b2e947 100644 --- a/src/main/webapp/package.json +++ b/src/main/webapp/package.json @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/jgraph/draw.io.git" + "url": "git+https://github.com/jgraph/drawio.git" }, "keywords": [ "draw.io", @@ -21,7 +21,7 @@ "bugs": { "url": "https://github.com/jgraph/drawio-desktop/issues" }, - "homepage": "https://github.com/jgraph/draw.io", + "homepage": "https://github.com/jgraph/drawio", "dependencies": { "commander": "^2.12.2", "electron-log": "^2.2.7"