|
|
|
@ -134,8 +134,8 @@ var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456
|
|
|
|
|
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
|
|
|
|
|
String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml4";window.DRAW_MATH_URL=window.DRAW_MATH_URL||"https://www.draw.io/math";
|
|
|
|
|
window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.VIEWER_URL=null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
|
|
|
|
|
window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.mxLoadResources=window.mxLoadResources||!1;
|
|
|
|
|
window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
|
|
|
|
|
window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://www.draw.io/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";
|
|
|
|
|
window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
|
|
|
|
|
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",fil:"Filipino",fr:"Français",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",th:"ไทย",
|
|
|
|
|
ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}
|
|
|
|
|
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
|
|
|
|
@ -8028,7 +8028,7 @@ encodeURIComponent(m.value);a.openLink(b)}catch(p){a.handleError({message:p.mess
|
|
|
|
|
c.length&&(f=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(m.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img"),t.setAttribute("src",Editor.tweetImage),t.setAttribute("width","18"),t.setAttribute("height","18"),t.setAttribute("border","0"),t.style.marginBottom="5px",f.appendChild(t),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",g.appendChild(f))}t=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.appendChild(t);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>c.length?mxClient.IS_SF||null!=document.documentMode?t.className="geBtn gePrimaryBtn":(g.appendChild(f),f.className="geBtn gePrimaryBtn",t.className="geBtn"):(g.appendChild(n),t.className="geBtn",n.className="geBtn gePrimaryBtn");d.appendChild(g);this.container=d};EmbedDialog.showPreviewOption=!0;
|
|
|
|
|
var GoogleSitesDialog=function(a,c){function b(){var a=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;if(B.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<D.length&&(b+="&s="+D);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=k.value&&(b+="&height="+k.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(x.checked?"1":"0");b+="&fit="+(A.checked?"1":"0");
|
|
|
|
|
var GoogleSitesDialog=function(a,c){function b(){var a=null!=v&&null!=v.getTitle()?v.getTitle():this.defaultFilename;if(B.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<H.length&&(b+="&s="+H);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=k.value&&(b+="&height="+k.value);b+="&pan="+(q.checked?"1":"0");b+="&zoom="+(x.checked?"1":"0");b+="&fit="+(A.checked?"1":"0");
|
|
|
|
|
b+="&resize="+(C.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+n;e.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));t.value=b}else v.constructor==DriveFile||v.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=v.getHash().substring(1),b=v.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
|
|
|
|
|
a&&(b+="&title="+encodeURIComponent(a)),""!=k.value&&(a=parseInt(k.value)+parseInt(f.value),b+="&height="+a),t.value=b):t.value=""}var d=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),l=e.view.scale,m=Math.floor(g.x/l-e.view.translate.x),n=Math.floor(g.y/l-e.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var t=document.createElement("input");t.setAttribute("type","text");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";
|
|
|
|
|
d.appendChild(t);mxUtils.br(d);this.init=function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,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;d.appendChild(f);mxUtils.write(d,mxResources.get("height")+":");var k=document.createElement("input");k.setAttribute("type",
|
|
|
|
@ -8036,7 +8036,7 @@ d.appendChild(t);mxUtils.br(d);this.init=function(){t.focus();mxClient.IS_GC||mx
|
|
|
|
|
d.appendChild(p);mxUtils.br(d);mxUtils.write(d,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";d.appendChild(u);mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";d.appendChild(q);mxUtils.write(d,mxResources.get("pan")+" ");var x=document.createElement("input");
|
|
|
|
|
x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="8px";d.appendChild(x);mxUtils.write(d,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);d.appendChild(z);mxUtils.write(d,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";d.appendChild(y);mxUtils.write(d,
|
|
|
|
|
mxResources.get("asNew")+" ");mxUtils.br(d);var C=document.createElement("input");C.setAttribute("type","checkbox");C.setAttribute("checked","checked");C.defaultChecked=!0;C.style.marginLeft="16px";d.appendChild(C);mxUtils.write(d,mxResources.get("resize")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,mxResources.get("fit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft=
|
|
|
|
|
"8px";d.appendChild(B);mxUtils.write(d,mxResources.get("embed")+" ");var D=a.getBasenames().join(";"),v=a.getCurrentFile();mxEvent.addListener(q,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(A,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(k,"change",b);mxEvent.addListener(f,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(p,"change",b);b();
|
|
|
|
|
"8px";d.appendChild(B);mxUtils.write(d,mxResources.get("embed")+" ");var H=a.getBasenames().join(";"),v=a.getCurrentFile();mxEvent.addListener(q,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(A,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(B,"change",b);mxEvent.addListener(k,"change",b);mxEvent.addListener(f,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(p,"change",b);b();
|
|
|
|
|
mxEvent.addListener(t,"click",function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";g.appendChild(l);d.appendChild(g);this.container=d},CreateGraphDialog=function(a,c,b){var d=document.createElement("div");d.style.textAlign=
|
|
|
|
|
"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);d.appendChild(c);var g=new Graph(c);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var l="curved=1;";g.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))})};g.getAllConnectionConstraints=function(){return null};g.connectionHandler.marker.highlight.keepOnTop=
|
|
|
|
@ -8067,7 +8067,7 @@ mxUtils.trim(e.substring(12)),"("==e.charAt(e.length-1)&&(e=e.substring(0,e.last
|
|
|
|
|
e=d.getGraphBounds(),d.setSelectionCells(d.importCells(l,Math.ceil(Math.max(0,e.x/f.scale-f.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(e.y+e.height)/f.scale-f.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"==c){if(0<f.length){d=a.editor.graph;u=new mxCell(f[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;");
|
|
|
|
|
u.vertex=!0;e=d.getPreferredSizeForCell(u);null!=e&&u.geometry.width<e.width+10&&(u.geometry.width=e.width+10);n=[u];if(1<f.length)for(v=1;v<f.length;v++)"--"==f[v]?(e=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;"),e.vertex=!0,u.geometry.height+=e.geometry.height,u.insert(e),n.push(e)):0<f[v].length&&";"!=f[v].charAt(0)&&(m=new mxCell(f[v],
|
|
|
|
|
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;"),m.vertex=!0,e=d.getPreferredSizeForCell(m),null!=e&&m.geometry.width<e.width&&(m.geometry.width=e.width),u.geometry.width=Math.max(u.geometry.width,m.geometry.width),u.geometry.height+=m.geometry.height,u.insert(m),n.push(m));d.getModel().beginUpdate();try{u=d.importCells([u],g.x,g.y)[0],d.fireEvent(new mxEventObject("cellsInserted",
|
|
|
|
|
"cells",[u].concat(u.children)))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}}else{for(var n=function(a){var b=t[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,t[a]=b,l.push(b));return b},t={},l=[],v=0;v<f.length;v++)if(";"!=f[v].charAt(0)){var J=f[v].split("->");if(2<=J.length){var K=n(J[0]),F=n(J[J.length-1]),J=new mxCell(2<J.length?J[1]:"",new mxGeometry);J.edge=!0;K.insertEdge(J,!0);F.insertEdge(J,
|
|
|
|
|
"cells",[u].concat(u.children)))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}}else{for(var n=function(a){var b=t[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,t[a]=b,l.push(b));return b},t={},l=[],v=0;v<f.length;v++)if(";"!=f[v].charAt(0)){var J=f[v].split("->");if(2<=J.length){var K=n(J[0]),E=n(J[J.length-1]),J=new mxCell(2<J.length?J[1]:"",new mxGeometry);J.edge=!0;K.insertEdge(J,!0);E.insertEdge(J,
|
|
|
|
|
!1);l.push(J)}}if(0<l.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);d=new Graph(f);d.getModel().beginUpdate();try{l=d.importCells(l);for(v=0;v<l.length;v++)d.getModel().isVertex(l[v])&&(e=d.getPreferredSizeForCell(l[v]),l[v].geometry.width=Math.max(l[v].geometry.width,e.width),l[v].geometry.height=Math.max(l[v].geometry.height,e.height));u=new mxFastOrganicLayout(d);u.disableEdgeStyle=!1;u.forceConstant=120;u.execute(d.getDefaultParent());m=new mxParallelEdgeLayout(d);
|
|
|
|
|
m.spacing=20;m.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();n=[];a.editor.graph.getModel().beginUpdate();try{n=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(n);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();f.parentNode.removeChild(f)}}}function e(){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 Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==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":
|
|
|
|
@ -8076,35 +8076,35 @@ m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setNa
|
|
|
|
|
n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=b&&m.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&n.setAttribute("selected","selected");var t=document.createElement("option");t.setAttribute("value","plantUmlPng");mxUtils.write(t,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
|
|
|
|
|
")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(m.appendChild(n),m.appendChild(t),m.appendChild(f));var k=e();l.value=k;c.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 b=new FileReader;b.onload=function(a){l.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(m);mxEvent.addListener(m,"change",function(){var a=e();if(0==l.value.length||l.value==k)k=a,l.value=k});b=mxUtils.button(mxResources.get("close"),function(){l.value==k?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("insert"),
|
|
|
|
|
function(){a.hideDialog();d(l.value,m.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,e,g,l,m,n,t,f,k,p,u,q,x,z){function y(){var a=!0;if(null!=U)for(;J<U.length&&(a||0!=mxUtils.mod(J,30));)a=U[J++],B(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg),a=!1}function C(){if(Y)b||a.hideDialog(),u(Y,Z,G.value);else if(d)b||a.hideDialog(),d(ha,G.value);else{var c=
|
|
|
|
|
G.value;null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,ha,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function A(a,b,c,f,d){null!=ea&&(ea.style.backgroundColor="transparent",ea.style.border="1px solid transparent");E.removeAttribute("disabled");ha=b;V=c;ea=a;Y=f;Z=d;ea.style.backgroundColor=m;ea.style.border=n}function B(b,c,f,d,k,p,g,e,v,u){var q=document.createElement("div");q.className=
|
|
|
|
|
function(){a.hideDialog();d(l.value,m.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,e,g,l,m,n,t,f,k,p,u,q,x,z){function y(){var a=!0;if(null!=U)for(;J<U.length&&(a||0!=mxUtils.mod(J,30));)a=U[J++],B(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview,a.noImg),a=!1}function C(){if(Y)b||a.hideDialog(),u(Y,Z,F.value);else if(d)b||a.hideDialog(),d(ha,F.value);else{var c=
|
|
|
|
|
F.value;null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,ha,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function A(a,b,c,f,d){null!=ea&&(ea.style.backgroundColor="transparent",ea.style.border="1px solid transparent");D.removeAttribute("disabled");ha=b;V=c;ea=a;Y=f;Z=d;ea.style.backgroundColor=m;ea.style.border=n}function B(b,c,f,d,k,p,g,e,v,u){var q=document.createElement("div");q.className=
|
|
|
|
|
"geTemplate";q.style.height=ga+"px";q.style.width=Q+"px";null!=d&&0<d.length&&q.setAttribute("title",d);if(null!=p)q.style.backgroundImage="url("+p+")",q.style.backgroundSize="contain",q.style.backgroundPosition="center center",q.style.backgroundRepeat="no-repeat",mxEvent.addListener(q,"click",function(a){A(q,null,null,b,g)}),mxEvent.addListener(q,"dblclick",function(a){C()});else if(!u&&null!=b&&0<b.length){f=v||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";q.style.backgroundImage="url("+f+
|
|
|
|
|
")";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";var l=!1;mxEvent.addListener(q,"click",function(f){E.setAttribute("disabled","disabled");q.style.backgroundColor="transparent";q.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.editor.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;F.spin(M);mxUtils.get(f,mxUtils.bind(this,function(a){F.stop();200<=a.getStatus()&&299>=a.getStatus()&&(A(q,a.getText(),c),l&&C())}))});
|
|
|
|
|
mxEvent.addListener(q,"dblclick",function(a){l=!0})}else q.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(f,null,f)+"</td></tr></table>",k&&A(q),null!=e?mxEvent.addListener(q,"click",e):(mxEvent.addListener(q,"click",function(a){A(q,null,null,b,g)}),mxEvent.addListener(q,"dblclick",function(a){C()}));M.appendChild(q)}function D(){N&&(N=!1,mxEvent.addListener(M,"scroll",function(a){M.scrollTop+M.clientHeight>=
|
|
|
|
|
")";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";var l=!1;mxEvent.addListener(q,"click",function(f){D.setAttribute("disabled","disabled");q.style.backgroundColor="transparent";q.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.editor.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;E.spin(M);mxUtils.get(f,mxUtils.bind(this,function(a){E.stop();200<=a.getStatus()&&299>=a.getStatus()&&(A(q,a.getText(),c),l&&C())}))});
|
|
|
|
|
mxEvent.addListener(q,"dblclick",function(a){l=!0})}else q.innerHTML='<table width="100%" height="100%" style="line-height:1em;word-break: break-all;"><tr><td align="center" valign="middle">'+mxResources.get(f,null,f)+"</td></tr></table>",k&&A(q),null!=e?mxEvent.addListener(q,"click",e):(mxEvent.addListener(q,"click",function(a){A(q,null,null,b,g)}),mxEvent.addListener(q,"dblclick",function(a){C()}));M.appendChild(q)}function H(){N&&(N=!1,mxEvent.addListener(M,"scroll",function(a){M.scrollTop+M.clientHeight>=
|
|
|
|
|
M.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<aa){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));O.appendChild(b);for(var c in ca){var f=document.createElement("div"),b=c,d=ca[c];18<b.length&&(b=b.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",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=t&&(f.style.padding=t);O.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=l,M.scrollTop=0,M.innerHTML="",J=0,U=ca[b],L=null,y())})})(c,f)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");O.appendChild(b)}for(c in R)f=document.createElement("div"),
|
|
|
|
|
b=mxResources.get(c),d=R[c],null==b&&(b=c.substring(0,1).toUpperCase()+c.substring(1)),18<b.length&&(b=b.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",b+" ("+d.length+")"),mxUtils.write(f,f.getAttribute("title")),null!=t&&(f.style.padding=t),O.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=l,U=d),function(b,c){mxEvent.addListener(f,"click",
|
|
|
|
|
function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=l,M.scrollTop=0,M.innerHTML="",J=0,U=R[b],L=null,y())})}(c,f);y()}b=null!=b?b:!0;e=null!=e?e:!1;l=null!=l?l:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var v=document.createElement("div");v.style.height="100%";var K=document.createElement("div");K.style.whiteSpace="nowrap";K.style.height="46px";b&&v.appendChild(K);var H=document.createElement("img");H.setAttribute("border",
|
|
|
|
|
"0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.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";
|
|
|
|
|
!c&&b&&K.appendChild(H);b&&mxUtils.write(K,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?H=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?H=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?H=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?H=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(H=a.trello.extension);var G=
|
|
|
|
|
document.createElement("input");G.setAttribute("value",a.defaultFilename+H);G.style.marginLeft="10px";G.style.width=c?"220px":"430px";this.init=function(){b&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?G.select():document.execCommand("selectAll",!1,null))};b&&(K.appendChild(G),null!=a.editor.fileExtensions&&(H=FilenameDialog.createTypeHint(a,G,a.editor.fileExtensions),H.style.marginTop="12px",K.appendChild(H)));var K=!1,J=0,F=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}),E=mxUtils.button(x||mxResources.get("create"),function(){E.setAttribute("disabled","disabled");C();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(k||p){var I=[],L=null,P=null,T=null,W=function(a){E.setAttribute("disabled","disabled");for(var b=0;b<I.length;b++)I[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},K=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height=
|
|
|
|
|
"30px";v.appendChild(x);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){O.style.display="";M.style.left="160px";W(0);M.scrollTop=0;M.innerHTML="";J=0;L!=U&&(U=L,R=P,aa=T,O.innerHTML="",D(),L=null)});I.push(H);x.appendChild(H);var X=function(a){O.style.display="none";M.style.left="30px";W(a?-1:1);null==L&&(L=U);M.scrollTop=0;M.innerHTML="";F.spin(M);var b=function(a,b,c){J=0;F.stop();U=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)M.innerHTML=b;else if(0==a.length&&0==
|
|
|
|
|
f)M.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(M.innerHTML="",0<f){O.style.display="";M.style.left="160px";O.innerHTML="";aa=0;R={"draw.io":a};for(d in c)R[d]=c[d];D()}else y()};a?p(S.value,b):k(b)};k&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){X()}),x.appendChild(H),I.push(H));if(p){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");x.appendChild(H);
|
|
|
|
|
var S=document.createElement("input");S.style.marginRight="10px";S.style.marginLeft="10px";S.style.width="220px";mxEvent.addListener(S,"keypress",function(a){13==a.keyCode&&X(!0)});x.appendChild(S);H=mxUtils.button(mxResources.get("search"),function(){X(!0)});H.className="geBtn";x.appendChild(H)}W(0)}var V=null,ha=null,ea=null,Y=null,Z=null,M=document.createElement("div");M.style.border="1px solid #d3d3d3";M.style.position="absolute";M.style.left="160px";M.style.right="34px";K=(b?72:40)+(K?30:0);
|
|
|
|
|
function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=l,M.scrollTop=0,M.innerHTML="",J=0,U=R[b],L=null,y())})}(c,f);y()}b=null!=b?b:!0;e=null!=e?e:!1;l=null!=l?l:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var v=document.createElement("div");v.style.height="100%";var K=document.createElement("div");K.style.whiteSpace="nowrap";K.style.height="46px";b&&v.appendChild(K);var G=document.createElement("img");G.setAttribute("border",
|
|
|
|
|
"0");G.setAttribute("align","absmiddle");G.style.width="40px";G.style.height="40px";G.style.marginRight="10px";G.style.paddingBottom="4px";G.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";
|
|
|
|
|
!c&&b&&K.appendChild(G);b&&mxUtils.write(K,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");G=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?G=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?G=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?G=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?G=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(G=a.trello.extension);var F=
|
|
|
|
|
document.createElement("input");F.setAttribute("value",a.defaultFilename+G);F.style.marginLeft="10px";F.style.width=c?"220px":"430px";this.init=function(){b&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null))};b&&(K.appendChild(F),null!=a.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(a,F,a.editor.fileExtensions),G.style.marginTop="12px",K.appendChild(G)));var K=!1,J=0,E=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}),D=mxUtils.button(x||mxResources.get("create"),function(){D.setAttribute("disabled","disabled");C();D.removeAttribute("disabled")});D.className="geBtn gePrimaryBtn";if(k||p){var I=[],L=null,P=null,T=null,W=function(a){D.setAttribute("disabled","disabled");for(var b=0;b<I.length;b++)I[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},K=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height=
|
|
|
|
|
"30px";v.appendChild(x);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){O.style.display="";M.style.left="160px";W(0);M.scrollTop=0;M.innerHTML="";J=0;L!=U&&(U=L,R=P,aa=T,O.innerHTML="",H(),L=null)});I.push(G);x.appendChild(G);var X=function(a){O.style.display="none";M.style.left="30px";W(a?-1:1);null==L&&(L=U);M.scrollTop=0;M.innerHTML="";E.spin(M);var b=function(a,b,c){J=0;E.stop();U=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)M.innerHTML=b;else if(0==a.length&&0==
|
|
|
|
|
f)M.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(M.innerHTML="",0<f){O.style.display="";M.style.left="160px";O.innerHTML="";aa=0;R={"draw.io":a};for(d in c)R[d]=c[d];H()}else y()};a?p(S.value,b):k(b)};k&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){X()}),x.appendChild(G),I.push(G));if(p){G=document.createElement("span");G.style.marginLeft="10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");x.appendChild(G);
|
|
|
|
|
var S=document.createElement("input");S.style.marginRight="10px";S.style.marginLeft="10px";S.style.width="220px";mxEvent.addListener(S,"keypress",function(a){13==a.keyCode&&X(!0)});x.appendChild(S);G=mxUtils.button(mxResources.get("search"),function(){X(!0)});G.className="geBtn";x.appendChild(G)}W(0)}var V=null,ha=null,ea=null,Y=null,Z=null,M=document.createElement("div");M.style.border="1px solid #d3d3d3";M.style.position="absolute";M.style.left="160px";M.style.right="34px";K=(b?72:40)+(K?30:0);
|
|
|
|
|
M.style.top=K+"px";M.style.bottom="68px";M.style.margin="6px 0 0 -1px";M.style.padding="6px";M.style.overflow="auto";var O=document.createElement("div");O.style.cssText="position:absolute;left:30px;width:128px;top:"+K+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var ga=140,Q=140,R={},ca={},aa=0,N=!0;R.basic=[{title:"blankDiagram",select:!0}];var U=R.basic;if(!c){var ba=function(){mxUtils.get(fa,function(a){if(!da){da=!0;for(a=a.getXml().documentElement.firstChild;null!=
|
|
|
|
|
a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=a.getAttribute("section");null==c&&(c=b.indexOf("/"),c=b.substring(0,c));b=R[c];null==b&&(b=[],R[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview")})}}a=a.nextSibling}F.stop();D()}})};v.appendChild(O);v.appendChild(M);var da=!1,fa=f;/^https?:\/\//.test(fa)&&!a.editor.isCorsEnabledForUrl(fa)&&(fa=PROXY_URL+
|
|
|
|
|
"?url="+encodeURIComponent(fa));F.spin(M);null!=z?z(function(a,b){ca=a;T=aa=b;ba()},ba):ba();P=R}mxEvent.addListener(G,"keypress",function(b){a.dialog.container.firstChild==v&&13==b.keyCode&&C()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";c||a.isOffline()||!b||null!=d||e||(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));z=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});z.className="geBtn";!a.editor.cancelFirst||e&&null==g||f.appendChild(z);c||"1"==urlParams.embed||e||(c=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(G.value)+"&create="+encodeURIComponent(b)),
|
|
|
|
|
a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=a.getAttribute("section");null==c&&(c=b.indexOf("/"),c=b.substring(0,c));b=R[c];null==b&&(b=[],R[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview")})}}a=a.nextSibling}E.stop();H()}})};v.appendChild(O);v.appendChild(M);var da=!1,fa=f;/^https?:\/\//.test(fa)&&!a.editor.isCorsEnabledForUrl(fa)&&(fa=PROXY_URL+
|
|
|
|
|
"?url="+encodeURIComponent(fa));E.spin(M);null!=z?z(function(a,b){ca=a;T=aa=b;ba()},ba):ba();P=R}mxEvent.addListener(F,"keypress",function(b){a.dialog.container.firstChild==v&&13==b.keyCode&&C()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";c||a.isOffline()||!b||null!=d||e||(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));z=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});z.className="geBtn";!a.editor.cancelFirst||e&&null==g||f.appendChild(z);c||"1"==urlParams.embed||e||(c=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(F.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()}),c.className="geBtn",f.appendChild(c));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);
|
|
|
|
|
a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),q.className="geBtn",f.appendChild(q));f.appendChild(E);a.editor.cancelFirst||null!=d||e&&null==g||f.appendChild(z);v.appendChild(f);this.container=v},CreateDialog=function(a,c,b,d,e,g,l,m,n,t,f,k,p,u,q,x){function z(b,f,d,p){function g(){mxEvent.addListener(e,"click",function(){var b=d;if(l){var f=A.value,k=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>k){var b=null!=b?b:v.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=
|
|
|
|
|
a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),q.className="geBtn",f.appendChild(q));f.appendChild(D);a.editor.cancelFirst||null!=d||e&&null==g||f.appendChild(z);v.appendChild(f);this.container=v},CreateDialog=function(a,c,b,d,e,g,l,m,n,t,f,k,p,u,q,x){function z(b,f,d,p){function g(){mxEvent.addListener(e,"click",function(){var b=d;if(l){var f=A.value,k=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>k){var b=null!=b?b:v.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=
|
|
|
|
|
a.gitHub.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=k&&(f=f.substring(0,k));A.value=f+p}}y(d)})}var e=document.createElement("a");e.style.overflow="hidden";var u=document.createElement("img");u.src=b;u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";e.style.display=mxClient.IS_QUIRKS?
|
|
|
|
|
"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding="8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(u);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var q=document.createElement("div");e.appendChild(q);mxUtils.write(q,f);if(null!=p&&null==a[p]){u.style.visibility="hidden";mxUtils.setOpacity(q,10);var x=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});x.spin(e);var m=window.setTimeout(function(){null==a[p]&&(x.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(m),mxUtils.setOpacity(q,100),u.style.visibility="",x.stop(),g())}))}else g();B.appendChild(e);++D==k&&(mxUtils.br(B),D=0)}function y(c){var f=A.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),b(f,c)}l=null!=l?l:!0;m=null!=m?m:!0;k=null!=
|
|
|
|
|
color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});x.spin(e);var m=window.setTimeout(function(){null==a[p]&&(x.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(m),mxUtils.setOpacity(q,100),u.style.visibility="",x.stop(),g())}))}else g();B.appendChild(e);++H==k&&(mxUtils.br(B),H=0)}function y(c){var f=A.value;if(null==c||null!=f&&0<f.length)a.hideDialog(),b(f,c)}l=null!=l?l:!0;m=null!=m?m:!0;k=null!=
|
|
|
|
|
k?k:4;g=document.createElement("div");g.style.whiteSpace="nowrap";null==d&&a.addLanguageMenu(g);var C=document.createElement("h2");mxUtils.write(C,e||mxResources.get("create"));C.style.marginTop="0px";C.style.marginBottom="24px";g.appendChild(C);mxUtils.write(g,mxResources.get("filename")+":");var A=document.createElement("input");A.setAttribute("value",c);A.style.width="280px";A.style.marginLeft="10px";A.style.marginBottom="20px";A.style.maxWidth="70%";this.init=function(){A.focus();mxClient.IS_GC||
|
|
|
|
|
mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?A.select():document.execCommand("selectAll",!1,null)};g.appendChild(A);null!=x&&g.appendChild(FilenameDialog.createTypeHint(a,A,x));null!=p&&null!=u&&"image/"==u.substring(0,6)&&(A.style.width="160px",e=null,"image/svg+xml"==u&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(p),p=e.getElementsByTagName("svg")[0],u=parseInt(p.getAttribute("width")),q=parseInt(p.getAttribute("height")),p.setAttribute("viewBox","0 0 "+
|
|
|
|
|
u+" "+q),p.setAttribute("width","120px"),p.setAttribute("height","80px")):(e=document.createElement("img"),e.setAttribute("src","data:"+u+(q?";base64,":";utf8,")+p)),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%)"),g.appendChild(e),n&&Editor.popupsAllowed&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){y("_blank")})));mxUtils.br(g);var B=document.createElement("div");
|
|
|
|
|
B.style.textAlign="center";var D=0;B.style.marginTop="6px";g.appendChild(B);var v=document.createElement("select");v.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),v.appendChild(p),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),
|
|
|
|
|
B.style.textAlign="center";var H=0;B.style.marginTop="6px";g.appendChild(B);var v=document.createElement("select");v.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),v.appendChild(p),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),
|
|
|
|
|
p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")),v.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),v.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),
|
|
|
|
|
z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),v.appendChild(p),z(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.TrelloClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),v.appendChild(p),
|
|
|
|
|
z(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),v.appendChild(p),a.mode!=App.MODE_DEVICE&&m||p.setAttribute("selected","selected"),f&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),
|
|
|
|
@ -8117,8 +8117,8 @@ null,!0)});m.className="geBtn gePrimaryBtn";m.style.width=l.style.width;g.append
|
|
|
|
|
n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display=mxClient.IS_VML?"inline":"inline-block";b.style.top=(mxClient.IS_VML?0:3)+"px";b.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(b,"click",function(){n.value="";n.focus()});c.appendChild(n);c.appendChild(b);
|
|
|
|
|
m.appendChild(c);var t=function(b,c,f,k){var p="data:"==b.substring(0,5);!a.isOffline()||p&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(p){a.spinner.stop();a.hideDialog();var e=!1===k?1:null!=c&&null!=f?Math.max(c/p.width,f/p.height):Math.min(1,Math.min(520/p.width,520/p.height));g&&(b=a.convertDataUri(b));d(b,Math.round(Number(p.width)*e),Math.round(Number(p.height)*e))},function(){a.spinner.stop();d(null);a.showError(mxResources.get("error"),
|
|
|
|
|
mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),d(b)):(b=a.convertDataUri(b),c=null==c?120:c,f=null==f?100:f,a.hideDialog(),d(b,c,f))},f=function(b,c){if(null!=b){var f=e?null:l.getModel().getGeometry(l.getSelectionCell());null!=f?t(b,f.width,f.height,c):t(b,null,null,c)}else a.hideDialog(),d(null)};this.init=function(){n.focus();if(Graph.fileSupport){n.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=m.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(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.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,k,p,g,e){f(a,
|
|
|
|
|
e)},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)&&f(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};b=document.createElement("div");b.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";b.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),
|
|
|
|
|
function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));f.stopPropagation();f.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,k,p,e,g){f(a,
|
|
|
|
|
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(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)&&f(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};b=document.createElement("div");b.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";b.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),
|
|
|
|
|
function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);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&&null==document.documentMode){if(null==a.imgDlgFileInputElt){var k=document.createElement("input");k.setAttribute("multiple","multiple");k.setAttribute("type","file");mxEvent.addListener(k,
|
|
|
|
|
"change",function(b){a.importFiles(k.files,0,0,a.maxImageSize,function(a,b,c,d,k,p){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0);k.value=""});k.style.display="none";document.body.appendChild(k);a.imgDlgFileInputElt=k}var p=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});p.className="geBtn";b.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 b=new CropImageDialog(a,n.value,function(a){n.value=a});a.showDialog(b.container,200,185,!0,!0);b.init()}),p.className="geBtn",b.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 b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
|
|
|
|
@ -8151,22 +8151,22 @@ var RevisionDialog=function(a,c,b){var d=document.createElement("div"),e=documen
|
|
|
|
|
"376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);d.appendChild(l);var m=new Graph(l);m.setTooltips(!1);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,t=null,f=0,k=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[f]?t[f].getAttribute("name"):"pagenumber"==a?f+1:k.apply(this,arguments)};m.getLinkForCell=function(){return null};
|
|
|
|
|
Editor.MathJaxRender&&m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){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(),q=null,x=null,z=null,y=null,C=mxUtils.button("",function(){null!=z&&m.zoomIn()});C.className="geSprite geSprite-zoomin";C.setAttribute("title",
|
|
|
|
|
mxResources.get("zoomIn"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var A=mxUtils.button("",function(){null!=z&&m.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var B=mxUtils.button("",function(){null!=z&&(m.maxFitScale=8,m.fit(8),
|
|
|
|
|
m.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var D=mxUtils.button("",function(){null!=z&&(m.zoomActual(),m.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");
|
|
|
|
|
mxUtils.setOpacity(D,20);var v=document.createElement("div");v.style.position="absolute";v.style.textAlign="right";v.style.color="gray";v.style.marginTop="10px";v.style.backgroundColor="transparent";v.style.top="440px";v.style.right="32px";v.style.maxWidth="380px";v.style.cursor="default";var K=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var b=mxUtils.getXml(z.documentElement),c=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(b="undefined"===
|
|
|
|
|
typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});K.className="geBtn";K.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.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)})})});H.className="geBtn";H.setAttribute("disabled","disabled");var G=document.createElement("select");G.setAttribute("disabled","disabled");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";G.style.display="none";var J=null;mxEvent.addListener(G,"change",function(a){null!=J&&(J(a),mxEvent.consume(a))});
|
|
|
|
|
var F=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),a.openLink(a.getUrl(),null,!0))});F.className="geBtn";F.setAttribute("disabled","disabled");null!=b&&(F.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=x&&a.openLink(x.getUrl(G.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled","disabled");null!=b&&(E.style.display=
|
|
|
|
|
"none",H.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 L=null;if(null!=c&&0<c.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 T=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var X=c.length-1;0<=X;X--){var S=function(b){var d=new Date(b.modifiedDate),k=null;if(0<=d.getTime()){var g=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var q=function(a){null!=a&&(a=x(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));
|
|
|
|
|
return a},x=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};G.style.display="none";G.innerHTML="";z=e;y=c;t=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");t=[];for(c=0;c<e.length;c++)t.push(e[c]);f=Math.min(n,t.length-1);0<t.length&&q(t[f]);if(1<t.length)for(G.removeAttribute("disabled"),
|
|
|
|
|
G.style.display="",c=0;c<t.length;c++)e=document.createElement("option"),mxUtils.write(e,t[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),G.appendChild(e);J=function(){try{var b=parseInt(G.value);q(t[b]);f=n=b}catch(aa){G.value=n,a.handleError(aa)}}}else x(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");v.innerHTML="";mxUtils.write(v,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+
|
|
|
|
|
d.toLocaleTimeString());v.setAttribute("title",k.getAttribute("title"));C.removeAttribute("disabled");A.removeAttribute("disabled");B.removeAttribute("disabled");D.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&H.removeAttribute("disabled"),K.removeAttribute("disabled"),E.removeAttribute("disabled"),F.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(D,60)}else G.style.display="none",G.innerHTML=
|
|
|
|
|
"",v.innerHTML="",mxUtils.write(v,mxResources.get("errorLoadingFile"))},k=document.createElement("tr");k.style.borderBottom="1px solid lightGray";k.style.fontSize="12px";k.style.cursor="pointer";var e=document.createElement("td");e.style.padding="6px";e.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(e,mxResources.get("current")):d.toDateString()===W?mxUtils.write(e,d.toLocaleTimeString()):mxUtils.write(e,d.toLocaleDateString()+" "+d.toLocaleTimeString());k.appendChild(e);k.setAttribute("title",
|
|
|
|
|
d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(k,"click",function(a){x!=b&&(p.stop(),null!=q&&(q.style.backgroundColor=""),x=b,q=k,q.style.backgroundColor="#ebf2f9",y=z=null,v.removeAttribute("title"),v.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),l.style.backgroundColor="#ffffff",m.getModel().clear(),H.setAttribute("disabled",
|
|
|
|
|
"disabled"),K.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(D,20),p.spin(l),b.getXml(function(a){if(x==b)try{g(a)}catch(ga){v.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
|
|
|
|
|
": "+ga.message)}},function(a){p.stop();G.style.display="none";G.innerHTML="";v.innerHTML="";mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(k,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(k)}return k}(c[X]);null!=S&&X==c.length-1&&(L=S)}P.appendChild(T);g.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(g,mxResources.get("notAvailable"))):(l.style.display="none",I.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";I.appendChild(G);I.appendChild(C);I.appendChild(A);I.appendChild(D);I.appendChild(B);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(K),
|
|
|
|
|
e.appendChild(F),e.appendChild(H),e.appendChild(E)):(e.appendChild(K),e.appendChild(F),e.appendChild(H),e.appendChild(E),e.appendChild(g));d.appendChild(e);d.appendChild(I);d.appendChild(v);this.container=d},DraftDialog=function(a,c,b,d,e,g,l,m){var n=document.createElement("div"),t=document.createElement("div");t.style.marginTop="0px";t.style.whiteSpace="nowrap";t.style.overflow="auto";mxUtils.write(t,c);n.appendChild(t);var f=document.createElement("div");f.style.position="absolute";f.style.border=
|
|
|
|
|
m.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var H=mxUtils.button("",function(){null!=z&&(m.zoomActual(),m.center())});H.className="geSprite geSprite-actualsize";H.setAttribute("title",mxResources.get("actualSize"));H.style.outline="none";H.style.border="none";H.style.margin="2px";H.setAttribute("disabled","disabled");
|
|
|
|
|
mxUtils.setOpacity(H,20);var v=document.createElement("div");v.style.position="absolute";v.style.textAlign="right";v.style.color="gray";v.style.marginTop="10px";v.style.backgroundColor="transparent";v.style.top="440px";v.style.right="32px";v.style.maxWidth="380px";v.style.cursor="default";var K=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var b=mxUtils.getXml(z.documentElement),c=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):(b="undefined"===
|
|
|
|
|
typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});K.className="geBtn";K.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.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)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var J=null;mxEvent.addListener(F,"change",function(a){null!=J&&(J(a),mxEvent.consume(a))});
|
|
|
|
|
var E=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),a.openLink(a.getUrl(),null,!0))});E.className="geBtn";E.setAttribute("disabled","disabled");null!=b&&(E.style.display="none");var D=mxUtils.button(mxResources.get("show"),function(){null!=x&&a.openLink(x.getUrl(F.selectedIndex))});D.className="geBtn gePrimaryBtn";D.setAttribute("disabled","disabled");null!=b&&(D.style.display=
|
|
|
|
|
"none",G.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 L=null;if(null!=c&&0<c.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 T=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var X=c.length-1;0<=X;X--){var S=function(b){var d=new Date(b.modifiedDate),k=null;if(0<=d.getTime()){var e=function(c){p.stop();var g=mxUtils.parseXml(c),e=a.editor.extractGraphModel(g.documentElement,!0);if(null!=e){var q=function(a){null!=a&&(a=x(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));
|
|
|
|
|
return a},x=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};F.style.display="none";F.innerHTML="";z=g;y=c;t=parseSelectFunction=null;f=0;if("mxfile"==e.nodeName){g=e.getElementsByTagName("diagram");t=[];for(c=0;c<g.length;c++)t.push(g[c]);f=Math.min(n,t.length-1);0<t.length&&q(t[f]);if(1<t.length)for(F.removeAttribute("disabled"),
|
|
|
|
|
F.style.display="",c=0;c<t.length;c++)g=document.createElement("option"),mxUtils.write(g,t[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),g.setAttribute("value",c),c==f&&g.setAttribute("selected","selected"),F.appendChild(g);J=function(){try{var b=parseInt(F.value);q(t[b]);f=n=b}catch(aa){F.value=n,a.handleError(aa)}}}else x(e);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");v.innerHTML="";mxUtils.write(v,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+
|
|
|
|
|
d.toLocaleTimeString());v.setAttribute("title",k.getAttribute("title"));C.removeAttribute("disabled");A.removeAttribute("disabled");B.removeAttribute("disabled");H.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),K.removeAttribute("disabled"),D.removeAttribute("disabled"),E.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(H,60)}else F.style.display="none",F.innerHTML=
|
|
|
|
|
"",v.innerHTML="",mxUtils.write(v,mxResources.get("errorLoadingFile"))},k=document.createElement("tr");k.style.borderBottom="1px solid lightGray";k.style.fontSize="12px";k.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(g,mxResources.get("current")):d.toDateString()===W?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());k.appendChild(g);k.setAttribute("title",
|
|
|
|
|
d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(k,"click",function(a){x!=b&&(p.stop(),null!=q&&(q.style.backgroundColor=""),x=b,q=k,q.style.backgroundColor="#ebf2f9",y=z=null,v.removeAttribute("title"),v.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),l.style.backgroundColor="#ffffff",m.getModel().clear(),G.setAttribute("disabled",
|
|
|
|
|
"disabled"),K.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(H,20),p.spin(l),b.getXml(function(a){if(x==b)try{e(a)}catch(ga){v.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
|
|
|
|
|
": "+ga.message)}},function(a){p.stop();F.style.display="none";F.innerHTML="";v.innerHTML="";mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(k,"dblclick",function(a){D.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(k)}return k}(c[X]);null!=S&&X==c.length-1&&(L=S)}P.appendChild(T);g.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(g,mxResources.get("notAvailable"))):(l.style.display="none",I.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";I.appendChild(F);I.appendChild(C);I.appendChild(A);I.appendChild(H);I.appendChild(B);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(K),
|
|
|
|
|
e.appendChild(E),e.appendChild(G),e.appendChild(D)):(e.appendChild(K),e.appendChild(E),e.appendChild(G),e.appendChild(D),e.appendChild(g));d.appendChild(e);d.appendChild(I);d.appendChild(v);this.container=d},DraftDialog=function(a,c,b,d,e,g,l,m){var n=document.createElement("div"),t=document.createElement("div");t.style.marginTop="0px";t.style.whiteSpace="nowrap";t.style.overflow="auto";mxUtils.write(t,c);n.appendChild(t);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 k=new Graph(f);k.setEnabled(!1);k.setPanning(!0);k.panningHandler.ignoreCell=!0;k.panningHandler.useLeftButtonForPanning=!0;k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;c=mxUtils.parseXml(b);var p=a.editor.extractGraphModel(c.documentElement,!0),u=0,q=null,x=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==
|
|
|
|
|
a&&null!=q&&null!=q[u]?q[u].getAttribute("name"):"pagenumber"==a?u+1:x.apply(this,arguments)};k.getLinkForCell=function(){return null};c=mxUtils.button("",function(){k.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);b=mxUtils.button("",function(){k.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline=
|
|
|
|
|
"none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);t=mxUtils.button("",function(){k.maxFitScale=8;k.fit(8);k.center()});t.className="geSprite geSprite-fit";t.setAttribute("title",mxResources.get("fit"));t.style.outline="none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);var z=mxUtils.button("",function(){k.zoomActual();k.center()});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";
|
|
|
|
@ -8223,25 +8223,25 @@ mxResources.get("height")+":");var z=document.createElement("input");z.setAttrib
|
|
|
|
|
mxConstants.STYLE_ROTATION,0):"";t.appendChild(y);m.appendChild(n);m.appendChild(t);l.appendChild(m);g.appendChild(l);e.appendChild(g);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var C=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var e=b.getCellGeometry(c[d]);null!=e&&(e=e.clone(),b.isCellMovable(c[d])&&(e.relative=f.checked,0<mxUtils.trim(k.value).length&&(e.x=Number(k.value)),
|
|
|
|
|
0<mxUtils.trim(p.value).length&&(e.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.x=Number(u.value)),0<mxUtils.trim(q.value).length&&(null==e.offset&&(e.offset=new mxPoint),e.offset.y=Number(q.value))),b.isCellResizable(c[d])&&(0<mxUtils.trim(x.value).length&&(e.width=Number(x.value)),0<mxUtils.trim(z.value).length&&(e.height=Number(z.value))),b.getModel().setGeometry(c[d],e));0<mxUtils.trim(y.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,
|
|
|
|
|
Number(y.value),[c[d]])}}finally{b.getModel().endUpdate()}});C.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&C.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(d),g.appendChild(C)):(g.appendChild(C),g.appendChild(d));e.appendChild(g);this.container=e},LibraryDialog=function(a,c,b,d,e,g){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=
|
|
|
|
|
u;)a=a.parentNode;var b=null;if(null!=a)for(var c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,d,k,p,e,g,v,n){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==x[b]){var y=function(){L.innerHTML="";L.style.cursor="pointer";L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";mxUtils.write(L,null!=G.title&&0<G.title.length?G.title:mxResources.get("untitled"));L.style.color=null==G.title||0==G.title.length?"#d0d0d0":""};u.style.backgroundImage=
|
|
|
|
|
"";q.style.display="none";var K=p,t=e;if(p>a.maxImageSize||e>a.maxImageSize){var D=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=D;e*=D}K>t?(t=Math.round(100*t/K),K=100):(K=Math.round(100*K/t),t=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 E=document.createElement("img");E.setAttribute("src",A.convert(b));E.style.width=K+"px";E.style.height=t+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-t)/2)+"px";E.style.paddingLeft=Math.floor((100-K)/2)+"px";F.appendChild(E)}else if(null!=g){var J=a.stringToCells(Graph.decompress(g.xml));0<J.length&&(a.sidebar.createThumb(J,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.position="absolute";H.style.marginLeft="-12px";H.style.zIndex="1";H.style.cursor="pointer";mxEvent.addListener(H,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(H,"click",function(d){x[b]=null;for(var k=0;k<f.length;k++)if(null!=f[k].data&&f[k].data==b||null!=f[k].xml&&null!=c&&f[k].xml==
|
|
|
|
|
c.xml){f.splice(k,1);break}F.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(F,b,g);F.appendChild(H);F.style.marginBottom="30px";var L=document.createElement("div");L.style.position="absolute";L.style.boxSizing="border-box";L.style.bottom="-18px";L.style.left="10px";L.style.right="10px";L.style.backgroundColor="#ffffff";L.style.overflow=
|
|
|
|
|
"hidden";L.style.textAlign="center";var G=null;null!=b?(G={data:b,w:p,h:e,title:n},null!=v&&(G.aspect=v),x[b]=E,f.push(G)):null!=g&&(g.aspect="fixed",f.push(g),G=g);mxEvent.addListener(L,"keydown",function(a){13==a.keyCode&&null!=C&&(C(),C=null,mxEvent.consume(a))});y();F.appendChild(L);mxEvent.addListener(L,"mousedown",function(a){"true"!=L.getAttribute("contentEditable")&&mxEvent.consume(a)});J=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<
|
|
|
|
|
document.documentMode)){var c=new FilenameDialog(a,G.title||"",mxResources.get("ok"),function(a){null!=a&&(G.title=a,y())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=L.getAttribute("contentEditable")){null!=C&&(C(),C=null);if(null==G.title||0==G.title.length)L.innerHTML="";L.style.textOverflow="";L.style.whiteSpace="";L.style.cursor="text";L.style.color="";L.setAttribute("contentEditable","true");L.focus();document.execCommand("selectAll",
|
|
|
|
|
!1,null);C=function(){L.removeAttribute("contentEditable");L.style.cursor="pointer";G.title=L.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(L,"click",J);mxEvent.addListener(F,"dblclick",J);u.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==b&&null!=g&&(H.style.visibility="hidden",L.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.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);H.style.visibility="";L.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",L.style.visibility="");z=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{p=!1;try{if(a.spinner.stop(),K=mxUtils.parseXml(b),"mxlibrary"==K.documentElement.nodeName){t=JSON.parse(mxUtils.getTextContent(K.documentElement));
|
|
|
|
|
u;)a=a.parentNode;var b=null;if(null!=a)for(var c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,d,k,p,e,g,v,n){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==x[b]){var y=function(){L.innerHTML="";L.style.cursor="pointer";L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";mxUtils.write(L,null!=F.title&&0<F.title.length?F.title:mxResources.get("untitled"));L.style.color=null==F.title||0==F.title.length?"#d0d0d0":""};u.style.backgroundImage=
|
|
|
|
|
"";q.style.display="none";var K=p,t=e;if(p>a.maxImageSize||e>a.maxImageSize){var H=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,e));p*=H;e*=H}K>t?(t=Math.round(100*t/K),K=100):(K=Math.round(100*K/t),t=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=
|
|
|
|
|
b){var D=document.createElement("img");D.setAttribute("src",A.convert(b));D.style.width=K+"px";D.style.height=t+"px";D.style.margin="10px";D.style.paddingBottom=Math.floor((100-t)/2)+"px";D.style.paddingLeft=Math.floor((100-K)/2)+"px";E.appendChild(D)}else if(null!=g){var J=a.stringToCells(Graph.decompress(g.xml));0<J.length&&(a.sidebar.createThumb(J,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var G=document.createElement("img");
|
|
|
|
|
G.setAttribute("src",Editor.closeImage);G.setAttribute("border","0");G.setAttribute("title",mxResources.get("delete"));G.setAttribute("align","top");G.style.paddingTop="4px";G.style.position="absolute";G.style.marginLeft="-12px";G.style.zIndex="1";G.style.cursor="pointer";mxEvent.addListener(G,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(G,"click",function(d){x[b]=null;for(var k=0;k<f.length;k++)if(null!=f[k].data&&f[k].data==b||null!=f[k].xml&&null!=c&&f[k].xml==
|
|
|
|
|
c.xml){f.splice(k,1);break}E.parentNode.removeChild(a);0==f.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(G,"dblclick",function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(G);E.style.marginBottom="30px";var L=document.createElement("div");L.style.position="absolute";L.style.boxSizing="border-box";L.style.bottom="-18px";L.style.left="10px";L.style.right="10px";L.style.backgroundColor="#ffffff";L.style.overflow=
|
|
|
|
|
"hidden";L.style.textAlign="center";var F=null;null!=b?(F={data:b,w:p,h:e,title:n},null!=v&&(F.aspect=v),x[b]=D,f.push(F)):null!=g&&(g.aspect="fixed",f.push(g),F=g);mxEvent.addListener(L,"keydown",function(a){13==a.keyCode&&null!=C&&(C(),C=null,mxEvent.consume(a))});y();E.appendChild(L);mxEvent.addListener(L,"mousedown",function(a){"true"!=L.getAttribute("contentEditable")&&mxEvent.consume(a)});J=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<
|
|
|
|
|
document.documentMode)){var c=new FilenameDialog(a,F.title||"",mxResources.get("ok"),function(a){null!=a&&(F.title=a,y())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=L.getAttribute("contentEditable")){null!=C&&(C(),C=null);if(null==F.title||0==F.title.length)L.innerHTML="";L.style.textOverflow="";L.style.whiteSpace="";L.style.cursor="text";L.style.color="";L.setAttribute("contentEditable","true");L.focus();document.execCommand("selectAll",
|
|
|
|
|
!1,null);C=function(){L.removeAttribute("contentEditable");L.style.cursor="pointer";F.title=L.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(L,"click",J);mxEvent.addListener(E,"dblclick",J);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(G.style.visibility="hidden",L.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);z=l(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,
|
|
|
|
|
"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);G.style.visibility="";L.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==G.style.visibility&&(G.style.visibility="",L.style.visibility="");z=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{p=!1;try{if(a.spinner.stop(),K=mxUtils.parseXml(b),"mxlibrary"==K.documentElement.nodeName){t=JSON.parse(mxUtils.getTextContent(K.documentElement));
|
|
|
|
|
if(null!=t&&0<t.length)for(var I=0;I<t.length;I++)null!=t[I].xml?m(null,null,0,0,0,0,t[I]):m(t[I].data,null,0,0,t[I].w,t[I].h,null,"fixed",t[I].title);p=!0}else if("mxfile"==K.documentElement.nodeName){for(var P=K.documentElement.getElementsByTagName("diagram"),I=0;I<P.length;I++){var t=mxUtils.getTextContent(P[I]),J=a.stringToCells(Graph.decompress(t)),Q=a.editor.graph.getBoundingBoxFromGeometry(J);m(null,null,0,0,0,0,{xml:t,w:Q.width,h:Q.height})}p=!0}}catch(R){}p||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(R){}return null}
|
|
|
|
|
function n(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function t(b){b.stopPropagation();b.preventDefault();B=!1;y=l(b);if(null!=z)null!=y&&y<u.children.length?(f.splice(y>z?y-1:y,0,f.splice(z,1)[0]),u.insertBefore(u.children[z],u.children[y])):(f.push(f.splice(z,1)[0]),u.appendChild(u.children[z]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,D(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=
|
|
|
|
|
function n(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function t(b){b.stopPropagation();b.preventDefault();B=!1;y=l(b);if(null!=z)null!=y&&y<u.children.length?(f.splice(y>z?y-1:y,0,f.splice(z,1)[0]),u.insertBefore(u.children[z],u.children[y])):(f.push(f.splice(z,1)[0]),u.appendChild(u.children[z]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,H(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){m(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var f=[];b=document.createElement("div");b.style.height="100%";var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.height="40px";b.appendChild(k);mxUtils.write(k,mxResources.get("filename")+
|
|
|
|
|
":");null==c&&(c=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",c);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==e||e.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};k.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 q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";
|
|
|
|
|
mxUtils.write(q,mxResources.get("dragImagesHere"));b.appendChild(q);var x={},z=null,y=null,C=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var A=new mxUrlConverter,B=!1;if(null!=d)for(c=0;c<d.length;c++)k=d[c],m(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(u,"dragleave",function(a){q.style.cursor=
|
|
|
|
|
"";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==q){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var D=function(b){return function(c,f,d,k,p,e,g,v,q){null!=q&&(/(\.vsdx)($|\?)/i.test(q.name)||/(\.vssx)($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(c){a.spinner.stop();m(c,f,d,k,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,q.name)?
|
|
|
|
|
"";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==q){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var H=function(b){return function(c,f,d,k,p,e,g,v,q){null!=q&&(/(\.vsdx)($|\?)/i.test(q.name)||/(\.vssx)($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(c){a.spinner.stop();m(c,f,d,k,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,q.name)?
|
|
|
|
|
a.parseFile(q,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(m(c.responseText,f,d,k,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(c,f,d,k,p,e,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",t);mxEvent.addListener(q,"dragover",n);mxEvent.addListener(q,
|
|
|
|
|
"drop",t);b.appendChild(u);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);k=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),c=p.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")});k.setAttribute("id","btnDownload");k.className="geBtn";d.appendChild(k);if(null==document.documentMode){if(null==a.libDlgFileInputElt){var v=document.createElement("input");v.setAttribute("multiple","multiple");v.setAttribute("type","file");mxEvent.addListener(v,"change",function(b){B=!1;a.importFiles(v.files,0,0,a.maxImageSize,function(a,c,f,d,k,p,e,g,q){D(b)(a,c,f,d,k,p,e,g,q);v.value=""});
|
|
|
|
|
"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";d.appendChild(k);if(null==document.documentMode){if(null==a.libDlgFileInputElt){var v=document.createElement("input");v.setAttribute("multiple","multiple");v.setAttribute("type","file");mxEvent.addListener(v,"change",function(b){B=!1;a.importFiles(v.files,0,0,a.maxImageSize,function(a,c,f,d,k,p,e,g,q){H(b)(a,c,f,d,k,p,e,g,q);v.value=""});
|
|
|
|
|
u.scrollTop=u.scrollHeight});v.style.display="none";document.body.appendChild(v);a.libDlgFileInputElt=v}k=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);a.libDlgFileInputElt.click()});k.setAttribute("id","btnAddImage");k.className="geBtn";d.appendChild(k)}k=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=C&&(C(),C=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!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,b,c);u.scrollTop=u.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";d.appendChild(k);this.saveBtnClickHandler=function(b,c,f,d){a.saveLibrary(b,c,f,d)};k=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(p.value,f,e,g)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";d.appendChild(k);a.editor.cancelFirst||d.appendChild(c);
|
|
|
|
|
b.appendChild(d);this.container=b},EditShapeDialog=function(a,c,b,d,e){d=null!=d?d:300;e=null!=e?e:120;var g,l,m=document.createElement("table"),n=document.createElement("tbody");m.style.cellPadding="4px";g=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,b);g.appendChild(l);n.appendChild(g);g=document.createElement("tr");l=document.createElement("td");var t=document.createElement("textarea");t.style.outline="none";t.style.resize=
|
|
|
|
@ -8256,27 +8256,27 @@ mxResources.get("showAll",null,"+ Show all")+'</div></div></div><div class="geTe
|
|
|
|
|
mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">🛈 '+
|
|
|
|
|
mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg";
|
|
|
|
|
var a=window.innerWidth,b=window.innerHeight,d=987,e=712;.9*a<d&&(d=Math.max(.9*a,600),c.style.width=d+"px");.9*b<e&&(e=Math.max(.9*b,300),c.style.height=e+"px");this.width=d;this.height=e;this.container=c};
|
|
|
|
|
TemplatesDialog.prototype.init=function(a,c,b,d,e,g,l,m,n,t){function f(){null!=H&&(H.style.fontWeight="normal",H.style.textDecoration="none",H=null)}function k(a,b,c,f,d,k,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";D.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");D.querySelector("."+b).src="/images/"+c+"-sel.svg";D.querySelector("."+d).src="/images/"+
|
|
|
|
|
k+".svg";return!0}function p(a){function b(a){V.removeChild(f);D.removeChild(c);V.scrollTop=k}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";D.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
|
|
|
|
|
a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var k=V.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);V.appendChild(f);V.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=G){for(var f=G.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}G.className=f.join(" ")}null!=a?(G=a,G.className+=" "+b,J=c,Z.className="geTempDlgCreateBtn"):(J=G=null,Z.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
|
|
|
|
|
function q(b){if(null!=J){var f=J;J=null;Z.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?t(f.url,f,"nameInput.value"):n(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function x(a){a=a?"":"none";for(var b=D.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
|
|
|
|
|
TemplatesDialog.prototype.init=function(a,c,b,d,e,g,l,m,n,t){function f(){null!=G&&(G.style.fontWeight="normal",G.style.textDecoration="none",G=null)}function k(a,b,c,f,d,k,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";H.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");H.querySelector("."+b).src="/images/"+c+"-sel.svg";H.querySelector("."+d).src="/images/"+
|
|
|
|
|
k+".svg";return!0}function p(a){function b(a){V.removeChild(f);H.removeChild(c);V.scrollTop=k}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";H.appendChild(c);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;f.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
|
|
|
|
|
a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var k=V.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);V.appendChild(f);V.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=F){for(var f=F.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,J=c,Z.className="geTempDlgCreateBtn"):(J=F=null,Z.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
|
|
|
|
|
function q(b){if(null!=J){var f=J;J=null;Z.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?t(f.url,f,"nameInput.value"):n(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function x(a){a=a?"":"none";for(var b=H.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
|
|
|
|
|
a}function z(a,b,c){function f(){Z.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));x(!b)}W.innerHTML="";u();L=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));k.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=
|
|
|
|
|
mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));k.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));k.appendChild(e);d.appendChild(k);W.appendChild(d)}for(k=0;k<a.length;k++){a[k].isExternal=!b;var g=a[k].url,e=mxUtils.htmlEntities(a[k].title),v=a[k].tooltip||a[k].title,l=a[k].imgUrl,A=mxUtils.htmlEntities(a[k].changedBy||""),m=mxUtils.htmlEntities(a[k].lastModifiedOn||
|
|
|
|
|
"");l||(l=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=c?50:15;null!=e&&e.length>g&&(e=e.substring(0,g)+"…");if(c){var B=document.createElement("tr"),l=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));l.appendChild(n);v=document.createElement("span");v.className="geTempDlgDiagramTitle";v.innerHTML=e;l.appendChild(v);B.appendChild(l);l=document.createElement("td");
|
|
|
|
|
l.innerHTML=A;B.appendChild(l);l=document.createElement("td");l.innerHTML=m;B.appendChild(l);d.appendChild(B);null==G&&(f(),u(B,"geTempDlgDiagramsListGridActive",a[k]));(function(a,b){mxEvent.addListener(B,"click",function(){G!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(B,"dblclick",q);mxEvent.addListener(n,"click",function(){p(a)})})(a[k],B)}else{var y=document.createElement("div");y.className="geTempDlgDiagramTile";y.setAttribute("title",v);null==G&&(f(),u(y,"geTempDlgDiagramTileActive",
|
|
|
|
|
l.innerHTML=A;B.appendChild(l);l=document.createElement("td");l.innerHTML=m;B.appendChild(l);d.appendChild(B);null==F&&(f(),u(B,"geTempDlgDiagramsListGridActive",a[k]));(function(a,b){mxEvent.addListener(B,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(B,"dblclick",q);mxEvent.addListener(n,"click",function(){p(a)})})(a[k],B)}else{var y=document.createElement("div");y.className="geTempDlgDiagramTile";y.setAttribute("title",v);null==F&&(f(),u(y,"geTempDlgDiagramTileActive",
|
|
|
|
|
a[k]));A=document.createElement("div");A.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var z=document.createElement("img");z.style.display="none";(function(a,b){z.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};z.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(z,A);z.src=l;A.appendChild(z);y.appendChild(A);A=document.createElement("div");A.className="geTempDlgDiagramTileLbl";A.innerHTML=null!=e?e:"";y.appendChild(A);
|
|
|
|
|
n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));y.appendChild(n);(function(a,b){mxEvent.addListener(y,"click",function(){G!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(y,"dblclick",q);mxEvent.addListener(n,"click",function(){p(a)})})(a[k],y);W.appendChild(y)}}}function y(a,b){Y.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory=!0;
|
|
|
|
|
var k=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));k.className="geTempDlgNewDiagramCatItem";k.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"…");null==G&&(Z.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),x(),u(k,"geTempDlgNewDiagramCatItemActive",d));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
|
|
|
|
|
g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;e.appendChild(g);k.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;k.appendChild(e);Y.appendChild(k);(function(a,b){mxEvent.addListener(k,"click",function(){G!=b&&(Z.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),x(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(k,"dblclick",q)})(d,k)}T.style.display=5>a.length?"none":""}function C(a){var b=D.querySelector(".geTemplatesList"),
|
|
|
|
|
c;for(c in a){var f=document.createElement("div"),d=mxResources.get(c),k=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";f.setAttribute("title",d+" ("+k.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"…");f.innerHTML=d+" ("+k.length+")";b.appendChild(f);(function(b,c,d){mxEvent.addListener(f,"click",function(){H!=d&&(null!=H?(H.style.fontWeight="normal",H.style.textDecoration="none"):(ea.style.display="none",ha.style.minHeight=
|
|
|
|
|
"100%"),H=d,H.style.fontWeight="bold",H.style.textDecoration="underline",V.scrollTop=0,v&&(K=!0),X.innerHTML=c,S.style.display="none",z(a[b],!0))})})(c,d,f)}}function A(a){l&&(V.scrollTop=0,W.innerHTML="",M.spin(W),K=!1,v=!0,X.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),P=null,l(aa,a?null:g))}function B(a){f();V.scrollTop=0;W.innerHTML="";M.spin(W);K=!1;v=!0;N=null;X.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
|
|
|
|
|
mxUtils.htmlEntities(a)+'"';m(a,aa,E?null:g);P=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";e=null!=e?e:NEW_DIAGRAM_CATS_PATH+"/index.xml";var D=this.container,v=!1,K=!1,H=null,G=null,J=null,F=!1,E=!0,I=!1,L=[],P,T=D.querySelector(".geTempDlgShowAllBtn"),W=D.querySelector(".geTempDlgDiagramsTiles"),X=D.querySelector(".geTempDlgDiagramsListTitle"),S=D.querySelector(".geTempDlgDiagramsListBtns"),V=D.querySelector(".geTempDlgContent"),ha=D.querySelector(".geTempDlgDiagramsList"),ea=D.querySelector(".geTempDlgNewDiagramCat"),
|
|
|
|
|
Y=D.querySelector(".geTempDlgNewDiagramCatList"),Z=D.querySelector(".geTempDlgCreateBtn"),M=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(D.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();ea.style.display="";ha.style.minHeight="calc(100% - 280px)";A(E)});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){k(this,"geTempDlgAllDiagramsBtnImg",
|
|
|
|
|
"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==P?A(E):B(P))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){k(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(E=!1,null==P?A(E):B(P))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){k(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
|
|
|
|
|
"tiles",!1)&&(I=!0,z(L,!1,I))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){k(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(I=!1,z(L,!1,I))});mxEvent.addListener(T,"click",function(){F?(ea.style.height="280px",Y.style.height="190px",T.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(R)):(ea.style.height="440px",Y.style.height="355px",T.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
|
|
|
|
|
null,"- Show less")),y(R,!0));F=!F});var O=!1,ga=!1,Q={},R=[],ca=1;mxUtils.get(d,function(a){if(!O){O=!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=Q[b];null==c&&(ca++,c=[],Q[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}C(Q)}});mxUtils.get(e,
|
|
|
|
|
function(a){if(!ga){ga=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&R.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;y(R)}});var aa=function(a,b){S.style.display="";M.stop();v=!1;K?K=!1:b?W.innerHTML=b:0==a.length?W.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):z(a,!1,I)};A(E);var N=null;m&&mxEvent.addListener(D.querySelector(".geTempDlgSearchBox"),
|
|
|
|
|
"keyup",function(a){var b=this;null!=N&&clearTimeout(N);13==a.keyCode?B(b.value):N=setTimeout(function(){B(b.value)},500)});mxEvent.addListener(Z,"click",q);mxEvent.addListener(D.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){q(!0)});mxEvent.addListener(D.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=b&&b();a.hideDialog(!0)})};
|
|
|
|
|
n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));y.appendChild(n);(function(a,b){mxEvent.addListener(y,"click",function(){F!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(y,"dblclick",q);mxEvent.addListener(n,"click",function(){p(a)})})(a[k],y);W.appendChild(y)}}}function y(a,b){Y.innerHTML="";u();for(var c=!b&&5<a.length?5:a.length,f=0;f<c;f++){var d=a[f];d.isCategory=!0;
|
|
|
|
|
var k=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));k.className="geTempDlgNewDiagramCatItem";k.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"…");null==F&&(Z.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),x(),u(k,"geTempDlgNewDiagramCatItemActive",d));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
|
|
|
|
|
g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;e.appendChild(g);k.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;k.appendChild(e);Y.appendChild(k);(function(a,b){mxEvent.addListener(k,"click",function(){F!=b&&(Z.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),x(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(k,"dblclick",q)})(d,k)}T.style.display=5>a.length?"none":""}function C(a){var b=H.querySelector(".geTemplatesList"),
|
|
|
|
|
c;for(c in a){var f=document.createElement("div"),d=mxResources.get(c),k=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";f.setAttribute("title",d+" ("+k.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"…");f.innerHTML=d+" ("+k.length+")";b.appendChild(f);(function(b,c,d){mxEvent.addListener(f,"click",function(){G!=d&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(ea.style.display="none",ha.style.minHeight=
|
|
|
|
|
"100%"),G=d,G.style.fontWeight="bold",G.style.textDecoration="underline",V.scrollTop=0,v&&(K=!0),X.innerHTML=c,S.style.display="none",z(a[b],!0))})})(c,d,f)}}function A(a){l&&(V.scrollTop=0,W.innerHTML="",M.spin(W),K=!1,v=!0,X.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),P=null,l(aa,a?null:g))}function B(a){f();V.scrollTop=0;W.innerHTML="";M.spin(W);K=!1;v=!0;N=null;X.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
|
|
|
|
|
mxUtils.htmlEntities(a)+'"';m(a,aa,D?null:g);P=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";e=null!=e?e:NEW_DIAGRAM_CATS_PATH+"/index.xml";var H=this.container,v=!1,K=!1,G=null,F=null,J=null,E=!1,D=!0,I=!1,L=[],P,T=H.querySelector(".geTempDlgShowAllBtn"),W=H.querySelector(".geTempDlgDiagramsTiles"),X=H.querySelector(".geTempDlgDiagramsListTitle"),S=H.querySelector(".geTempDlgDiagramsListBtns"),V=H.querySelector(".geTempDlgContent"),ha=H.querySelector(".geTempDlgDiagramsList"),ea=H.querySelector(".geTempDlgNewDiagramCat"),
|
|
|
|
|
Y=H.querySelector(".geTempDlgNewDiagramCatList"),Z=H.querySelector(".geTempDlgCreateBtn"),M=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(H.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();ea.style.display="";ha.style.minHeight="calc(100% - 280px)";A(D)});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){k(this,"geTempDlgAllDiagramsBtnImg",
|
|
|
|
|
"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(D=!0,null==P?A(D):B(P))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){k(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(D=!1,null==P?A(D):B(P))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){k(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
|
|
|
|
|
"tiles",!1)&&(I=!0,z(L,!1,I))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){k(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(I=!1,z(L,!1,I))});mxEvent.addListener(T,"click",function(){E?(ea.style.height="280px",Y.style.height="190px",T.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(R)):(ea.style.height="440px",Y.style.height="355px",T.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
|
|
|
|
|
null,"- Show less")),y(R,!0));E=!E});var O=!1,ga=!1,Q={},R=[],ca=1;mxUtils.get(d,function(a){if(!O){O=!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=Q[b];null==c&&(ca++,c=[],Q[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}C(Q)}});mxUtils.get(e,
|
|
|
|
|
function(a){if(!ga){ga=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&R.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;y(R)}});var aa=function(a,b){S.style.display="";M.stop();v=!1;K?K=!1:b?W.innerHTML=b:0==a.length?W.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):z(a,!1,I)};A(D);var N=null;m&&mxEvent.addListener(H.querySelector(".geTempDlgSearchBox"),
|
|
|
|
|
"keyup",function(a){var b=this;null!=N&&clearTimeout(N);13==a.keyCode?B(b.value):N=setTimeout(function(){B(b.value)},500)});mxEvent.addListener(Z,"click",q);mxEvent.addListener(H.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){q(!0)});mxEvent.addListener(H.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=b&&b();a.hideDialog(!0)})};
|
|
|
|
|
var BtnDialog=function(a,c,b,d){var e=document.createElement("div");e.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("done"));var l="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";c==a.drive?(l=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
|
|
|
|
|
(l=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(l=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(l=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(l=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[l],"You are now authorized in {1}"));b=mxUtils.button(b,d);b.insertBefore(m,b.firstChild);
|
|
|
|
|
b.style.marginTop="6px";b.className="geBigButton";e.appendChild(g);e.appendChild(a);e.appendChild(b);this.container=e};(function(){Editor.prototype.appName="draw.io";Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];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":
|
|
|
|
@ -8312,7 +8312,7 @@ null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b)
|
|
|
|
|
this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.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 d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");
|
|
|
|
|
null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
|
|
|
|
|
"Invalid data",toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?
|
|
|
|
|
"1":"0");return b};Editor.prototype.isDataSvg=function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(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)){var c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(G){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==
|
|
|
|
|
"1":"0");return b};Editor.prototype.isDataSvg=function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(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)){var c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(F){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==
|
|
|
|
|
typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=c&&0<c.length)for(var d=0;d<c.length;d++)if("mxgraph"==c[d].getAttribute("class")){f.push(c[d]);break}0<f.length&&(c=f[0].getAttribute("data-mxgraph"),null!=c?(f=JSON.parse(c),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0]),c=Graph.decompress(c),0<c.length&&(f=mxUtils.parseXml(c),a=f.documentElement))))}if(null!=a&&"svg"==
|
|
|
|
|
a.nodeName)if(c=a.getAttribute("content"),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)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(f=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=f&&(c=Graph.decompress(mxUtils.getTextContent(f)),
|
|
|
|
|
null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};var b=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&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();
|
|
|
|
@ -8323,7 +8323,7 @@ Editor.prototype.init=function(){c.apply(this,arguments);this.graph.addListener(
|
|
|
|
|
var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,c,f,d){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==f?b.push(f.replace(/\\"/g,'"')):void 0!==d&&b.push(d);return""});/,\s*$/.test(a)&&b.push("");return b};Editor.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?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(f){if(null!=
|
|
|
|
|
f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=EditorUi.prototype.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"!=f.substring(0,19)&&(f=b.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.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(EditorUi.prototype.svgBrokenImage.src)});else{var c=new Image;EditorUi.prototype.crossOriginImages&&(c.crossOrigin="anonymous");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);try{b(a.toDataURL())}catch(F){b(EditorUi.prototype.svgBrokenImage.src)}};c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};
|
|
|
|
|
function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(EditorUi.prototype.svgBrokenImage.src)});else{var c=new Image;EditorUi.prototype.crossOriginImages&&(c.crossOrigin="anonymous");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);try{b(a.toDataURL())}catch(E){b(EditorUi.prototype.svgBrokenImage.src)}};c.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};
|
|
|
|
|
c.src=a}};Editor.prototype.convertImages=function(a,b,c,f){null==f&&(f=this.createImageUrlConverter());var d=0,k=c||{};c=mxUtils.bind(this,function(c,p){for(var e=a.getElementsByTagName(c),g=0;g<e.length;g++)mxUtils.bind(this,function(c){var e=f.convert(c.getAttribute(p));if(null!=e&&"data:"!=e.substring(0,5)){var g=k[e];null==g?(d++,this.convertImageToDataUri(e,function(f){null!=f&&(k[e]=f,c.setAttribute(p,f));d--;0==d&&b(a)})):c.setAttribute(p,g)}else null!=e&&c.setAttribute(p,e)})(e[g])});c("image",
|
|
|
|
|
"xlink:href");c("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",c=0,f=a.length,d,k,p;c<f;){d=a.charCodeAt(c++)&255;if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}k=a.charCodeAt(c++);if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
|
|
|
|
|
3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);b+="=";break}p=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(p&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};
|
|
|
|
@ -8364,7 +8364,7 @@ type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,de
|
|
|
|
|
stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},
|
|
|
|
|
{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",
|
|
|
|
|
stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,c){if(null!=b){var f=function(a){if(null!=a)if(c)for(var f=0;f<a.length;f++)b[a[f].name]=a[f];else for(var d in b){for(var k=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==b[d].type){k=!0;break}k||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&
|
|
|
|
|
null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(F){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
|
|
|
|
|
null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(E){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=
|
|
|
|
|
this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,d=a.edges,k=0;k<c.length;k++)this.findCommonProperties(c[k],b,0==k);for(k=0;k<d.length;k++)this.findCommonProperties(d[k],b,0==c.length&&0==k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),
|
|
|
|
|
b,a))}};var k=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 k.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,b,c,f){l.getModel().beginUpdate();try{var d=[],k=[];if(null!=c.index){for(var p=[],e=c.parentRow.nextSibling;e&&
|
|
|
|
@ -8380,8 +8380,8 @@ v,A)):(B.innerHTML=c,mxEvent.addListener(B,"click",mxUtils.bind(u,function(){fun
|
|
|
|
|
"int"==x?"1":"any",null!=q.min&&(p.min=parseFloat(q.min)),null!=q.max&&(p.max=parseFloat(q.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&k()});p.focus();mxEvent.addListener(p,"blur",function(){k()})})));q.isDeletable&&(A=mxUtils.button("-",mxUtils.bind(u,function(a){f(b,"",q,q.index);mxEvent.consume(a)})),A.style.height="16px",A.style.width="25px",A.style["float"]="right",A.className="geColorBtn",B.appendChild(A));v.appendChild(B);return v}var u=this,l=this.editorUi.editor.graph,
|
|
|
|
|
A=[];a.style.position="relative";a.style.padding="0";var x=document.createElement("table");x.style.whiteSpace="nowrap";x.style.width="100%";var m=document.createElement("tr");m.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;v.appendChild(B);mxUtils.write(v,mxResources.get("property"));m.style.cursor="pointer";var n=function(){var b=x.querySelectorAll(".gePropNonHeaderRow"),c;if(u.editorUi.propertiesCollapsed){B.src=
|
|
|
|
|
Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(ja){}}else B.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<b.length;f++)b[f].style.display=c};mxEvent.addListener(m,"click",function(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;n()});m.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");
|
|
|
|
|
m.appendChild(v);x.appendChild(m);var y=!1,z=!1,C;for(C in b)if(m=b[C],"function"!=typeof m.isVisible||m.isVisible(c)){var t=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):m.defVal;if("separator"==m.type)z=!z;else{if("staticArr"==m.type)m.size=parseInt(c.style[m.sizeProperty]||b[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var D=m.dependentProps,K=[],H=[],v=0;v<D.length;v++){var aa=c.style[D[v]];H.push(b[D[v]].subDefVal);K.push(null!=aa?aa.split(","):[])}m.dependentPropsDefVal=
|
|
|
|
|
H;m.dependentPropsVals=K}x.appendChild(q(C,t,m,y,z));y=!y}}for(v=0;v<A.length;v++)for(m=A[v],b=m.parentRow,c=0;c<m.values.length;c++)C=q(m.name,m.values[c],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,index:c,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==c%2,m.flipBkg),b.parentNode.insertBefore(C,b.nextSibling),b=C;a.appendChild(x);n();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();
|
|
|
|
|
m.appendChild(v);x.appendChild(m);var y=!1,z=!1,C;for(C in b)if(m=b[C],"function"!=typeof m.isVisible||m.isVisible(c)){var t=null!=c.style[C]?mxUtils.htmlEntities(c.style[C]+""):m.defVal;if("separator"==m.type)z=!z;else{if("staticArr"==m.type)m.size=parseInt(c.style[m.sizeProperty]||b[m.sizeProperty].defVal)||0;else if(null!=m.dependentProps){for(var H=m.dependentProps,K=[],G=[],v=0;v<H.length;v++){var aa=c.style[H[v]];G.push(b[H[v]].subDefVal);K.push(null!=aa?aa.split(","):[])}m.dependentPropsDefVal=
|
|
|
|
|
G;m.dependentPropsVals=K}x.appendChild(q(C,t,m,y,z));y=!y}}for(v=0;v<A.length;v++)for(m=A[v],b=m.parentRow,c=0;c<m.values.length;c++)C=q(m.name,m.values[c],{type:m.type,parentRow:m.parentRow,isDeletable:m.isDeletable,index:c,defVal:m.defVal,countProperty:m.countProperty,size:m.size},0==c%2,m.flipBkg),b.parentNode.insertBefore(C,b.nextSibling),b=C;a.appendChild(x);n();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();
|
|
|
|
|
try{var c=f.getSelectionCells();for(b=0;b<c.length;b++){for(var d=f.getModel().getStyle(c[b]),p=0;p<k.length;p++)d=mxUtils.removeStylename(d,k[p]);var e=f.getModel().isVertex(c[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,
|
|
|
|
|
null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,
|
|
|
|
|
mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(c[b],d)}}finally{f.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
|
|
|
|
@ -8395,54 +8395,54 @@ mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.editorUi.current
|
|
|
|
|
function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==c?b.style.width="202px":(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==c?b.style.width="202px":
|
|
|
|
|
(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));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){b=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=document.createEventObject(a),b.type=a.type,b.canBubble=a.canBubble,b.cancelable=a.cancelable,b.view=a.view,b.detail=a.detail,b.screenX=a.screenX,b.screenY=a.screenY,b.clientX=a.clientX,b.clientY=a.clientY,b.ctrlKey=a.ctrlKey,b.altKey=a.altKey,b.shiftKey=a.shiftKey,b.metaKey=a.metaKey,b.button=
|
|
|
|
|
a.button,b.relatedTarget=a.relatedTarget}catch(F){}}p.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=
|
|
|
|
|
a.button,b.relatedTarget=a.relatedTarget}catch(E){}}p.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=
|
|
|
|
|
this.graph.getCellStyle(a);if(null!=b){if("rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.fill=!0;c.gridSize="undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.allowGaps=b.allowGaps||0;c.resizeParent=!1;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==b.childLayout)return c=new mxTableLayout(this.graph),c.rows=b.tableRows||2,c.columns=
|
|
|
|
|
b.tableColumns||2,c.colPercentages=b.colPercentages,c.rowPercentages=b.rowPercentages,c.equalColumns="1"==mxUtils.getValue(b,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(b,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),c.border=b.tableBorder||c.border,c.marginLeft=b.marginLeft||0,c.marginRight=b.marginRight||0,c.marginTop=b.marginTop||0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol",
|
|
|
|
|
"0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return f.apply(this,arguments)}};var u=Graph.prototype.getSvg;Graph.prototype.getSvg=function(){var a=null;if(null!=this.themes&&"darkTheme"==this.defaultThemeName){a=this.stylesheet;this.stylesheet=new mxStylesheet;var b=this.themes["default-style2"];(new mxCodec(b.ownerDocument)).decode(b,this.getStylesheet());this.refresh()}b=u.apply(this,arguments);null!=
|
|
|
|
|
a&&(this.stylesheet=a,this.refresh());return b};var q=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return q.apply(this,arguments)&&!mxClient.IS_SF};var x=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=x.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+
|
|
|
|
|
H)}null!=this.globalUrlVars&&(b=this.globalUrlVars[a])}return b};var z=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){z.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&
|
|
|
|
|
("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var y=Graph.prototype.loadStylesheet;
|
|
|
|
|
Graph.prototype.loadStylesheet=function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++)if(null!=a.actions[b].open)if(this.isCustomLink(a.actions[b].open)){if(!this.customLinkClicked(a.actions[b].open))return}else this.openLink(a.actions[b].open);this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)this.handleLinkAction(a.actions[b])}finally{this.model.endUpdate()}}};
|
|
|
|
|
Graph.prototype.handleLinkAction=function(a){var b=[];null!=a.select&&this.isEnabled()&&(b=this.getCellsForAction(a.select),this.setSelectionCells(b));null!=a.highlight&&(b=this.getCellsForAction(a.highlight),this.highlightCells(b,a.highlight.color,a.highlight.duration,a.highlight.opacity));null!=a.toggle&&this.toggleCells(this.getCellsForAction(a.toggle,!0));null!=a.show&&this.setCellsVisible(this.getCellsForAction(a.show,!0),!0);null!=a.hide&&this.setCellsVisible(this.getCellsForAction(a.hide,!0),
|
|
|
|
|
!1);null!=a.scroll&&(b=this.getCellsForAction(a.scroll));0<b.length&&this.scrollCellToVisible(b[0])};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=
|
|
|
|
|
function(a,b,c,f){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var k=0;k<b.length;k++)if(f&&this.model.getParent(b[k])==this.model.root||this.model.isVertex(b[k])||this.model.isEdge(b[k])){var p=null!=b[k].value&&"object"==typeof b[k].value?mxUtils.trim(b[k].value.getAttribute(c)||""):"",e=!0;if(0<p.length)for(var p=p.toLowerCase().split(" "),g=0;g<a.length&&e;g++)var q=mxUtils.trim(a[g]).toLowerCase(),e=e&&(0==q.length||0<=mxUtils.indexOf(p,
|
|
|
|
|
q));else e=0==a.length;e&&d.push(b[k])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,c,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,
|
|
|
|
|
c,f)};Graph.prototype.highlightCell=function(a,b,c,f){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),k=new mxCellHighlight(this,b,d,!1);null!=f&&(k.opacity=f);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition","all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},
|
|
|
|
|
1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");d.appendChild(k);k=null!=f.createElementNS?
|
|
|
|
|
f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");d.appendChild(k);
|
|
|
|
|
k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");d.appendChild(k);k=a.getElementsByTagName("defs");0==k.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=k[0];f.appendChild(d);c||(b=null!=b?b:a.getElementsByTagName("g")[0],null!=b&&(b.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),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&
|
|
|
|
|
(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return d};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",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",
|
|
|
|
|
STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=
|
|
|
|
|
[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",
|
|
|
|
|
STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];
|
|
|
|
|
mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=
|
|
|
|
|
[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=
|
|
|
|
|
[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+
|
|
|
|
|
"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.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 C=mxMarker.createMarker;mxMarker.createMarker=
|
|
|
|
|
function(a,b,c,f,d,k,p,e,g,q){if(null!=c&&null==mxMarker.markers[c]){var u=this.getPackageForType(c);null!=u&&mxStencilRegistry.getStencil(u)}return C.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1,Math.min(e,Math.max(parseInt(m.value),parseInt(A.value))));A.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(A.value))))}function f(b){function c(b,c,d){var k=b.getGraphBounds(),p=0,e=0,g=da.get(),q=1/b.pageScale,u=y.checked;if(u)var q=
|
|
|
|
|
parseInt(U.value),l=parseInt(ba.value),q=Math.min(g.height*l/(k.height/b.view.scale),g.width*q/(k.width/b.view.scale));else q=parseInt(n.value)/(100*b.pageScale),isNaN(q)&&(f=1/b.pageScale,n.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*f);g.height=Math.ceil(g.height*f);q*=f;!u&&b.pageVisible?(k=b.getPageLayout(),p-=k.x*g.width,e-=k.y*g.height):u=!0;if(null==c){c=PrintDialog.createPrintPreview(b,q,g,0,p,e,u);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&
|
|
|
|
|
(c.title=b.getTitle());var A=c.writeHead;c.writeHead=function(b){A.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 x=c.renderPage;c.renderPage=function(a,b,c,f,d,k){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=x.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||
|
|
|
|
|
!0:e.className="geDisableMathJax";return e}}c.open(null,null,d,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=u;c.appendGraph(b,q,p,e,d,!0)}return c}var f=parseInt(fa.value)/100;isNaN(f)&&(f=1,fa.value="100 %");var f=.75*f,k=A.value,p=m.value,e=!u.checked,q=null;e&&(e=k==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var l=0,e=a.pages.length-1;u.checked||(l=parseInt(k)-1,e=parseInt(p)-1);for(var x=l;x<=e;x++){var B=a.pages[x],k=B==a.currentPage?
|
|
|
|
|
d:null;if(null==k){var k=a.createTemporaryGraph(d.getStylesheet()),p=!0,l=!1,v=null,z=null;null==B.viewState&&null==B.root&&a.updatePageRoot(B);null!=B.viewState&&(p=B.viewState.pageVisible,l=B.viewState.mathEnabled,v=B.viewState.background,z=B.viewState.backgroundImage);k.background=v;k.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;k.pageVisible=p;k.mathEnabled=l;var C=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?x+1:C.apply(this,
|
|
|
|
|
arguments)};document.body.appendChild(k.container);a.updatePageRoot(B);k.model.setRoot(B.root)}q=c(k,q,x!=e);k!=d&&k.container.parentNode.removeChild(k.container)}}else q=c(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(e=q.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
|
|
|
|
|
"0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return f.apply(this,arguments)}};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};var u=Graph.prototype.getSvg;Graph.prototype.getSvg=function(){var a=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
|
|
|
|
|
(a=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var b=u.apply(this,arguments);null!=a&&(this.stylesheet=a,this.refresh());return b};var q=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return q.apply(this,arguments)&&!mxClient.IS_SF};var x=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=x.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=
|
|
|
|
|
JSON.parse(decodeURIComponent(urlParams.vars))}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}null!=this.globalUrlVars&&(b=this.globalUrlVars[a])}return b};var z=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){z.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||
|
|
|
|
|
"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",
|
|
|
|
|
a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var y=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++)if(null!=a.actions[b].open)if(this.isCustomLink(a.actions[b].open)){if(!this.customLinkClicked(a.actions[b].open))return}else this.openLink(a.actions[b].open);
|
|
|
|
|
this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)this.handleLinkAction(a.actions[b])}finally{this.model.endUpdate()}}};Graph.prototype.handleLinkAction=function(a){var b=[];null!=a.select&&this.isEnabled()&&(b=this.getCellsForAction(a.select),this.setSelectionCells(b));null!=a.highlight&&(b=this.getCellsForAction(a.highlight),this.highlightCells(b,a.highlight.color,a.highlight.duration,a.highlight.opacity));null!=a.toggle&&this.toggleCells(this.getCellsForAction(a.toggle,!0));null!=a.show&&
|
|
|
|
|
this.setCellsVisible(this.getCellsForAction(a.show,!0),!0);null!=a.hide&&this.setCellsVisible(this.getCellsForAction(a.hide,!0),!1);null!=a.scroll&&(b=this.getCellsForAction(a.scroll));0<b.length&&this.scrollCellToVisible(b[0])};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=
|
|
|
|
|
f},f));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,c,f){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var k=0;k<b.length;k++)if(f&&this.model.getParent(b[k])==this.model.root||this.model.isVertex(b[k])||this.model.isEdge(b[k])){var p=null!=b[k].value&&"object"==typeof b[k].value?mxUtils.trim(b[k].value.getAttribute(c)||""):"",e=!0;if(0<p.length)for(var p=p.toLowerCase().split(" "),
|
|
|
|
|
g=0;g<a.length&&e;g++)var q=mxUtils.trim(a[g]).toLowerCase(),e=e&&(0==q.length||0<=mxUtils.indexOf(p,q));else e=0==a.length;e&&d.push(b[k])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};
|
|
|
|
|
Graph.prototype.highlightCells=function(a,b,c,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,f)};Graph.prototype.highlightCell=function(a,b,c,f){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),k=new mxCellHighlight(this,b,d,!1);null!=f&&(k.opacity=f);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition",
|
|
|
|
|
"all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",
|
|
|
|
|
this.svgShadowBlur);k.setAttribute("result","blur");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",
|
|
|
|
|
this.svgShadowOpacity);k.setAttribute("result","offsetColor");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2",
|
|
|
|
|
"offsetBlur");d.appendChild(k);k=a.getElementsByTagName("defs");0==k.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=k[0];f.appendChild(d);c||(b=null!=b?b:a.getElementsByTagName("g")[0],null!=b&&(b.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),b=a.getAttribute("viewBox"),null!=b&&0<b.length&&(b=b.split(" "),3<b.length&&(w=parseFloat(b[2])+6,h=parseFloat(b[3])+6,a.setAttribute("viewBox",b[0]+" "+b[1]+" "+w+" "+h))))));return d};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",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
|
|
|
|
|
[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+
|
|
|
|
|
"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=
|
|
|
|
|
[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries.infographic=
|
|
|
|
|
[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];
|
|
|
|
|
mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+
|
|
|
|
|
"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=
|
|
|
|
|
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+
|
|
|
|
|
"/veeam/veeam.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 C=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,k,p,e,g,q){if(null!=c&&null==mxMarker.markers[c]){var u=this.getPackageForType(c);null!=u&&mxStencilRegistry.getStencil(u)}return C.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1,Math.min(e,Math.max(parseInt(m.value),parseInt(A.value))));A.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(A.value))))}function f(b){function c(b,c,d){var k=b.getGraphBounds(),
|
|
|
|
|
p=0,e=0,g=da.get(),q=1/b.pageScale,u=y.checked;if(u)var q=parseInt(U.value),l=parseInt(ba.value),q=Math.min(g.height*l/(k.height/b.view.scale),g.width*q/(k.width/b.view.scale));else q=parseInt(n.value)/(100*b.pageScale),isNaN(q)&&(f=1/b.pageScale,n.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*f);g.height=Math.ceil(g.height*f);q*=f;!u&&b.pageVisible?(k=b.getPageLayout(),p-=k.x*g.width,e-=k.y*g.height):u=!0;if(null==c){c=PrintDialog.createPrintPreview(b,q,g,0,p,e,u);c.pageSelector=
|
|
|
|
|
!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var A=c.writeHead;c.writeHead=function(b){A.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 m=c.renderPage;c.renderPage=function(a,b,c,f,d,k){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=m.apply(this,arguments);mxClient.NO_FO=
|
|
|
|
|
p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,d,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=u;c.appendGraph(b,q,p,e,d,!0)}return c}var f=parseInt(fa.value)/100;isNaN(f)&&(f=1,fa.value="100 %");var f=.75*f,k=A.value,p=m.value,e=!u.checked,q=null;e&&(e=k==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var l=0,e=a.pages.length-1;u.checked||(l=parseInt(k)-1,e=parseInt(p)-
|
|
|
|
|
1);for(var x=l;x<=e;x++){var B=a.pages[x],k=B==a.currentPage?d:null;if(null==k){var k=a.createTemporaryGraph(d.getStylesheet()),p=!0,l=!1,v=null,z=null;null==B.viewState&&null==B.root&&a.updatePageRoot(B);null!=B.viewState&&(p=B.viewState.pageVisible,l=B.viewState.mathEnabled,v=B.viewState.background,z=B.viewState.backgroundImage);k.background=v;k.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;k.pageVisible=p;k.mathEnabled=l;var C=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==
|
|
|
|
|
a?B.getName():"pagenumber"==a?x+1:C.apply(this,arguments)};document.body.appendChild(k.container);a.updatePageRoot(B);k.model.setRoot(B.root)}q=c(k,q,x!=e);k!=d&&k.container.parentNode.removeChild(k.container)}}else q=c(d);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(e=q.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),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('"HTML-CSS": {'),e.writeln("imageFont: null"),e.writeln("},"),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("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),
|
|
|
|
|
e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),q.closeDocument(),!q.mathEnabled&&b&&PrintDialog.printPreview(q))}var d=a.editor.graph,k=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));k.appendChild(p);var e=1,g=1,q=document.createElement("div");q.style.cssText=
|
|
|
|
|
"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","all");u.setAttribute("type","radio");u.setAttribute("name","pages-printdialog");q.appendChild(u);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));q.appendChild(p);mxUtils.br(q);var l=u.cloneNode(!0);u.setAttribute("checked","checked");l.setAttribute("value","range");q.appendChild(l);
|
|
|
|
|
p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");q.appendChild(p);var A=document.createElement("input");A.style.cssText="margin:0 8px 0 8px;";A.setAttribute("value","1");A.setAttribute("type","number");A.setAttribute("min","1");A.style.width="50px";q.appendChild(A);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));q.appendChild(p);var m=A.cloneNode(!0);q.appendChild(m);mxEvent.addListener(A,"focus",function(){l.checked=!0});mxEvent.addListener(m,
|
|
|
|
|
"focus",function(){l.checked=!0});mxEvent.addListener(A,"change",c);mxEvent.addListener(m,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(p=0;p<a.pages.length;p++)if(a.currentPage==a.pages[p]){g=p+1;A.value=g;m.value=g;break}A.setAttribute("max",e);m.setAttribute("max",e);1<e&&k.appendChild(q);var x=document.createElement("div");x.style.marginBottom="10px";var B=document.createElement("input");B.style.marginRight="8px";B.setAttribute("value","adjust");B.setAttribute("type",
|
|
|
|
|
"radio");B.setAttribute("name","printZoom");x.appendChild(B);p=document.createElement("span");mxUtils.write(p,mxResources.get("adjustTo"));x.appendChild(p);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width="50px";x.appendChild(n);mxEvent.addListener(n,"focus",function(){B.checked=!0});k.appendChild(x);var q=q.cloneNode(!1),y=B.cloneNode(!0);y.setAttribute("value","fit");B.setAttribute("checked","checked");p=document.createElement("div");
|
|
|
|
|
p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(y);q.appendChild(p);x=document.createElement("table");x.style.display="inline-block";var v=document.createElement("tbody"),z=document.createElement("tr"),C=z.cloneNode(!0),t=document.createElement("td"),D=t.cloneNode(!0),K=t.cloneNode(!0),ca=t.cloneNode(!0),aa=t.cloneNode(!0),N=t.cloneNode(!0);t.style.textAlign="right";ca.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";D.appendChild(U);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));K.appendChild(p);mxUtils.write(ca,mxResources.get("fitToBy"));var ba=U.cloneNode(!0);aa.appendChild(ba);mxEvent.addListener(U,"focus",function(){y.checked=!0});mxEvent.addListener(ba,"focus",function(){y.checked=!0});p=document.createElement("span");mxUtils.write(p,
|
|
|
|
|
mxResources.get("fitToSheetsDown"));N.appendChild(p);z.appendChild(t);z.appendChild(D);z.appendChild(K);C.appendChild(ca);C.appendChild(aa);C.appendChild(N);v.appendChild(z);v.appendChild(C);x.appendChild(v);q.appendChild(x);k.appendChild(q);q=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));q.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(p,
|
|
|
|
|
p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(y);q.appendChild(p);x=document.createElement("table");x.style.display="inline-block";var v=document.createElement("tbody"),z=document.createElement("tr"),C=z.cloneNode(!0),t=document.createElement("td"),H=t.cloneNode(!0),K=t.cloneNode(!0),ca=t.cloneNode(!0),aa=t.cloneNode(!0),N=t.cloneNode(!0);t.style.textAlign="right";ca.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";H.appendChild(U);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));K.appendChild(p);mxUtils.write(ca,mxResources.get("fitToBy"));var ba=U.cloneNode(!0);aa.appendChild(ba);mxEvent.addListener(U,"focus",function(){y.checked=!0});mxEvent.addListener(ba,"focus",function(){y.checked=!0});p=document.createElement("span");mxUtils.write(p,
|
|
|
|
|
mxResources.get("fitToSheetsDown"));N.appendChild(p);z.appendChild(t);z.appendChild(H);z.appendChild(K);C.appendChild(ca);C.appendChild(aa);C.appendChild(N);v.appendChild(z);v.appendChild(C);x.appendChild(v);q.appendChild(x);k.appendChild(q);q=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));q.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(p,
|
|
|
|
|
"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));q.appendChild(p);var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","100 %");fa.style.width="60px";q.appendChild(fa);k.appendChild(q);p=document.createElement("div");p.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
|
|
|
|
|
q.className="geBtn";a.editor.cancelFirst&&p.appendChild(q);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),x.className="geBtn",p.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),x.className="geBtn",p.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});x.className=
|
|
|
|
|
"geBtn gePrimaryBtn";p.appendChild(x);a.editor.cancelFirst||p.appendChild(q);k.appendChild(p);this.container=k};var A=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)):(A.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};
|
|
|
|
|
Editor.prototype.useCanvasForExport=!1;try{var B=document.createElement("canvas"),D=new Image;D.onload=function(){try{B.getContext("2d").drawImage(D,0,0);var a=B.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};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(v){}})();
|
|
|
|
|
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,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="10.7.9";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=
|
|
|
|
|
Editor.prototype.useCanvasForExport=!1;try{var B=document.createElement("canvas"),H=new Image;H.onload=function(){try{B.getContext("2d").drawImage(H,0,0);var a=B.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};H.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}})();
|
|
|
|
|
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,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="10.8.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=
|
|
|
|
|
EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=k+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+
|
|
|
|
|
encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):
|
|
|
|
|
"")}catch(p){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(p){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.dev){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);
|
|
|
|
@ -8485,16 +8485,16 @@ this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=
|
|
|
|
|
null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||
|
|
|
|
|
/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,d,e,g,l){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!e),k=f+"."+a;if("xml"==a){var p='<?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,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(k,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=f+".png":"jpeg"==a&&(k=f+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(b,c){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);
|
|
|
|
|
var k=this.createDownloadRequest(b,a,d,c,l,e);this.editor.graph.pageVisible=f;return k}catch(E){this.handleError(E)}}));else{var q=null,u=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(q)}))});if("svg"==a){var m=this.editor.graph.background;if(l||m==mxConstants.NONE)m=null;var x=this.editor.graph.getSvg(m,null,null,null,
|
|
|
|
|
null,d);c&&this.editor.graph.addSvgShadow(x);this.convertImages(x,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 k=f+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),d)}}catch(H){this.handleError(H)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g){var f=
|
|
|
|
|
var k=this.createDownloadRequest(b,a,d,c,l,e);this.editor.graph.pageVisible=f;return k}catch(D){this.handleError(D)}}));else{var q=null,u=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(q)}))});if("svg"==a){var m=this.editor.graph.background;if(l||m==mxConstants.NONE)m=null;var x=this.editor.graph.getSvg(m,null,null,null,
|
|
|
|
|
null,d);c&&this.editor.graph.addSvgShadow(x);this.convertImages(x,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 k=f+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),d)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e,g){var f=
|
|
|
|
|
this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var k="",p="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";"pdf"==b&&0==g&&(p="&allPages=1");if("xmlpng"==b&&(f="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){k="&from="+g;break}g=this.editor.graph.background;"png"==b&&e?g=mxConstants.NONE:e||null!=g&&g!=mxConstants.NONE||
|
|
|
|
|
(g="#ffffff");return new mxXmlRequest(EXPORT_URL,"format="+b+k+p+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var f=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:
|
|
|
|
|
this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return f};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var k=null!=a.interval?parseInt(a.interval):6E4,e=null,p=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
|
|
|
|
|
mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(e);e=window.setTimeout(p,k)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();p()}));g();p()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var k=a.url;/^https?:\/\//.test(k)&&
|
|
|
|
|
!this.editor.isCorsEnabledForUrl(k)&&(k=PROXY_URL+"?url="+encodeURIComponent(k));this.loadUrl(k,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:
|
|
|
|
|
null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,e=f.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var l=e.getCell(a.getAttribute("id"));if(null!=l){try{var m=a.getAttribute("value");if(null!=m){var A=mxUtils.parseXml(m).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))e.setValue(l,A);else for(var B=A.attributes,n=0;n<B.length;n++)f.setAttributeForCell(l,B[n].nodeName,0<B[n].nodeValue.length?B[n].nodeValue:null)}}catch(I){null!=
|
|
|
|
|
window.console&&console.log("Error in value for "+l.id+": "+I)}try{var v=a.getAttribute("style");null!=v&&f.model.setStyle(l,v)}catch(I){null!=window.console&&console.log("Error in style for "+l.id+": "+I)}try{var t=a.getAttribute("icon");if(null!=t){var H=0<t.length?JSON.parse(t):null;null!=H&&H.append||f.removeCellOverlays(l);null!=H&&f.addCellOverlay(l,b(H))}}catch(I){null!=window.console&&console.log("Error in icon for "+l.id+": "+I)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),
|
|
|
|
|
J=f.getCellGeometry(l);if(null!=J){J=J.clone();for(key in G){var F=parseFloat(G[key]);"dx"==key?J.x+=F:"dy"==key?J.y+=F:"dw"==key?J.width+=F:"dh"==key?J.height+=F:J[key]=parseFloat(G[key])}f.model.setGeometry(l,J)}}}catch(I){null!=window.console&&console.log("Error in icon for "+l.id+": "+I)}}}else if("model"==a.nodeName){for(var E=a.firstChild;null!=E&&E.nodeType!=mxConstants.NODETYPE_ELEMENT;)E=E.nextSibling;null!=E&&(new mxCodec(a.firstChild)).decode(E,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
|
|
|
|
|
window.console&&console.log("Error in value for "+l.id+": "+I)}try{var v=a.getAttribute("style");null!=v&&f.model.setStyle(l,v)}catch(I){null!=window.console&&console.log("Error in style for "+l.id+": "+I)}try{var t=a.getAttribute("icon");if(null!=t){var G=0<t.length?JSON.parse(t):null;null!=G&&G.append||f.removeCellOverlays(l);null!=G&&f.addCellOverlay(l,b(G))}}catch(I){null!=window.console&&console.log("Error in icon for "+l.id+": "+I)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),
|
|
|
|
|
J=f.getCellGeometry(l);if(null!=J){J=J.clone();for(key in F){var E=parseFloat(F[key]);"dx"==key?J.x+=E:"dy"==key?J.y+=E:"dw"==key?J.width+=E:"dh"==key?J.height+=E:J[key]=parseFloat(F[key])}f.model.setGeometry(l,J)}}}catch(I){null!=window.console&&console.log("Error in icon for "+l.id+": "+I)}}}else if("model"==a.nodeName){for(var D=a.firstChild;null!=D&&D.nodeType!=mxConstants.NODETYPE_ELEMENT;)D=D.nextSibling;null!=D&&(new mxCodec(a.firstChild)).decode(D,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
|
|
|
|
|
(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
|
|
|
|
|
d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var k=new Date,f=k.getFullYear(),e=k.getMonth()+1,g=k.getDate(),l=k.getHours(),A=k.getMinutes(),k=k.getSeconds(),c=c+(" "+(f+"-"+e+"-"+g+"-"+l+"-"+A+"-"+k));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
|
|
|
|
|
this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&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.editor.setStatus("");
|
|
|
|
@ -8513,19 +8513,19 @@ if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar
|
|
|
|
|
mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});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(Graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[e]);c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){k(b,a)}));this.repositionLibrary(d);var p=g.parentNode.previousSibling;c=p.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&
|
|
|
|
|
p.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");p.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin=
|
|
|
|
|
"0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var v=this.editor.graph,t=null,H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,
|
|
|
|
|
b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=m.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",l.insertBefore(t,l.firstChild),p.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=
|
|
|
|
|
"0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var v=this.editor.graph,t=null,G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,
|
|
|
|
|
b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=m.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",l.insertBefore(t,l.firstChild),p.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=
|
|
|
|
|
t.parentNode&&(t.parentNode.removeChild(t),p.style.paddingRight=18*l.childNodes.length+"px")})):null==n&&(n=m.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),l.insertBefore(n,l.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()||(p.style.paddingRight=18*l.childNodes.length+"px",n.parentNode.removeChild(n),
|
|
|
|
|
n=null)});mxEvent.consume(c)})),p.style.paddingRight=18*l.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,c,d,k){a=v.cloneCells(mxUtils.sortCells(v.model.getTopmostCells(a)));for(var e=0;e<a.length;e++){var p=v.getCellGeometry(a[e]);null!=p&&p.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,k||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=k&&(a.title=k);b.push(a);G(d);null!=
|
|
|
|
|
f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),F=mxUtils.bind(this,function(a){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(a),v.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=v.getSelectionCells(),c=v.view.getBounds(b),d=v.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=v.view.translate.x;c.y-=v.view.translate.y;J(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,
|
|
|
|
|
n=null)});mxEvent.consume(c)})),p.style.paddingRight=18*l.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,c,d,k){a=v.cloneCells(mxUtils.sortCells(v.model.getTopmostCells(a)));for(var e=0;e<a.length;e++){var p=v.getCellGeometry(a[e]);null!=p&&p.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,k||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=k&&(a.title=k);b.push(a);F(d);null!=
|
|
|
|
|
f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),E=mxUtils.bind(this,function(a){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(a),v.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=v.getSelectionCells(),c=v.view.getBounds(b),d=v.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=v.view.translate.x;c.y-=v.view.translate.y;J(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(g,
|
|
|
|
|
function(){},mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="hidden",g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!1),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&
|
|
|
|
|
(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),v.isMouseDown=!1,v.autoScroll=!0,F(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="visible",g.style.backgroundColor="",g.style.cursor="",v.autoScroll=!0,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!0),null!=v.graphHandler.hint&&
|
|
|
|
|
(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),v.isMouseDown=!1,v.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="visible",g.style.backgroundColor="",g.style.cursor="",v.autoScroll=!0,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!0),null!=v.graphHandler.hint&&
|
|
|
|
|
(v.graphHandler.hint.style.visibility="visible"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){g.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.cursor="";g.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,
|
|
|
|
|
function(c,d,e,p,l,q,m,u,A){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,l,q),c)],c[0].vertex=!0,J(c,new mxRectangle(0,0,l,q),a,mxEvent.isAltDown(a)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var B=!1,n=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var e=
|
|
|
|
|
mxUtils.parseXml(c);if("mxlibrary"==e.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(e.documentElement));k(p,g);b=b.concat(p);G(a);this.spinner.stop();B=!0}catch(aa){}else if("mxfile"==e.documentElement.nodeName)try{for(var l=e.documentElement.getElementsByTagName("diagram"),e=0;e<l.length;e++){var p=mxUtils.getTextContent(l[e]),q=this.stringToCells(Graph.decompress(p)),m=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,m.width,m.height),a)}B=!0}catch(aa){null!=
|
|
|
|
|
mxUtils.parseXml(c);if("mxlibrary"==e.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(e.documentElement));k(p,g);b=b.concat(p);F(a);this.spinner.stop();B=!0}catch(aa){}else if("mxfile"==e.documentElement.nodeName)try{for(var l=e.documentElement.getElementsByTagName("diagram"),e=0;e<l.length;e++){var p=mxUtils.getTextContent(l[e]),q=this.stringToCells(Graph.decompress(p)),m=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,m.width,m.height),a)}B=!0}catch(aa){null!=
|
|
|
|
|
window.console&&console.log("error in drop handler:",aa)}}B||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=A&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?this.importVisio(A,function(a){n(a,"text/xml")},null,m):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,m)&&null!=A?this.parseFile(A,mxUtils.bind(this,function(a){4==
|
|
|
|
|
a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?n(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):n(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){g.style.cursor="";g.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));
|
|
|
|
|
l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",H);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&H(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));l.insertBefore(c,l.firstChild);mxEvent.addListener(c,"click",F);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",
|
|
|
|
|
l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",G);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&G(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));l.insertBefore(c,l.firstChild);mxEvent.addListener(c,"click",E);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",
|
|
|
|
|
mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),l.insertBefore(c,l.firstChild))}p.appendChild(l);p.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(k+="aspect=fixed;");
|
|
|
|
|
b.appendChild(this.sidebar.createVertexTemplate(k+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=
|
|
|
|
|
64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/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=
|
|
|
|
@ -8546,7 +8546,7 @@ null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(Graph.compres
|
|
|
|
|
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{var f=document.createElement("a"),k=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),k=65==(g?parseInt(g[2],10):!1)?!1:k;if(k||this.isOffline()){f.href=URL.createObjectURL(d?
|
|
|
|
|
this.base64ToBlob(a,c):new Blob([a],{type:c}));k?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(C){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+
|
|
|
|
|
g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),k=0;k<f;++k){for(var g=1024*k,l=Math.min(g+1024,d),m=Array(l-g),n=0;g<l;++n,++g)m[n]=c[g].charCodeAt(0);e[k]=new Uint8Array(m)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,g,l){g=null!=g?g:!1;l=null!=l?l:"vsdx"!=e&&(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);
|
|
|
|
|
b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write(mxUtils.htmlEntities(a,!1)),e.document.close())}else this.openInNewWindow(a,c,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(f,mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,f,e)}catch(D){this.handleError(D)}}))}catch(B){this.handleError(B)}}),
|
|
|
|
|
b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){try{if("_blank"==f)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write(mxUtils.htmlEntities(a,!1)),e.document.close())}else this.openInNewWindow(a,c,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(f,mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,f,e)}catch(H){this.handleError(H)}}))}catch(B){this.handleError(B)}}),
|
|
|
|
|
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,l,null,1<e,4<e&&(!g||6>e)?3:4,a,c,d);this.showDialog(b.container,420,1==e?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||null==d.document?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&&null!=d.document||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";
|
|
|
|
@ -8573,26 +8573,26 @@ this.getCurrentFile(),m||null==f||f.constructor!=window.DriveFile?c="#R"+encodeU
|
|
|
|
|
a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";
|
|
|
|
|
var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");k.appendChild(e);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(p);mxUtils.br(k);k.appendChild(g);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));
|
|
|
|
|
k.appendChild(p);var l=this.getCurrentFile();null==c&&null!=l&&l.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),k.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));e.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");f.appendChild(k);var m=
|
|
|
|
|
this.addLinkSection(f),n=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value="100%";f.appendChild(u);var t=this.addCheckbox(f,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(f,mxResources.get("allPages"),k,!k),G=this.addCheckbox(f,mxResources.get("layers"),!0),
|
|
|
|
|
J=this.addCheckbox(f,mxResources.get("lightbox"),!0),F=this.addEditButton(f,J),E=F.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");E.checked&&J.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,u.value,m.getTarget(),m.getColor(),t.checked,H.checked,
|
|
|
|
|
G.checked,J.checked,F.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.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";f.appendChild(k);var p=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=
|
|
|
|
|
this.addLinkSection(f),n=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value="100%";f.appendChild(u);var t=this.addCheckbox(f,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(f,mxResources.get("allPages"),k,!k),F=this.addCheckbox(f,mxResources.get("layers"),!0),
|
|
|
|
|
J=this.addCheckbox(f,mxResources.get("lightbox"),!0),E=this.addEditButton(f,J),D=E.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&J.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked,u.value,m.getTarget(),m.getColor(),t.checked,G.checked,
|
|
|
|
|
F.checked,J.checked,E.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,g){var f=document.createElement("div");f.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";f.appendChild(k);var p=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=
|
|
|
|
|
p&&p.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var m=document.createElement("div");m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));l.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(p.getId())}));
|
|
|
|
|
m.style.marginTop="12px";m.className="geBtn";l.appendChild(m);f.appendChild(l);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("check"));l.appendChild(m);mxEvent.addListener(m,"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,n=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,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%",f.appendChild(q),mxUtils.write(f,mxResources.get("height")+
|
|
|
|
|
":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=d+"px",f.appendChild(n),mxUtils.br(f);var u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var x=null;if(null==p||p.constructor!=window.DriveFile||b)x=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(f,mxResources.get("lightbox"),!0),J=this.addEditButton(f,t),F=J.getEditInput(),E=this.addCheckbox(f,mxResources.get("layers"),
|
|
|
|
|
!0);E.style.marginLeft=F.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(E.removeAttribute("disabled"),F.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"));F.checked&&t.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==x?
|
|
|
|
|
!0:x.checked,t.checked,J.getLink(),E.checked,null!=q?q.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,254+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,c,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
|
|
|
|
|
":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=d+"px",f.appendChild(n),mxUtils.br(f);var u=this.addLinkSection(f,g);c=null!=this.pages&&1<this.pages.length;var x=null;if(null==p||p.constructor!=window.DriveFile||b)x=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(f,mxResources.get("lightbox"),!0),J=this.addEditButton(f,t),E=J.getEditInput(),D=this.addCheckbox(f,mxResources.get("layers"),
|
|
|
|
|
!0);D.style.marginLeft=E.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(D.removeAttribute("disabled"),E.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));E.checked&&t.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(u.getTarget(),u.getColor(),null==x?
|
|
|
|
|
!0:x.checked,t.checked,J.getLink(),D.checked,null!=q?q.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,254+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,c,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
|
|
|
|
|
mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(e);var k=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,p=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,f,
|
|
|
|
|
mxUtils.bind(this,function(){c(!k.checked,null!=g?g.checked:!1,null!=p?p.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,g,l,m){l=null!=l?l:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var k=this.editor.graph,p="jpeg"==m?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(q);mxUtils.write(f,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%";f.appendChild(n);mxUtils.write(f,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";f.appendChild(u);mxUtils.br(f);var x=this.addCheckbox(f,
|
|
|
|
|
mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),t=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,k.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");g&&(f.appendChild(y),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),p+=26,mxEvent.addListener(t,"change",function(){t.checked?y.removeAttribute("disabled"):y.setAttribute("disabled",
|
|
|
|
|
"disabled")}));k.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var z=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(f.appendChild(E),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),p+=26);var I=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
|
|
|
|
|
"disabled")}));k.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var z=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||D.setAttribute("disabled","disabled");b&&(f.appendChild(D),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),p+=26);var I=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
|
|
|
|
|
l,null,null,"jpeg"!=m),L=null!=this.pages&&1<this.pages.length,P=this.addCheckbox(f,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=m);P.style.marginLeft="24px";P.style.marginBottom="16px";L||(P.style.display="none");mxEvent.addListener(I,"change",function(){I.checked&&L?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")});l&&L||P.setAttribute("disabled","disabled");var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginRight="10px";
|
|
|
|
|
T.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));T.appendChild(a);"svg"==m&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(T),mxUtils.br(f),
|
|
|
|
|
mxUtils.br(f),p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=n.value;e(n.value,x.checked,!t.checked,z.checked,I.checked,E.checked,u.value,y.checked,!P.checked,T.value)}),null,c,d);this.showDialog(c.container,340,p,!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,c,d,e){var f=document.createElement("div");
|
|
|
|
|
mxUtils.br(f),p+=26);c=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=n.value;e(n.value,x.checked,!t.checked,z.checked,I.checked,D.checked,u.value,y.checked,!P.checked,T.value)}),null,c,d);this.showDialog(c.container,340,p,!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,c,d,e){var f=document.createElement("div");
|
|
|
|
|
f.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var p=this.addCheckbox(f,mxResources.get("fit"),!0),l=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible&&d,!d),m=this.addCheckbox(f,c),q=this.addCheckbox(f,mxResources.get("lightbox"),!0),n=this.addEditButton(f,q),u=n.getEditInput(),t=1<k.model.getChildCount(k.model.getRoot()),
|
|
|
|
|
G=this.addCheckbox(f,mxResources.get("layers"),t,!t);G.style.marginLeft=u.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(t&&G.removeAttribute("disabled"),u.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&q.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,
|
|
|
|
|
function(){a(p.checked,l.checked,m.checked,q.checked,n.getLink(),G.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,l,m){function f(b){var f=" ",p="";d&&(f=" 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('"+
|
|
|
|
|
F=this.addCheckbox(f,mxResources.get("layers"),t,!t);F.style.marginLeft=u.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(t&&F.removeAttribute("disabled"),u.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&q.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,
|
|
|
|
|
function(){a(p.checked,l.checked,m.checked,q.checked,n.getLink(),F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,g,l,m){function f(b){var f=" ",p="";d&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
|
|
|
|
|
EditorUi.drawHost+"/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var m="";c&&(m=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');l('<img src="'+b+'"'+m+(""!=p?' style="'+p+'"':"")+f+"/>")}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");f(a)}),null,null,null,
|
|
|
|
|
mxUtils.bind(this,function(a){m({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 p="";c&&(p="&w="+Math.round(2*k.width)+"&h="+Math.round(2*k.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?f("data:image/png;base64,"+q.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
|
|
|
|
|
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,g,l){var f=this.editor.graph.getSvg(),k=f.getElementsByTagName("a");if(null!=k)for(var p=0;p<k.length;p++){var m=k[p].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==k[p].getAttribute("target")&&k[p].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(f);if(c){var q=" ",n="";d&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
|
|
|
|
@ -8604,19 +8604,19 @@ this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(x){}f
|
|
|
|
|
e=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(Graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(A){null!=
|
|
|
|
|
b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(y){null!=b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,g,l){l=b.background;l==mxConstants.NONE&&(l=null);g=b.getSvg(l,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=e)this.convertImages(g,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(g)};EditorUi.prototype.exportImage=function(a,b,c,d,e,g,l,m,n){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;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,m):null,n)}catch(D){"Invalid image"==D.message?this.downloadFile(n):this.handleError(D)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,l)}catch(B){this.spinner.stop(),this.handleError(B)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
|
|
|
|
|
try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,m):null,n)}catch(H){"Invalid image"==H.message?this.downloadFile(n):this.handleError(H)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,l)}catch(B){this.spinner.stop(),this.handleError(B)}}};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,f={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[c[0]],g=1;g<c.length;g++){var k=c[g].indexOf(")");e.push('url("');e.push(f[b(c[g].substring(0,k))]);e.push('"'+c[g].substring(k))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),m=null,n=c[g].indexOf("format(",l);0<n&&(m=b(c[g].substring(n+7,c[g].indexOf(")",n))));mxUtils.bind(this,function(a){if(null==
|
|
|
|
|
f[a]){f[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.editor.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){f[a]=b;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[g].substring(0,l)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,g,l,m,n,A,B,t,v,K){g=null!=g?g:!0;t=null!=t?t:this.editor.graph;v=null!=v?v:0;var f=n?null:t.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==
|
|
|
|
|
f&&0==n&&(f="#ffffff");this.convertImages(t.getSvg(f,null,null,K,null,null!=l?l:!0,null,null,null,A),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*l),b/p)):b/p);p=Math.ceil(m*p)+2*v;l=Math.ceil(m*l)+2*v;k.setAttribute("width",p);k.setAttribute("height",l);var q=k.getContext("2d");null!=f&&(q.beginPath(),
|
|
|
|
|
q.rect(0,0,p,l),q.fillStyle=f,q.fill());q.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(d,v/m,v/m);a(k)},0):(q.drawImage(d,v/m,v/m),a(k))}catch(T){null!=e&&e(T)}});d.onerror=function(a){null!=e&&e(a)};try{A&&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(t,
|
|
|
|
|
c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(k)}catch(E){null!=e&&e(E)}}),c,B)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"!=
|
|
|
|
|
c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(k)}catch(D){null!=e&&e(D)}}),c,B)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"!=
|
|
|
|
|
d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),p=0;p<k.length;p++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var p=e[k];null==p?(f++,this.convertImageToDataUri(k,function(d){null!=d&&(e[k]=d,c.setAttribute(g,
|
|
|
|
|
d));f--;0==f&&b(a)})):c.setAttribute(g,p)}else null!=k&&c.setAttribute(g,k)})(k[p])});c("image","xlink:href");c("img","src");0==f&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,e,g,l){try{var f=!l&&(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(f){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("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()},a)}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},f,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:k})})});k()}catch(A){null!=
|
|
|
|
|
c&&c(A)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(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;this.crossOriginImages&&(c.crossOrigin="anonymous");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);try{b(a.toDataURL())}catch(z){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 f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();try{var k=mxUtils.parseXml(a),p=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var l=p.getElementsByTagName("diagram");if(1==l.length)p=mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(l[0]))).documentElement;
|
|
|
|
|
else if(1<l.length)for(a=0,null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(p=mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(l[0]))).documentElement,d=!1,a=1);a<l.length;a++){l[a].removeAttribute("id");var m=this.updatePageRoot(new DiagramPage(l[a])),q=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,m,m,q,!0))}}null!=p&&"mxGraphModel"===p.nodeName&&(f=g.importGraphModel(p,b,c,d))}finally{g.model.endUpdate()}}}catch(v){if(e)throw v;
|
|
|
|
|
else if(1<l.length)for(a=0,null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(p=mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(l[0]))).documentElement,d=!1,a=1);a<l.length;a++){l[a].removeAttribute("id");var m=this.updatePageRoot(new DiagramPage(l[a])),n=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[n+1]));g.model.execute(new ChangePage(this,m,m,n,!0))}}null!=p&&"mxGraphModel"===p.nodeName&&(f=g.importGraphModel(p,b,c,d))}finally{g.model.endUpdate()}}}catch(v){if(e)throw v;
|
|
|
|
|
this.handleError(v)}return f};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(d)&&null!=VSD_CONVERT_URL){var f=new FormData;f.append("file1",a,d);var e=new XMLHttpRequest;e.open("POST",VSD_CONVERT_URL);
|
|
|
|
|
e.responseType="blob";e.onreadystatechange=mxUtils.bind(this,function(){if(4==e.readyState)if(200<=e.status&&299>=e.status)try{this.doImportVisio(e.response,b,c,d)}catch(y){c(y)}else c({})});e.send(f)}else try{this.doImportVisio(a,b,c,d)}catch(y){c(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=
|
|
|
|
|
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.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(q){c(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,
|
|
|
|
@ -8632,28 +8632,28 @@ f.setLinkForCell(e,e.value),e.geometry.width+=f.gridSize,e.geometry.height+=f.gr
|
|
|
|
|
function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,
|
|
|
|
|
"change",mxUtils.bind(this,function(){null!=c.files&&this.importFiles(c.files,null,null,this.maxImageSize);c.value=""}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&
|
|
|
|
|
/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=
|
|
|
|
|
urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,d,e,g,l,m,n,A,B){A=null!=A?A:!0;var f=!1,k=null,p=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,c,d,A);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=B?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(k=this.importXml(b,c,d,A),n=!0)),n||(k=this.editor.graph,b=a.indexOf(";"),
|
|
|
|
|
urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,d,e,g,l,m,n,A,t){A=null!=A?A:!0;var f=!1,k=null,p=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,c,d,A);null!=m&&m(b)});"image"==b.substring(0,5)?(n=!1,"image/png"==b.substring(0,9)&&(b=t?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(k=this.importXml(b,c,d,A),n=!0)),n||(k=this.editor.graph,b=a.indexOf(";"),
|
|
|
|
|
0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),A&&k.isGridEnabled()&&(c=k.snap(c),d=k.snap(d)),k=[k.insertVertex(null,null,"",c,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(f=!0,this.importGraphML(a,p)):null!=n&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?(f=!0,this.importVisio(n,p)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,
|
|
|
|
|
l)?(f=!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?p(a.responseText):null!=m&&m(null))}),l)):/(\.v(sd|dx))($|\?)/i.test(l)||/(\.vs(s|x))($|\?)/i.test(l)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,A));f||null==m||m(k);return k};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>
|
|
|
|
|
2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}e=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>
|
|
|
|
|
2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,l,m,n,A,B,t){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var f=null!=b&&null!=c,k=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&
|
|
|
|
|
null!=a)for(var q=B||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>q){p=!0;break}var x=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,l,p){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,g,k,l,p,f,t)});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,
|
|
|
|
|
mxResources.get("loading")))for(var q=a.length,u=q,x=[],v=mxUtils.bind(this,function(a,b){x[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(x);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<x.length;d++){var f=x[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),D=0;D<q;D++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.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 m=a.target.result,q=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(q+1)))),x=mxUtils.parseXml(u),u=x.getElementsByTagName("svg");if(0<u.length){var u=u[0],D=t?null:u.getAttribute("content");null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null==D||"<mxfile "!==D.substring(0,8)&&"<mxGraphModel "!==D.substring(0,14)?v(f,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=
|
|
|
|
|
x){var a=x.getElementsByTagName("svg");if(0<a.length){var k=a[0],l=parseFloat(k.getAttribute("width")),A=parseFloat(k.getAttribute("height")),u=k.getAttribute("viewBox");if(null==u||0==u.length)k.setAttribute("viewBox","0 0 "+l+" "+A);else if(isNaN(l)||isNaN(A)){var B=u.split(" ");3<B.length&&(l=parseFloat(B[2]),A=parseFloat(B[3]))}m=this.createSvgDataUri(mxUtils.getXml(k));var t=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,A)),v=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(l*t)),Math.max(1,
|
|
|
|
|
Math.round(A*t)),g.name);if(isNaN(l)||isNaN(A)){var D=new Image;D.onload=mxUtils.bind(this,function(){l=Math.max(1,D.width);A=Math.max(1,D.height);v[0].geometry.width=l;v[0].geometry.height=A;k.setAttribute("viewBox","0 0 "+l+" "+A);m=this.createSvgDataUri(mxUtils.getXml(k));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));p.setCellStyles("image",m,[v[0]])});D.src=this.createSvgDataUri(mxUtils.getXml(k))}return v}}}catch(pa){}return null})):v(f,mxUtils.bind(this,function(){return e(D,
|
|
|
|
|
"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else v(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==g.type){var y=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=y&&0<y.length){var F=new Image;F.src=a.target.result;v(f,mxUtils.bind(this,function(){return e(y,"text/xml",b+f*n,c+f*n,F.width,F.height,g.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(l){this.resizeImage(l,a.target.result,mxUtils.bind(this,function(l,p,m){v(f,mxUtils.bind(this,function(){if(null!=l&&l.length<A){var q=k&&this.isResampleImage(a.target.result,B)?Math.min(1,Math.min(d/p,d/m)):1;return e(l,g.type,b+f*n,c+f*n,Math.round(p*q),Math.round(m*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});
|
|
|
|
|
return null}))}),k,d,B)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*n,c+f*n,240,160,g.name,function(a){v(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)}})(D)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);
|
|
|
|
|
a=p;this.confirmImageResize(function(a){k=a;x()},n)}else x()};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,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,
|
|
|
|
|
2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,l,m,n,A,t,H){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var f=null!=b&&null!=c,k=!0,p=!1;if(!mxClient.IS_CHROMEAPP&&
|
|
|
|
|
null!=a)for(var q=t||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>q){p=!0;break}var B=mxUtils.bind(this,function(){var p=this.editor.graph,n=p.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,l,p){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,g,k,l,p,f,H)});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,
|
|
|
|
|
mxResources.get("loading")))for(var q=a.length,u=q,B=[],x=mxUtils.bind(this,function(a,b){B[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(B);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<B.length;d++){var f=B[d]();null!=f&&(c=c.concat(f))}}finally{p.getModel().endUpdate()}}g(c)}}),v=0;v<q;v++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.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 m=a.target.result,q=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(q+1)))),B=mxUtils.parseXml(u),u=B.getElementsByTagName("svg");if(0<u.length){var u=u[0],v=H?null:u.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?x(f,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=
|
|
|
|
|
B){var a=B.getElementsByTagName("svg");if(0<a.length){var k=a[0],l=parseFloat(k.getAttribute("width")),A=parseFloat(k.getAttribute("height")),u=k.getAttribute("viewBox");if(null==u||0==u.length)k.setAttribute("viewBox","0 0 "+l+" "+A);else if(isNaN(l)||isNaN(A)){var t=u.split(" ");3<t.length&&(l=parseFloat(t[2]),A=parseFloat(t[3]))}m=this.createSvgDataUri(mxUtils.getXml(k));var x=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,A)),v=e(m,g.type,b+f*n,c+f*n,Math.max(1,Math.round(l*x)),Math.max(1,
|
|
|
|
|
Math.round(A*x)),g.name);if(isNaN(l)||isNaN(A)){var y=new Image;y.onload=mxUtils.bind(this,function(){l=Math.max(1,y.width);A=Math.max(1,y.height);v[0].geometry.width=l;v[0].geometry.height=A;k.setAttribute("viewBox","0 0 "+l+" "+A);m=this.createSvgDataUri(mxUtils.getXml(k));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));p.setCellStyles("image",m,[v[0]])});y.src=this.createSvgDataUri(mxUtils.getXml(k))}return v}}}catch(pa){}return null})):x(f,mxUtils.bind(this,function(){return e(v,
|
|
|
|
|
"text/xml",b+f*n,c+f*n,0,0,g.name)}))}else x(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==g.type){var y=H?null:this.extractGraphModelFromPng(a.target.result);if(null!=y&&0<y.length){var E=new Image;E.src=a.target.result;x(f,mxUtils.bind(this,function(){return e(y,"text/xml",b+f*n,c+f*n,E.width,E.height,g.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(l){this.resizeImage(l,a.target.result,mxUtils.bind(this,function(l,p,m){x(f,mxUtils.bind(this,function(){if(null!=l&&l.length<A){var q=k&&this.isResampleImage(a.target.result,t)?Math.min(1,Math.min(d/p,d/m)):1;return e(l,g.type,b+f*n,c+f*n,Math.round(p*q),Math.round(m*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});
|
|
|
|
|
return null}))}),k,d,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*n,c+f*n,240,160,g.name,function(a){x(f,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*n,c+f*n,240,160,g.name,function(a){x(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)}})(v)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);
|
|
|
|
|
a=p;this.confirmImageResize(function(a){k=a;B()},n)}else B()};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,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(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):f(!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 f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};
|
|
|
|
|
f.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,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var l=Math.max(f/e,k/e);if(1<l){var p=Math.round(f/l),m=Math.round(k/l),n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,0,0,p,m);var q=n.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");
|
|
|
|
|
u.width=p;u.height=m;var t=u.toDataURL();q!==t&&(b=q,f=p,k=m)}}}catch(G){}c(b,f,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var e=d,g=0;8>g;g++)e=1==(e&1)?3988292384^e>>>1:e>>>1,EditorUi.prototype.crcTable[d]=e;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+f))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^
|
|
|
|
|
u.width=p;u.height=m;var t=u.toDataURL();q!==t&&(b=q,f=p,k=m)}}}catch(F){}c(b,f,k)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var e=d,g=0;8>g;g++)e=1==(e&1)?3988292384^e>>>1:e>>>1,EditorUi.prototype.crcTable[d]=e;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+f))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^
|
|
|
|
|
a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}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 l=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,l);do{var p=g(a);if("IDAT"==f(a,4)){e=a.substring(0,l-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(l-8,a.length);break}e+=a.substring(l-8,l-4+p);f(a,p);f(a,4)}while(p);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,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=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(q){}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){try{var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a}catch(q){if(null!=c)c(q);else throw q;}};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());
|
|
|
|
|
var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(E){a.handleError(E)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=
|
|
|
|
|
var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(D){a.handleError(D)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=
|
|
|
|
|
null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var e=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&
|
|
|
|
|
b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};e.call(this,a,c,d)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var g=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():
|
|
|
|
|
"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:g.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,
|
|
|
|
@ -8662,17 +8662,17 @@ this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(8
|
|
|
|
|
c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var g=e[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,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(X){}}),!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 B=!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 c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||
|
|
|
|
|
null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||B||(A.style.left=b.container.scrollLeft+10+"px",A.style.top=b.container.scrollTop+10+"px",b.container.appendChild(A),B=!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 c=
|
|
|
|
|
a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!B||224!=c&&17!=c&&91!=c||(B=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),A.parentNode.removeChild(A),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(A,"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(A),t()}catch(F){this.handleError(F)}}));mxEvent.addListener(A,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(A,
|
|
|
|
|
!0),t()}catch(F){this.handleError(F)}}));mxEvent.addListener(A,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(A.innerHTML=" ",A.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,A);A.innerHTML=" "}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==A?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
|
|
|
|
|
a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!B||224!=c&&17!=c&&91!=c||(B=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),A.parentNode.removeChild(A),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(A,"copy",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(A),t()}catch(E){this.handleError(E)}}));mxEvent.addListener(A,"cut",mxUtils.bind(this,function(a){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(A,
|
|
|
|
|
!0),t()}catch(E){this.handleError(E)}}));mxEvent.addListener(A,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(A.innerHTML=" ",A.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,A);A.innerHTML=" "}),0))}),!0);var H=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==A?!0:H.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,f,e,g){b.insertImage(a,e,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 f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):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){n=document.createElement("div");n.style.position="absolute";n.style.top="95px";n.style.left="250px";n.style.width="2000px";n.style.height="30px";n.style.background="whiteSmoke";document.body.appendChild(n);var v=document.createElement("div");v.style.position="absolute";v.style.top="125px";v.style.left="220px";
|
|
|
|
|
v.style.width="30px";v.style.height="1000px";v.style.background="whiteSmoke";document.body.appendChild(v);var K=document.createElement("div");K.style.position="absolute";K.style.top="95px";K.style.left="220px";K.style.width="30px";K.style.height="30px";K.style.background="whiteSmoke";document.body.appendChild(K);this.vRuler=new mxRuler(this.editor.graph,v,!0);this.hRuler=new mxRuler(this.editor.graph,n,!1)}if("1"==urlParams.styledev){n=document.getElementById("geFooter");null!=n&&(this.styleInput=
|
|
|
|
|
document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),n.appendChild(this.styleInput),
|
|
|
|
|
this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(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 H=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:H.apply(this,arguments)}}n=document.getElementById("geInfo");
|
|
|
|
|
null!=n&&n.parentNode.removeChild(n);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var G=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=G&&(G.parentNode.removeChild(G),G=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();
|
|
|
|
|
a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=G&&(G.parentNode.removeChild(G),G=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=
|
|
|
|
|
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)}}n=document.getElementById("geInfo");
|
|
|
|
|
null!=n&&n.parentNode.removeChild(n);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var F=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();
|
|
|
|
|
a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=F&&(F.parentNode.removeChild(F),F=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,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,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var p=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(p=
|
|
|
|
|
!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var m=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,g,!0,p,null,m))});p&&l.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 c=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,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();
|
|
|
|
@ -8728,18 +8728,18 @@ l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpReq
|
|
|
|
|
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.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),
|
|
|
|
|
0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e={};if(0<c.length){var f={},g=null,k=null,l=null,m=null,n="",t="auto",v="auto",K=null,H=null,G=40,J=40,F=100,E=0,I=this.editor.graph;I.getGraphBounds();for(var L=function(){null!=b?b(ia):(I.setSelectionCells(ia),I.scrollCellToVisible(I.getSelectionCell()))},P=I.getFreeInsertPoint(),T=P.x,W=P.y,P=W,X=null,S="auto",m=null,V=[],ha=null,ea=null,Y=0;Y<c.length&&"#"==c[Y].charAt(0);){a=c[Y];
|
|
|
|
|
0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e={};if(0<c.length){var f={},g=null,k=null,l=null,m=null,n="",t="auto",v="auto",K=null,G=null,F=40,J=40,E=100,D=0,I=this.editor.graph;I.getGraphBounds();for(var L=function(){null!=b?b(ia):(I.setSelectionCells(ia),I.scrollCellToVisible(I.getSelectionCell()))},P=I.getFreeInsertPoint(),T=P.x,W=P.y,P=W,X=null,S="auto",m=null,V=[],ha=null,ea=null,Y=0;Y<c.length&&"#"==c[Y].charAt(0);){a=c[Y];
|
|
|
|
|
for(Y++;Y<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Y].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Y].substring(1)),Y++;if("#"!=a.charAt(1)){var Z=a.indexOf(":");if(0<Z){var M=mxUtils.trim(a.substring(1,Z)),O=mxUtils.trim(a.substring(Z+1));"label"==M?X=I.sanitizeHtml(O):"style"==M?g=O:"parentstyle"==M?k=O:"identity"==M&&0<O.length&&"-"!=O?l=O:"parent"==M&&0<O.length&&"-"!=O?m=O:"namespace"==M&&0<O.length&&"-"!=O?n=O:"width"==M?t=O:"height"==M?v=O:"left"==M&&0<O.length?K=O:"top"==M&&0<
|
|
|
|
|
O.length?H=O:"ignore"==M?ea=O.split(","):"connect"==M?V.push(JSON.parse(O)):"link"==M?ha=O:"padding"==M?E=parseFloat(O):"edgespacing"==M?G=parseFloat(O):"nodespacing"==M?J=parseFloat(O):"levelspacing"==M?F=parseFloat(O):"layout"==M&&(S=O)}}}if(null==c[Y])throw Error(mxResources.get("invalidOrMissingFile"));var ga=this.editor.csvToArray(c[Y]),M=Z=null;if(null!=l||null!=m)for(var Q=0;Q<ga.length;Q++)l==ga[Q]&&(Z=Q),m==ga[Q]&&(M=Q);null==X&&(X="%"+ga[0]+"%");if(null!=V)for(var R=0;R<V.length;R++)null==
|
|
|
|
|
O.length?G=O:"ignore"==M?ea=O.split(","):"connect"==M?V.push(JSON.parse(O)):"link"==M?ha=O:"padding"==M?D=parseFloat(O):"edgespacing"==M?F=parseFloat(O):"nodespacing"==M?J=parseFloat(O):"levelspacing"==M?E=parseFloat(O):"layout"==M&&(S=O)}}}if(null==c[Y])throw Error(mxResources.get("invalidOrMissingFile"));var ga=this.editor.csvToArray(c[Y]),M=Z=null;if(null!=l||null!=m)for(var Q=0;Q<ga.length;Q++)l==ga[Q]&&(Z=Q),m==ga[Q]&&(M=Q);null==X&&(X="%"+ga[0]+"%");if(null!=V)for(var R=0;R<V.length;R++)null==
|
|
|
|
|
f[V[R].to]&&(f[V[R].to]={});I.model.beginUpdate();try{for(Q=Y+1;Q<c.length;Q++){var ca=this.editor.csvToArray(c[Q]);if(null==ca){var aa=40<c[Q].length?c[Q].substring(0,40)+"...":c[Q];throw Error(Q+" ("+aa+") "+mxResources.get("containsValidationErrors"));}if(ca.length==ga.length){var N=null,U=null!=Z?n+ca[Z]:null;null!=U&&(N=I.model.getCell(U));var l=null!=N,ba=new mxCell(X,new mxGeometry(T,P,0,0),g||"whiteSpace=wrap;html=1;");ba.vertex=!0;ba.id=U;for(var da=0;da<ca.length;da++)I.setAttributeForCell(ba,
|
|
|
|
|
ga[da],ca[da]);I.setAttributeForCell(ba,"placeholders","1");ba.style=I.replacePlaceholders(ba,ba.style);l&&(I.model.setGeometry(N,ba.geometry),I.model.setStyle(N,ba.style),0>mxUtils.indexOf(d,N)&&d.push(N));N=ba;if(!l)for(R=0;R<V.length;R++)f[V[R].to][N.getAttribute(V[R].to)]=N;null!=ha&&"link"!=ha&&(I.setLinkForCell(N,N.getAttribute(ha)),I.setAttributeForCell(N,ha,null));I.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var fa=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=
|
|
|
|
|
K&&null!=N.getAttribute(K)&&(N.geometry.x=T+parseFloat(N.getAttribute(K))),null!=H&&null!=N.getAttribute(H)&&(N.geometry.y=W+parseFloat(N.getAttribute(H))),"@"==t.charAt(0)&&null!=N.getAttribute(t.substring(1))?N.geometry.width=parseFloat(N.getAttribute(t.substring(1))):N.geometry.width="auto"==t?fa.width+E:parseFloat(t),"@"==v.charAt(0)&&null!=N.getAttribute(v.substring(1))?N.geometry.height=parseFloat(N.getAttribute(v.substring(1))):N.geometry.height="auto"==v?fa.height+E:parseFloat(v),P+=N.geometry.height+
|
|
|
|
|
K&&null!=N.getAttribute(K)&&(N.geometry.x=T+parseFloat(N.getAttribute(K))),null!=G&&null!=N.getAttribute(G)&&(N.geometry.y=W+parseFloat(N.getAttribute(G))),"@"==t.charAt(0)&&null!=N.getAttribute(t.substring(1))?N.geometry.width=parseFloat(N.getAttribute(t.substring(1))):N.geometry.width="auto"==t?fa.width+D:parseFloat(t),"@"==v.charAt(0)&&null!=N.getAttribute(v.substring(1))?N.geometry.height=parseFloat(N.getAttribute(v.substring(1))):N.geometry.height="auto"==v?fa.height+D:parseFloat(v),P+=N.geometry.height+
|
|
|
|
|
J);l?(null==e[U]&&(e[U]=[]),e[U].push(N)):(m=null!=M?I.model.getCell(n+ca[M]):null,null!=m?(m.style=I.replacePlaceholders(m,k),I.addCell(N,m)):d.push(I.addCell(N)))}}for(var ja=d.slice(),ia=d.slice(),R=0;R<V.length;R++)for(var pa=V[R],Q=0;Q<d.length;Q++){var N=d[Q],ra=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d){I.setAttributeForCell(b,c.from,null);for(var d=d.split(","),e=0;e<d.length;e++){var g=f[c.to][d[e]];if(null!=g){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||
|
|
|
|
|
"")+(k||""));null!=c.tolabel&&(k=(k||"")+(g.getAttribute(c.tolabel)||""));ia.push(I.insertEdge(null,null,k||"",c.invert?g:a,c.invert?a:g,c.style||I.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:g,ja)}}}});ra(N,N,pa);if(null!=e[N.id])for(da=0;da<e[N.id].length;da++)ra(N,e[N.id][da],pa)}if(null!=ea)for(Q=0;Q<d.length;Q++)for(N=d[Q],da=0;da<ea.length;da++)I.setAttributeForCell(N,mxUtils.trim(ea[da]),null);if(0<d.length){var ka=new mxParallelEdgeLayout(I);ka.spacing=G;var qa=function(){0<ka.spacing&&
|
|
|
|
|
"")+(k||""));null!=c.tolabel&&(k=(k||"")+(g.getAttribute(c.tolabel)||""));ia.push(I.insertEdge(null,null,k||"",c.invert?g:a,c.invert?a:g,c.style||I.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:g,ja)}}}});ra(N,N,pa);if(null!=e[N.id])for(da=0;da<e[N.id].length;da++)ra(N,e[N.id][da],pa)}if(null!=ea)for(Q=0;Q<d.length;Q++)for(N=d[Q],da=0;da<ea.length;da++)I.setAttributeForCell(N,mxUtils.trim(ea[da]),null);if(0<d.length){var ka=new mxParallelEdgeLayout(I);ka.spacing=F;var qa=function(){0<ka.spacing&&
|
|
|
|
|
ka.execute(I.getDefaultParent());for(var a=0;a<d.length;a++){var b=I.getCellGeometry(d[a]);b.x=Math.round(I.snap(b.x));b.y=Math.round(I.snap(b.y));"auto"==t&&(b.width=Math.round(I.snap(b.width)));"auto"==v&&(b.height=Math.round(I.snap(b.height)))}};if("["==S.charAt(0)){var sa=L;I.view.validate();this.executeLayoutList(JSON.parse(S),function(){qa();sa()});L=null}else if("circle"==S){var na=new mxCircleLayout(I);na.resetEdges=!1;var ta=na.isVertexIgnored;na.isVertexIgnored=function(a){return ta.apply(this,
|
|
|
|
|
arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){na.execute(I.getDefaultParent());qa()},!0,L);L=null}else if("horizontaltree"==S||"verticaltree"==S||"auto"==S&&ia.length==2*d.length-1&&1==ja.length){I.view.validate();var oa=new mxCompactTreeLayout(I,"horizontaltree"==S);oa.levelDistance=J;oa.edgeRouting=!1;oa.resetEdges=!1;this.executeLayout(function(){oa.execute(I.getDefaultParent(),0<ja.length?ja[0]:null)},!0,L);L=null}else if("horizontalflow"==S||"verticalflow"==S||"auto"==S&&
|
|
|
|
|
1==ja.length){I.view.validate();var la=new mxHierarchicalLayout(I,"horizontalflow"==S?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);la.intraCellSpacing=J;la.parallelEdgeSpacing=G;la.interRankCellSpacing=F;la.disableEdgeStyle=!1;this.executeLayout(function(){la.execute(I.getDefaultParent(),ia);I.moveCells(ia,T,W)},!0,L);L=null}else if("organic"==S||"auto"==S&&ia.length>d.length){I.view.validate();var ma=new mxFastOrganicLayout(I);ma.forceConstant=3*J;ma.resetEdges=!1;var ua=ma.isVertexIgnored;
|
|
|
|
|
ma.isVertexIgnored=function(a){return ua.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ka=new mxParallelEdgeLayout(I);ka.spacing=G;this.executeLayout(function(){ma.execute(I.getDefaultParent());qa()},!0,L);L=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=L&&L()}}catch(va){this.handleError(va)}};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)&&
|
|
|
|
|
1==ja.length){I.view.validate();var la=new mxHierarchicalLayout(I,"horizontalflow"==S?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);la.intraCellSpacing=J;la.parallelEdgeSpacing=F;la.interRankCellSpacing=E;la.disableEdgeStyle=!1;this.executeLayout(function(){la.execute(I.getDefaultParent(),ia);I.moveCells(ia,T,W)},!0,L);L=null}else if("organic"==S||"auto"==S&&ia.length>d.length){I.view.validate();var ma=new mxFastOrganicLayout(I);ma.forceConstant=3*J;ma.resetEdges=!1;var ua=ma.isVertexIgnored;
|
|
|
|
|
ma.isVertexIgnored=function(a){return ua.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ka=new mxParallelEdgeLayout(I);ka.spacing=F;this.executeLayout(function(){ma.execute(I.getDefaultParent());qa()},!0,L);L=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=L&&L()}}catch(va){this.handleError(va)}};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,480,130,!0,!0);a.init()};var m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=m.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)&&
|
|
|
|
@ -8776,23 +8776,23 @@ var CommentsWindow=function(a,c,b,d,e,g){function l(){for(var a=C.getElementsByT
|
|
|
|
|
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),l()):e();x=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);x=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
|
|
|
|
|
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function n(b,c){c.innerHTML="";var d=a.timeSince(new Date(b.modifiedDate));null==d&&(d=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
|
|
|
|
|
[d],"{1} ago"))}function t(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src="/images/spin.gif";a.appendChild(b);a.busyImg=b}function f(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function k(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,e,g){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className="geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,
|
|
|
|
|
"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});L.appendChild(e);d&&(e.style.display="none")}function D(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=F;a(b);return{pdiv:d,replies:c}}function y(c,d,g,l,n){function A(){t(u);b.addReply(v,function(a){v.id=a;b.replies.push(v);k(u);g&&g()},function(b){q();f(u);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,n)}function q(){m(v,
|
|
|
|
|
u,function(a){A()},!0)}var B=D().pdiv,v=a.newComment(c,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=p(v,b.replies,B,e+1);d?q():A()}if(g||!b.isResolved){A.style.display="none";var F=document.createElement("div");F.className="geCommentContainer";F.setAttribute("data-commentId",b.id);F.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(F.style.backgroundColor="ghostWhite");var z=document.createElement("div");z.className="geCommentHeader";var E=document.createElement("img");
|
|
|
|
|
E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;z.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";z.appendChild(E);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,b.user.displayName||"");E.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",b.id);n(b,K);E.appendChild(K);F.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,
|
|
|
|
|
b.content||"");F.appendChild(z);z=document.createElement("div");z.className="geCommentActions";var L=document.createElement("ul");L.className="geCommentActionsList";z.appendChild(L);u||0!=e&&!q||B(mxResources.get("reply"),function(){y("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||u||(B(mxResources.get("edit"),function(){function c(){m(b,F,function(){t(F);b.editComment(b.content,function(){k(F)},function(b){f(F);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}
|
|
|
|
|
c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){t(F);b.deleteComment(function(){for(var a=D(b).replies,d=0;d<a.length;d++)C.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}A.style.display=0==C.getElementsByTagName("div").length?"block":"none"},function(b){f(F);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=e||B(b.isResolved?mxResources.get("reopen"):
|
|
|
|
|
mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=D(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);v||(e[g].style.display="none")}l()}
|
|
|
|
|
b.isResolved?y(mxResources.get("reOpened")+": ",!0,c,!1,!0):y(mxResources.get("markedAsResolved"),!1,c,!0)});F.appendChild(z);null!=d?C.insertBefore(F,d.nextSibling):C.appendChild(F);for(d=0;null!=b.replies&&d<b.replies.length;d++)z=b.replies[d],z.isResolved=b.isResolved,p(z,b.replies,null,e+1,g);null!=x&&(x.comment.id==b.id?(g=b.content,b.content=x.comment.content,m(b,F,x.saveCallback,x.deleteOnCancel),b.content=g):null==x.comment.id&&x.comment.pCommentId==b.id&&(C.appendChild(x.div),m(x.comment,
|
|
|
|
|
x.div,x.saveCallback,x.deleteOnCancel)));return F}}var u=!a.canComment(),q=a.canReplyToReplies(),x=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;C.style.bottom=parseInt(y)+7+"px";z.appendChild(C);var A=document.createElement("span");
|
|
|
|
|
"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});L.appendChild(e);d&&(e.style.display="none")}function H(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=E;a(b);return{pdiv:d,replies:c}}function y(c,d,g,l,n){function A(){t(u);b.addReply(v,function(a){v.id=a;b.replies.push(v);k(u);g&&g()},function(b){q();f(u);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,n)}function q(){m(v,
|
|
|
|
|
u,function(a){A()},!0)}var B=H().pdiv,v=a.newComment(c,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=p(v,b.replies,B,e+1);d?q():A()}if(g||!b.isResolved){A.style.display="none";var E=document.createElement("div");E.className="geCommentContainer";E.setAttribute("data-commentId",b.id);E.style.marginLeft=20*e+5+"px";b.isResolved&&"dark"!=uiTheme&&(E.style.backgroundColor="ghostWhite");var z=document.createElement("div");z.className="geCommentHeader";var D=document.createElement("img");
|
|
|
|
|
D.className="geCommentUserImg";D.src=b.user.pictureUrl||Editor.userImage;z.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";z.appendChild(D);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,b.user.displayName||"");D.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",b.id);n(b,K);D.appendChild(K);E.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,
|
|
|
|
|
b.content||"");E.appendChild(z);z=document.createElement("div");z.className="geCommentActions";var L=document.createElement("ul");L.className="geCommentActionsList";z.appendChild(L);u||0!=e&&!q||B(mxResources.get("reply"),function(){y("",!0)},b.isResolved);D=a.getCurrentUser();null==D||D.id!=b.user.id||u||(B(mxResources.get("edit"),function(){function c(){m(b,E,function(){t(E);b.editComment(b.content,function(){k(E)},function(b){f(E);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}
|
|
|
|
|
c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){t(E);b.deleteComment(function(){for(var a=H(b).replies,d=0;d<a.length;d++)C.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}A.style.display=0==C.getElementsByTagName("div").length?"block":"none"},function(b){f(E);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=e||B(b.isResolved?mxResources.get("reopen"):
|
|
|
|
|
mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=H(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);v||(e[g].style.display="none")}l()}
|
|
|
|
|
b.isResolved?y(mxResources.get("reOpened")+": ",!0,c,!1,!0):y(mxResources.get("markedAsResolved"),!1,c,!0)});E.appendChild(z);null!=d?C.insertBefore(E,d.nextSibling):C.appendChild(E);for(d=0;null!=b.replies&&d<b.replies.length;d++)z=b.replies[d],z.isResolved=b.isResolved,p(z,b.replies,null,e+1,g);null!=x&&(x.comment.id==b.id?(g=b.content,b.content=x.comment.content,m(b,E,x.saveCallback,x.deleteOnCancel),b.content=g):null==x.comment.id&&x.comment.pCommentId==b.id&&(C.appendChild(x.div),m(x.comment,
|
|
|
|
|
x.div,x.saveCallback,x.deleteOnCancel)));return E}}var u=!a.canComment(),q=a.canReplyToReplies(),x=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;C.style.bottom=parseInt(y)+7+"px";z.appendChild(C);var A=document.createElement("span");
|
|
|
|
|
A.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(A,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=y;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(B.style.filter="none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter=
|
|
|
|
|
"none");if(!u){var D=y.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(D,"click",function(b){function c(){m(d,e,function(b){t(e);a.addComment(b,function(a){b.id=a;K.push(b);k(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),e=p(d,K,null,0);c();b.preventDefault();
|
|
|
|
|
mxEvent.consume(b)});B.appendChild(D)}D=y.cloneNode();D.innerHTML='<img src="/images/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));var v=!1;"dark"==uiTheme&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(a){this.className=(v=!v)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});B.appendChild(D);a.commentsRefreshNeeded()&&(D=y.cloneNode(),D.innerHTML='<img src="/images/update16.png" style="width: 16px; padding: 2px;">',
|
|
|
|
|
D.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),B.appendChild(D));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="/images/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){g();a.preventDefault();mxEvent.consume(a)}),
|
|
|
|
|
B.appendChild(y));z.appendChild(B);var K=[],H=mxUtils.bind(this,function(){if(null!=x){x.div=x.div.cloneNode(!0);var b=x.div.querySelector(".geCommentEditTxtArea"),c=x.div.querySelector(".geCommentEditBtns");x.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="/images/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?
|
|
|
|
|
"none");if(!u){var H=y.cloneNode();H.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';H.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(H,"click",function(b){function c(){m(d,e,function(b){t(e);a.addComment(b,function(a){b.id=a;K.push(b);k(e)},function(b){f(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),e=p(d,K,null,0);c();b.preventDefault();
|
|
|
|
|
mxEvent.consume(b)});B.appendChild(H)}H=y.cloneNode();H.innerHTML='<img src="/images/check.png" style="width: 16px; padding: 2px;">';H.setAttribute("title",mxResources.get("showResolved"));var v=!1;"dark"==uiTheme&&(H.style.filter="invert(100%)");mxEvent.addListener(H,"click",function(a){this.className=(v=!v)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});B.appendChild(H);a.commentsRefreshNeeded()&&(H=y.cloneNode(),H.innerHTML='<img src="/images/update16.png" style="width: 16px; padding: 2px;">',
|
|
|
|
|
H.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(H.style.filter="invert(100%)"),mxEvent.addListener(H,"click",function(a){G();a.preventDefault();mxEvent.consume(a)}),B.appendChild(H));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="/images/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){g();a.preventDefault();mxEvent.consume(a)}),
|
|
|
|
|
B.appendChild(y));z.appendChild(B);var K=[],G=mxUtils.bind(this,function(){if(null!=x){x.div=x.div.cloneNode(!0);var b=x.div.querySelector(".geCommentEditTxtArea"),c=x.div.querySelector(".geCommentEditBtns");x.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="/images/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?
|
|
|
|
|
a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});C.innerHTML="";C.appendChild(A);A.style.display="block";K=a;for(a=0;a<K.length;a++)b(K[a].replies),p(K[a],K,null,0,v);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(C.appendChild(x.div),m(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},
|
|
|
|
|
function(){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=C.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<K.length;d++)a(K[d])}});setInterval(B,6E4);
|
|
|
|
|
function(){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))}):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=C.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<K.length;d++)a(K[d])}});setInterval(B,6E4);
|
|
|
|
|
this.refreshCommentsTime=B;this.window=new mxWindow(mxResources.get("comments"),z,c,b,d,e,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
|
|
|
|
|
a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var G=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",G);this.destroy=function(){mxEvent.removeListener(window,"resize",G);this.window.destroy()}},
|
|
|
|
|
a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var F=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",F);this.destroy=function(){mxEvent.removeListener(window,"resize",F);this.window.destroy()}},
|
|
|
|
|
ConfirmDialog=function(a,c,b,d,e,g,l,m,n,t){var f=document.createElement("div");f.style.textAlign="center";var k=document.createElement("div");k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";k.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,c);f.appendChild(k);null!=t&&(k=document.createElement("div"),k.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",t),k.appendChild(c),f.appendChild(k));t=document.createElement("div");
|
|
|
|
|
t.style.textAlign="center";t.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(p.checked)});g.className="geBtn";null!=m&&(g.innerHTML=m+"<br>"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");a.editor.cancelFirst&&t.appendChild(g);var u=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=b&&
|
|
|
|
|
b(p.checked)});t.appendChild(u);null!=l?(u.innerHTML=l+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||t.appendChild(g);f.appendChild(t);n?(t.style.marginTop="10px",k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(p),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),k.appendChild(e),f.appendChild(k),
|
|
|
|
@ -8954,14 +8954,14 @@ a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))}c
|
|
|
|
|
DriveClient.prototype.saveFile=function(a,c,b,d,e,g,l,m){var n=mxUtils.bind(this,function(b){if(null!=d)d(b);else throw b;try{if(!a.isConflict(b)){var c="error-"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code-"+b.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"."+a.desc.headRevisionId+"."+a.desc.modifiedDate+"-size-"+a.getSize(),action:c,label:(null!=this.user?this.user.id:"unknown-user")+"."+(null!=a.sync?a.sync.clientId+"-chan-"+
|
|
|
|
|
(a.sync.channelId||"none"):"-nosync")+(this.ui.editor.autosave?"-autosave-on":"-autosave-off")})}}catch(A){}}),t=mxUtils.bind(this,function(b){n(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nUser="+(null!=this.user?this.user.id:"unknown")+"."+(null!=a.sync?a.sync.clientId:"nosync")+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(C){}});
|
|
|
|
|
try{if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),k=a.desc.etag,p=a.desc.modifiedDate,u=a.desc.headRevisionId,q=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;g=null!=g?g:!1;var x=mxUtils.bind(this,function(d,e,A){try{var B=null,x=!1,v={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)?(v.mimeType=this.xmlMimeType,B=a.desc,x=c=!0):"application/octet-stream"==v.mimeType&&
|
|
|
|
|
(v.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==m&&(m=[]),null==a.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));A||(null!=d||g||(d=this.placeholderThumbnail,e=this.placeholderMimeType),null!=d&&null!=e&&(v.thumbnail={image:d,mimeType:e}));var z=a.getData(),y=mxUtils.bind(this,function(d){try{a.saveDelay=(new Date).getTime()-f;var e=(new Date(d.modifiedDate)).getTime()-
|
|
|
|
|
(v.mimeType=this.xmlMimeType);a.constructor==DriveFile&&(null==m&&(m=[]),null==a.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));A||(null!=d||g||(d=this.placeholderThumbnail,e=this.placeholderMimeType),null!=d&&null!=e&&(v.thumbnail={image:d,mimeType:e}));var y=a.getData(),z=mxUtils.bind(this,function(d){try{a.saveDelay=(new Date).getTime()-f;var e=(new Date(d.modifiedDate)).getTime()-
|
|
|
|
|
(new Date(p)).getTime();if(0>=e||k==d.etag||c&&u==d.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");k==d.etag&&g.push("stale etag");c&&u==d.headRevisionId&&g.push("stale revision");var l=g.join(", ");n({message:mxResources.get("errorSavingFile")+": "+l},d);try{EditorUi.sendReport("Critical: Error saving to Google Drive "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+" "+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"unknown")+"."+(null!=
|
|
|
|
|
a.sync?a.sync.clientId:"nosync")+"\nErrors="+l+"\nOld="+u+" "+p+" etag-hash="+this.ui.hashValue(k)+"\nNew="+d.headRevisionId+" "+d.modifiedDate+" etag-hash="+this.ui.hashValue(d.etag)),EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+p+"-"+this.ui.hashValue(k)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),null!=this.user?this.user.id:"unknown")}catch(L){}}else{b(d,z);if(null!=B){this.executeRequest(gapi.client.drive.revisions.get({fileId:B.id,
|
|
|
|
|
a.sync?a.sync.clientId:"nosync")+"\nErrors="+l+"\nOld="+u+" "+p+" etag-hash="+this.ui.hashValue(k)+"\nNew="+d.headRevisionId+" "+d.modifiedDate+" etag-hash="+this.ui.hashValue(d.etag)),EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+p+"-"+this.ui.hashValue(k)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),null!=this.user?this.user.id:"unknown")}catch(L){}}else{b(d,y);if(null!=B){this.executeRequest(gapi.client.drive.revisions.get({fileId:B.id,
|
|
|
|
|
revisionId:B.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:B.id,revisionId:B.headRevisionId,resource:a}))})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from-"+B.id+"."+B.headRevisionId+"-to-"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?this.user.id:"unknown-user."+(null!=a.sync?a.sync.clientId:"nosync")})}catch(L){}}try{EditorUi.logEvent({category:"SUCCESS-SAVE-FILE-"+
|
|
|
|
|
a.getHash()+"."+u+"."+p,action:"saved-"+d.headRevisionId+"."+d.modifiedDate+"-size-"+a.getSize(),label:(null!=this.user?this.user.id:"unknown-user")+"."+(null!=a.sync?a.sync.clientId+"-chan-"+(a.sync.channelId||"none"):"-nosync")+(this.ui.editor.autosave?"-autosave-on":"-autosave-off")})}catch(L){}}}catch(L){t(L)}}),C=mxUtils.bind(this,function(b,e){try{null!=m&&(v.properties=m);var f=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,k=mxUtils.bind(this,
|
|
|
|
|
function(d){try{var l=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),v,b,c||d||l,e,d?null:f,x),y,mxUtils.bind(this,function(b){try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(k,2*g*this.coolOff*(1+.1*(Math.random()-
|
|
|
|
|
function(d){try{var l=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),v,b,c||d||l,e,d?null:f,x),z,mxUtils.bind(this,function(b){try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(k,2*g*this.coolOff*(1+.1*(Math.random()-
|
|
|
|
|
.5)));else{k(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,null!=this.user?this.user.id:"unknown."+(null!=a.sync?a.sync.clientId:"nosync"))}catch(V){}}else null!=n&&n(b,c)}catch(V){t(V)}}),mxUtils.bind(this,function(){null!=n&&n(b)})):n(b)}catch(S){t(S)}}))}catch(X){t(X)}});if(q&&null==d){var p=new Image;p.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/p.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;
|
|
|
|
|
b.height=Math.floor(p.height*a);b.getContext("2d").drawImage(p,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");v.thumbnail={image:c,mimeType:"image/png"};k(!1)}catch(S){k(!1)}});p.src="data:image/png;base64,"+b}else k(!1)}catch(T){t(T)}});q?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){C(a,!0)}),n,this.ui.getCurrentFile()!=a?z:null):C(z,!1)}catch(J){t(J)}}),z=mxUtils.bind(this,function(){(g||q||a.constructor==DriveLibrary||!this.enableThumbnails||
|
|
|
|
|
b.height=Math.floor(p.height*a);b.getContext("2d").drawImage(p,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");v.thumbnail={image:c,mimeType:"image/png"};k(!1)}catch(S){k(!1)}});p.src="data:image/png;base64,"+b}else k(!1)}catch(T){t(T)}});q?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){C(a,!0)}),n,this.ui.getCurrentFile()!=a?y:null):C(y,!1)}catch(J){t(J)}}),z=mxUtils.bind(this,function(){(g||q||a.constructor==DriveLibrary||!this.enableThumbnails||
|
|
|
|
|
"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(A){b=null}x(b,"image/png")}catch(A){t(A)}})))&&x(null,null,a.constructor!=DriveLibrary)});e||!c?z():this.verifyMimeType(a.getId(),z,!0)}else this.ui.editor.graph.reset(),
|
|
|
|
|
null!=n&&n({message:mxResources.get("readOnly")})}catch(y){t(y)}};
|
|
|
|
|
DriveClient.prototype.verifyMimeType=function(a,c,b,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var e=(new Date).getTime();if(b||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(b){this.checkingMimeType=!1;null!=b&&"application/vnd.jgraph.mxfile.realtime"==b.mimeType?this.redirectToNewApp(d,a):null!=
|
|
|
|
@ -8996,12 +8996,12 @@ DriveClient.prototype.jsonToCell=function(a,c){var b=new mxCell;b.id=a.cellId.js
|
|
|
|
|
DriveClient.prototype.checkRealtimeFiles=function(a){var c=null!=this.user&&null!=this.user.email?this.user.email:null;this.executeRequest(gapi.client.drive.files.list({maxResults:1,q:"mimeType='application/vnd.jgraph.mxfile.realtime'"+(null!=c?" and '"+c+"' in writers":""),includeTeamDriveItems:!0,supportsTeamDrives:!0}),mxUtils.bind(this,function(b){null!=b&&(null!=b.nextPageToken||null!=b.items&&0<b.items.length)&&a()}))};
|
|
|
|
|
DriveClient.prototype.convertRealtimeFiles=function(){var a=document.createElement("div");a.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:8px;background:#ffffff;z-index:2;overflow:auto;white-space:nowrap;line-height:1.5em;";document.body.appendChild(a);var c=Date.now(),b=mxUtils.bind(this,function(b,c){a.innerHTML+=b+(c?"":"<br>");a.scrollTop=a.scrollHeight});b("draw.io ("+EditorUi.VERSION+") is searching files to be converted...");this.ui.spinner.spin(document.body,
|
|
|
|
|
"Searching files...")?this.checkToken(mxUtils.bind(this,function(){var a={},e=0,g=0,l=0,m=0,n=0,t=0,f=0,k=0,p=0,u=null!=this.user&&null!=this.user.email?this.user.email:null,q="mimeType='application/vnd.jgraph.mxfile.realtime'"+(null!=u?" and '"+u+"' in writers":""),x=mxUtils.bind(this,function(){this.ui.spinner.stop();b("<br>Conversion complete. Successfully converted "+e+" file(s).",!0);0<f?b(" Failed to convert "+f+' file(s).<br><br><b>ACTION REQUIRED:</b><br><ul><li>Click <a target="_blank" href="https://drive.google.com/drive/u/0/search?q=type:application/vnd.jgraph.mxfile.realtime">here</a> to list all affected files</li><li>Open each file in turn by right-clicking the file and selecting open with draw.io</li><li>Open each file in turn. When loaded, select File->Save</li></ul>'):
|
|
|
|
|
b("<br><br>This window can now be closed.");try{var a=Date.now()-c;EditorUi.logEvent({category:"AUTO-CONVERT",action:"total-"+k+"-xml-"+l+"-json-"+g+"-done-"+e+"-fail-"+f+"-load-"+m+"-save-"+t+"-invalid-"+n+"-dt-"+Math.round(a/1E3),label:null!=this.user?this.user.id:"unknown-user"})}catch(D){}}),z=function(a){return null==a?"":null!=a.message?a.message:null!=a.error&&null!=a.error.message?a.error.message:""},y=mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,"Converting "+k+" file(s)")){b("Found "+
|
|
|
|
|
k+" file(s). This will take up to "+Math.ceil(5E3*k/6E4)+" minute(s). <b>Please do not close this window!</b><br>");var c=0,d=mxUtils.bind(this,function(A,B){var v={maxResults:1,q:q,includeTeamDriveItems:!0,supportsTeamDrives:!0};null!=A&&(v.pageToken=A);var u=!0,D=window.setTimeout(mxUtils.bind(this,function(){u=!1;d(A,B)}),this.ui.timeout);this.executeRequest(gapi.client.drive.files.list(v),mxUtils.bind(this,function(q){window.clearTimeout(D);if(u){var v=mxUtils.bind(this,function(){null!=q.nextPageToken?
|
|
|
|
|
d(q.nextPageToken):x()});if(null!=q&&null!=q.error)p++,4>p?d(A,B):(this.ui.spinner.stop(),b("Query for next file failed multiple times. Exiting.<br><br>This window can now be closed."));else if(null==q||null!=q.items&&0!=q.items.length||null==q.nextPageToken)if(null!=q&&null!=q.items&&0<q.items.length){var F=q.items[0].id;this.ui.spinner.stop();c++;this.ui.spinner.spin(document.body,"Converting file "+c+" of "+k)&&(b("Converting "+c+" of "+k+': "'+mxUtils.htmlEntities(q.items[0].title)+'" (<a href="https://drive.google.com/open?id='+
|
|
|
|
|
F+'" target="_blank">'+F+"</a>)... ",!0),window.setTimeout(mxUtils.bind(this,function(){null==a[F]?(u=a[F]=!0,D=window.setTimeout(mxUtils.bind(this,function(){u=!1;f++;m++;b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');v()}),this.ui.timeout),this.getFile(F,mxUtils.bind(this,function(a){window.clearTimeout(D);u&&(a.constructor==DriveFile?("json"==a.convertedFrom?g++:l++,u=!0,D=window.setTimeout(mxUtils.bind(this,function(){u=!1;f++;t++;b('<img src="'+
|
|
|
|
|
this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');v()}),this.ui.timeout),this.saveFile(a,null,mxUtils.bind(this,function(){window.clearTimeout(D);u&&(e++,b('OK <img src="'+Editor.checkmarkImage+'" border="0" valign="middle"/>'),v())}),mxUtils.bind(this,function(a){window.clearTimeout(D);u&&(a=z(a),f++,t++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),v())}))):(f++,n++,b('<img src="'+this.ui.editor.graph.warningImage.src+
|
|
|
|
|
'" border="0" valign="absmiddle"/> Invalid file'),v()))}),mxUtils.bind(this,function(a){window.clearTimeout(D);u&&(a=z(a),f++,m++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),v())}))):(this.ui.spinner.stop(),b("Search returned duplicate file "+F+". Exiting.<br><br>This window can now be closed."))}),null!=B?B:2E3))}else x();else d(q.nextPageToken,1E4)}}))});d()}}),C={maxResults:1E4,q:q,includeTeamDriveItems:!0,supportsTeamDrives:!0},A=mxUtils.bind(this,
|
|
|
|
|
b("<br><br>This window can now be closed.");try{var a=Date.now()-c;EditorUi.logEvent({category:"AUTO-CONVERT",action:"total-"+k+"-xml-"+l+"-json-"+g+"-done-"+e+"-fail-"+f+"-load-"+m+"-save-"+t+"-invalid-"+n+"-dt-"+Math.round(a/1E3),label:null!=this.user?this.user.id:"unknown-user"})}catch(H){}}),z=function(a){return null==a?"":null!=a.message?a.message:null!=a.error&&null!=a.error.message?a.error.message:""},y=mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,"Converting "+k+" file(s)")){b("Found "+
|
|
|
|
|
k+" file(s). This will take up to "+Math.ceil(5E3*k/6E4)+" minute(s). <b>Please do not close this window!</b><br>");var c=0,d=mxUtils.bind(this,function(A,B){var v={maxResults:1,q:q,includeTeamDriveItems:!0,supportsTeamDrives:!0};null!=A&&(v.pageToken=A);var u=!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;d(A,B)}),this.ui.timeout);this.executeRequest(gapi.client.drive.files.list(v),mxUtils.bind(this,function(q){window.clearTimeout(H);if(u){var v=mxUtils.bind(this,function(){null!=q.nextPageToken?
|
|
|
|
|
d(q.nextPageToken):x()});if(null!=q&&null!=q.error)p++,4>p?d(A,B):(this.ui.spinner.stop(),b("Query for next file failed multiple times. Exiting.<br><br>This window can now be closed."));else if(null==q||null!=q.items&&0!=q.items.length||null==q.nextPageToken)if(null!=q&&null!=q.items&&0<q.items.length){var E=q.items[0].id;this.ui.spinner.stop();c++;this.ui.spinner.spin(document.body,"Converting file "+c+" of "+k)&&(b("Converting "+c+" of "+k+': "'+mxUtils.htmlEntities(q.items[0].title)+'" (<a href="https://drive.google.com/open?id='+
|
|
|
|
|
E+'" target="_blank">'+E+"</a>)... ",!0),window.setTimeout(mxUtils.bind(this,function(){null==a[E]?(u=a[E]=!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;f++;m++;b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');v()}),this.ui.timeout),this.getFile(E,mxUtils.bind(this,function(a){window.clearTimeout(H);u&&(a.constructor==DriveFile?("json"==a.convertedFrom?g++:l++,u=!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;f++;t++;b('<img src="'+
|
|
|
|
|
this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> Timeout');v()}),this.ui.timeout),this.saveFile(a,null,mxUtils.bind(this,function(){window.clearTimeout(H);u&&(e++,b('OK <img src="'+Editor.checkmarkImage+'" border="0" valign="middle"/>'),v())}),mxUtils.bind(this,function(a){window.clearTimeout(H);u&&(a=z(a),f++,t++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),v())}))):(f++,n++,b('<img src="'+this.ui.editor.graph.warningImage.src+
|
|
|
|
|
'" border="0" valign="absmiddle"/> Invalid file'),v()))}),mxUtils.bind(this,function(a){window.clearTimeout(H);u&&(a=z(a),f++,m++,b('<img src="'+this.ui.editor.graph.warningImage.src+'" border="0" valign="absmiddle"/> '+a),v())}))):(this.ui.spinner.stop(),b("Search returned duplicate file "+E+". Exiting.<br><br>This window can now be closed."))}),null!=B?B:2E3))}else x();else d(q.nextPageToken,1E4)}}))});d()}}),C={maxResults:1E4,q:q,includeTeamDriveItems:!0,supportsTeamDrives:!0},A=mxUtils.bind(this,
|
|
|
|
|
function(a){null!=a&&(C.pageToken=a);this.executeRequest(gapi.client.drive.files.list(C),mxUtils.bind(this,function(a){k+=null!=a&&null!=a.items?a.items.length:0;null!=a.nextPageToken?A(a.nextPageToken):(this.ui.spinner.stop(),this.ui.confirm("You are about to convert "+k+" file(s)",mxUtils.bind(this,function(){y()}),mxUtils.bind(this,function(){b("Cancelled by user.<br><br>This window can now be closed.")})))}))});A()})):(this.ui.spinner.stop(),b("Busy. <br><br>This window can now be closed."))};DropboxFile=function(a,c,b){DrawioFile.call(this,a,c);this.stat=b};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
|
|
|
|
|
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
|
|
|
|
|
DropboxFile.prototype.getRevisions=function(a,c){var b=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});b.then(mxUtils.bind(this,function(b){try{for(var d=[],g=b.entries.length-1;0<=g;g--)mxUtils.bind(this,function(a){d.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
|
|
|
|
@ -9070,7 +9070,10 @@ OneDriveClient.prototype.moveFile=function(a,c,b,d){c=this.getItemRef(c);var e=t
|
|
|
|
|
OneDriveClient.prototype.insertFile=function(a,c,b,d,e,g){this.isValidFilename(a)?(e=null!=e?e:!1,this.checkExists(g,a,!0,mxUtils.bind(this,function(l){l?(l="/me/drive/root",null!=g&&(l=this.getItemURL(g,!0)),l=this.baseUrl+l+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(l,c,"PUT",null,mxUtils.bind(this,function(a){e?b(new OneDriveLibrary(this.ui,c,a)):b(new OneDriveFile(this.ui,c,a))}),d)):d()}))):d({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):
|
|
|
|
|
mxResources.get("oneDriveInvalidDeviceName")})};
|
|
|
|
|
OneDriveClient.prototype.checkExists=function(a,c,b,d){var e="/me/drive/root";null!=a&&(e=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+e+"/children/"+encodeURIComponent(c),mxUtils.bind(this,function(a){404==a.getStatus()?d(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){d(!0)},function(){d(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)}))}),function(a){d(!1)},
|
|
|
|
|
!0)};OneDriveClient.prototype.saveFile=function(a,c,b,d){var e=a.getData(),g=mxUtils.bind(this,function(g){var l=this.getItemURL(a.getId())+"/content/";this.writeFile(l,g,"PUT",null,mxUtils.bind(this,function(a){c(a,e)}),b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=a?e:null):g(e)};
|
|
|
|
|
!0)};
|
|
|
|
|
OneDriveClient.prototype.saveFile=function(a,c,b,d){var e=a.getData(),g=mxUtils.bind(this,function(g){var l=this.getItemURL(a.getId());this.writeFile(l+"/content/",g,"PUT",null,mxUtils.bind(this,function(b){try{this.executeRequest(l+"?select=size",mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){var c="string"===typeof g?g.length:g.size;b=JSON.parse(b.getText());b=null!=b?b.size:-1;if(c!=b)try{var d=this.getUser();EditorUi.sendReport("Critical: Truncated OneDrive File "+(new Date).toISOString()+
|
|
|
|
|
":\n\nBrowser="+navigator.userAgent+"\nFile="+a.getId()+" "+a.meta.file.mimeType+"\nUser="+(null!=d?d.id:"unknown")+"."+(null!=a.sync?a.sync.clientId:"nosync")+"\nError=Save Data Missing\nExpected="+c+" Actual="+b);EditorUi.logError("Critical: Truncated OneDrive File "+a.getId(),null,"expected_"+c+"-actual_"+b+"-mime_"+a.meta.file.mimeType,(null!=d?d.id:"unknown")+"."+(null!=a.sync?a.sync.clientId:"nosync"))}catch(p){}}}),mxUtils.bind(this,function(a){}))}catch(t){}c(b,e)}),b,d)});this.ui.useCanvasForExport&&
|
|
|
|
|
/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=a?e:null):g(e)};
|
|
|
|
|
OneDriveClient.prototype.writeFile=function(a,c,b,d,e,g,l){if(null!=a&&null!=c){var m=mxUtils.bind(this,function(n){var t=!0,f=window.setTimeout(mxUtils.bind(this,function(){t=!1;g({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),k=new mxXmlRequest(a,c,b);k.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=l&&a.setRequestHeader("If-Match",l)});k.send(mxUtils.bind(this,function(a){window.clearTimeout(f);
|
|
|
|
|
t&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),e(JSON.parse(a.getText()))):n||401!==a.getStatus()?g(this.parseRequestText(a),a):this.authenticate(function(){m(!0)},g,n))}),mxUtils.bind(this,function(a){window.clearTimeout(f);t&&g(this.parseRequestText(a))}))});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){m(!0)},g):m(!1)}else g({message:mxResources.get("unknownError")})};
|
|
|
|
|
OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};
|
|
|
|
@ -9122,9 +9125,9 @@ c,b,d))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,e)})
|
|
|
|
|
TrelloClient.prototype.authenticate=function(a,c,b){b&&this.logout();b=mxUtils.bind(this,function(b,e){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:b?"never":"1hour",success:function(){null!=e&&e();a()},error:function(){null!=e&&e();null!=c&&c(mxResources.get("loggedOut"))}})});this.isAuthorized()?b(!0):this.ui.showAuthDialog(this,!0,b)};TrelloClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};
|
|
|
|
|
TrelloClient.prototype.getFile=function(a,c,b,d,e){e=null!=e?e:!1;var g=mxUtils.bind(this,function(){var d=a.split(this.SEPARATOR),m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);Trello.cards.get(d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(d){window.clearTimeout(n);if(m){var f=/\.png$/i.test(d.name);/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(PROXY_URL+"?url="+
|
|
|
|
|
encodeURIComponent(d.url),d.name,d.mimeType,this.extension,c,b):(m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(b){window.clearTimeout(n);if(m){d.compoundId=a;var g=f?b.lastIndexOf(","):-1;0<g&&(g=this.ui.extractGraphModelFromPng(b.substring(g+1)),null!=g&&0<g.length&&(b=g));e?c(new TrelloLibrary(this.ui,b,d)):c(new TrelloFile(this.ui,b,d))}}),mxUtils.bind(this,
|
|
|
|
|
function(a,c){window.clearTimeout(n);m&&(401==c.status?this.authenticate(g,b,!0):b())}),f||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(401==a.status?this.authenticate(g,b,!0):b())}))});this.authenticate(g,b)};TrelloClient.prototype.insertLibrary=function(a,c,b,d,e){this.insertFile(a,c,b,d,!0,e)};
|
|
|
|
|
function(a,c){window.clearTimeout(n);m&&(401==c.status?this.authenticate(g,b,!0):b())}),f||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(null!=a&&401==a.status?this.authenticate(g,b,!0):b())}))});this.authenticate(g,b)};TrelloClient.prototype.insertLibrary=function(a,c,b,d,e){this.insertFile(a,c,b,d,!0,e)};
|
|
|
|
|
TrelloClient.prototype.insertFile=function(a,c,b,d,e,g){e=null!=e?e:!1;var l=mxUtils.bind(this,function(){var l=mxUtils.bind(this,function(l){this.writeFile(a,l,g,mxUtils.bind(this,function(a){e?b(new TrelloLibrary(this.ui,c,a)):b(new TrelloFile(this.ui,c,a))}),d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(this.ui.base64ToBlob(a,"image/png"))}),d,c):l(c)});this.authenticate(l,d)};
|
|
|
|
|
TrelloClient.prototype.saveFile=function(a,c,b){var d=a.meta.compoundId.split(this.SEPARATOR),e=mxUtils.bind(this,function(e){this.writeFile(a.meta.name,e,d[0],function(a){Trello.del("cards/"+d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(){c(a)}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(g,b,!0):b()}))},b)}),g=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,
|
|
|
|
|
TrelloClient.prototype.saveFile=function(a,c,b){var d=a.meta.compoundId.split(this.SEPARATOR),e=mxUtils.bind(this,function(e){this.writeFile(a.meta.name,e,d[0],function(a){Trello.del("cards/"+d[0]+"/attachments/"+d[1],mxUtils.bind(this,function(){c(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(g,b,!0):b()}))},b)}),g=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"))}),b,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())});this.authenticate(g,b)};
|
|
|
|
|
TrelloClient.prototype.writeFile=function(a,c,b,d,e){if(null!=a&&null!=c)if(c.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(c.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),n=new FormData;n.append("key",Trello.key());n.append("token",Trello.token());n.append("file","string"===typeof c?new Blob([c]):c,a);n.append("name",
|
|
|
|
|
a);var t=new XMLHttpRequest;t.responseType="json";t.onreadystatechange=mxUtils.bind(this,function(){if(4===t.readyState&&(window.clearTimeout(m),l))if(200==t.status){var a=t.response;a.compoundId=b+this.SEPARATOR+a.id;d(a)}else 401==t.status?this.authenticate(g,e,!0):e()});t.open("POST",this.baseUrl+"cards/"+b+"/attachments");t.send(n)});this.authenticate(g,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
|
|
|
|
@ -9160,8 +9163,8 @@ null!=a&&(a.innerHTML="Error loading page. <a>Please try refreshing.</a>",a.getE
|
|
|
|
|
"1"==urlParams.lightbox){var e=document.getElementById("geInfo");null!=e&&e.parentNode.removeChild(e)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache)mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),e=document.createElement("iframe"),e.setAttribute("width","0"),e.setAttribute("height",
|
|
|
|
|
"0"),e.setAttribute("src","offline.html"),document.body.appendChild(e);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"==urlParams.offline||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){e=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var g=JSON.parse(localStorage.getItem(mxSettings.key));null!=g&&(e=g.plugins)}catch(k){}g=urlParams.p;
|
|
|
|
|
App.initPluginCallback();null!=g&&App.loadPlugins(g.split(";"));if(null!=e&&0<e.length&&"0"!=urlParams.plugins){for(var g=window.location.protocol+"//"+window.location.host,l=!0,m=0;m<e.length&&l;m++)"/"!=e[m].charAt(0)&&e[m].substring(0,g.length)!=g&&(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",
|
|
|
|
|
[e.join("\n")]).replace(/\\n/g,"\n")))for(m=0;m<e.length;m++)try{null==App.pluginsLoaded[e[m]]&&(App.pluginsLoaded[e[m]]=!0,App.embedModePluginsCount++,mxscript(e[m]))}catch(k){}}}"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();try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var n=parseInt(mxSettings.settings.autosaveDelay);!isNaN(n)&&0<n?(DrawioFile.prototype.autosaveDelay=n,null!=window.console&&console.log("Setting autosaveDelay to "+DrawioFile.prototype.autosaveDelay)):null!=window.console&&console.log("Invalid value for autosaveDelay")}null!=mxSettings.settings.defaultEdgeLength&&
|
|
|
|
|
[e.join("\n")]).replace(/\\n/g,"\n")))for(m=0;m<e.length;m++)try{null==App.pluginsLoaded[e[m]]&&(App.pluginsLoaded[e[m]]=!0,App.embedModePluginsCount++,"/"==e[m].charAt(0)&&(e[m]=PLUGINS_BASE_PATH+e[m]),mxscript(e[m]))}catch(k){}}}"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();try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var n=parseInt(mxSettings.settings.autosaveDelay);!isNaN(n)&&0<n?(DrawioFile.prototype.autosaveDelay=n,null!=window.console&&console.log("Setting autosaveDelay to "+DrawioFile.prototype.autosaveDelay)):null!=window.console&&console.log("Invalid value for autosaveDelay")}null!=mxSettings.settings.defaultEdgeLength&&
|
|
|
|
|
(n=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(n)&&0<n?(Graph.prototype.defaultEdgeLength=n,null!=window.console&&console.log("Setting defaultEdgeLength to "+Graph.prototype.defaultEdgeLength)):null!=window.console&&console.log("Invalid value for defaultEdgeLength"))}}catch(k){null!=window.console&&console.error(k)}if("1"==urlParams.configure){var t=window.opener||window.parent,f=function(a){if(a.source==t)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,
|
|
|
|
|
"message",f),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",f);t.postMessage(JSON.stringify({event:"configure"}),"*")}else d()};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=":
|
|
|
|
@ -9196,11 +9199,11 @@ App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var c
|
|
|
|
|
App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(c){}};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.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
|
|
|
|
|
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,b=0;256>b;b++){c=b;for(var d=0;8>d;d++)c=c&1?3988292384^c>>>1:c>>>1;a[b]=c}return a};
|
|
|
|
|
App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var d=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),e=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||!d.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
|
|
|
|
|
function(a){try{d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(y){a=null}c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,d),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),m=d.getGraphBounds(),n=a/m.width,n=Math.min(1,Math.min(3*a/(4*m.height),n)),t=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 k=l.getContext("2d");k.scale(n,n);k.translate(-t,-f);var p=d.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";k.save();k.fillStyle=p;k.fillRect(t,f,Math.ceil(m.width+4),Math.ceil(m.height+4));k.restore();var u=new mxJsCanvas(l),q=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(d.getView().getState(d.model.root),q);q.finish(mxUtils.bind(this,function(){try{x.drawState(d.getView().getState(d.model.root),u),d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(z){l=null}c(l)}));b=!0}}catch(z){d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}return b};
|
|
|
|
|
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
|
|
|
|
|
App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var d=this.editor.graph,e=null!=d.themes&&"darkTheme"==d.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||e)){var d=this.createTemporaryGraph(e?d.getDefaultStylesheet():d.getStylesheet()),g=d.getGlobalVariable,l=this.pages[0];e&&(d.defaultThemeName="default");d.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(d.container);
|
|
|
|
|
d.model.setRoot(l.root)}if(mxClient.IS_CHROMEAPP||!d.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(C){a=null}c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,d),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),n=d.getGraphBounds(),t=a/n.width,t=Math.min(1,Math.min(3*
|
|
|
|
|
a/(4*n.height),t)),f=Math.floor(n.x),k=Math.floor(n.y);m.setAttribute("width",Math.ceil(t*(n.width+4)));m.setAttribute("height",Math.ceil(t*(n.height+4)));var p=m.getContext("2d");p.scale(t,t);p.translate(-f,-k);var u=d.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";p.save();p.fillStyle=u;p.fillRect(f,k,Math.ceil(n.width+4),Math.ceil(n.height+4));p.restore();var q=new mxJsCanvas(m),x=new mxAsyncCanvas(this.thumbImageCache);q.images=this.thumbImageCache.images;var z=new mxImageExport;
|
|
|
|
|
z.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};z.drawText=function(a,b){};z.drawState(d.getView().getState(d.model.root),x);x.finish(mxUtils.bind(this,function(){try{z.drawState(d.getView().getState(d.model.root),q),d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(y){m=null}c(m)}));b=!0}}catch(y){d!=this.editor.graph&&null!=d.container.parentNode&&
|
|
|
|
|
d.container.parentNode.removeChild(d.container)}return b};App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
|
|
|
|
|
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,b){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();c=null!=d?d.getMode():c;c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):c==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
|
|
|
|
|
this.appIcon.style.cursor="pointer"):c==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")}if(b)try{if(isLocalStorage)localStorage.setItem(".mode",c);else if("undefined"!=typeof Storage){var e=new Date;e.setYear(e.getFullYear()+1);document.cookie="MODE="+c+"; expires="+e.toUTCString()}}catch(g){}}})();
|
|
|
|
|
App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var c=this.getCurrentFile(),b=null!=c?c.getMode():null;b==App.MODE_GOOGLE?null!=c&&null!=c.desc&&null!=c.desc.parents&&0<c.desc.parents.length&&!mxEvent.isShiftDown(a)?this.openLink("https://drive.google.com/drive/folders/"+c.desc.parents[0].id):null!=c&&null!=c.getId()?this.openLink("https://drive.google.com/open?id="+c.getId()):this.openLink("https://drive.google.com/?authuser=0"):b==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):
|
|
|
|
@ -9368,12 +9371,12 @@ mxUtils.bind(this,function(){d.isSelectionEmpty()||a.showTextDialog("Create Side
|
|
|
|
|
mxUtils.bind(this,function(){var b=null!=a.pages&&null!=a.getCurrentFile()?a.getCurrentFile().getAnonymizedXmlForPages(a.pages):"",b=new TextareaDialog(a,"Paste Data:",b,function(b){if(0<b.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var l=d[k];if(null!=l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=
|
|
|
|
|
l.id;var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==e[m]&&(e[m]=[]),e[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=
|
|
|
|
|
b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var d=mxUtils.parseXml(b),e=a.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=a.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(b=0;b<g.length;b++)c(g[b]);mxLog.show()}catch(J){a.handleError(J),console.error(J)}});b.textarea.style.width=
|
|
|
|
|
"600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(D){a.handleError(D),console.error(D)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,
|
|
|
|
|
"600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(H){a.handleError(H),console.error(H)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,
|
|
|
|
|
!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,d.getModel())})),a.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 l=
|
|
|
|
|
e.restore;e.restore=function(){g--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);m.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)})),a.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this,
|
|
|
|
|
function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(),
|
|
|
|
|
"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),a.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),
|
|
|
|
|
c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(H){a.handleError(H,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);
|
|
|
|
|
c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(G){a.handleError(G,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);
|
|
|
|
|
this.addMenuItems(b,["-","testShowConsole"],c)}))));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,l,m,n){a.createHtml(b,c,d,e,f,g,k,l,m,n,
|
|
|
|
|
mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');e.writeln("<body>");e.writeln(b);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>");e.close();if(!f){var g=
|
|
|
|
@ -9421,7 +9424,7 @@ n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+
|
|
|
|
|
typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):g&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+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&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+
|
|
|
|
|
" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):l&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+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.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},
|
|
|
|
|
c):n&&"function"===typeof window.TrelloClient&&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);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.editor.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(G){a.handleError(G,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();
|
|
|
|
|
"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.editor.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()},c));"1"==urlParams.confLib&&(b.addSeparator(c),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){a.showRemotelyStoredLibrary(mxResources.get("libraries"))},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 editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
|
|
|
|
|
t=a.actions.addAction("comments",mxUtils.bind(this,function(){null==this.commentsWindow?(this.commentsWindow=new CommentsWindow(a,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("comments"))):(this.commentsWindow.window.setVisible(!this.commentsWindow.window.isVisible()),
|
|
|
|
|
this.commentsWindow.refreshCommentsTime())}));t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));a.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var t=this.get("viewPanels"),C=t.funct;t.funct=function(b,c){C.apply(this,arguments);a.commentsSupported()&&a.menus.addMenuItems(b,["comments"],c)};this.put("view",
|
|
|
|
@ -9495,7 +9498,7 @@ this.model.setCollapsed(d[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[
|
|
|
|
|
b?b.style:q.getCellStyle(a)).containerType);return b}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function m(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
|
|
|
|
|
a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function n(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=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;q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=q.view.getState(a),l=q.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=q.getOutgoingEdges(q.model.getTerminal(d[0],!0));if(null!=p){for(var t=f==mxConstants.DIRECTION_SOUTH||
|
|
|
|
|
f==mxConstants.DIRECTION_NORTH,x=g=d=0;x<p.length;x++){var u=q.model.getTerminal(p[x],!1);if(f==m(u)){var v=q.view.getState(u);u!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,v)&&(d=10+Math.max(d,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/l),g=10+Math.max(g,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/l))}}t?g=0:d=0;for(x=0;x<p.length;x++)if(u=q.model.getTerminal(p[x],!1),f==m(u)&&(v=q.view.getState(u),u!=a&&null!=
|
|
|
|
|
f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var x=q.model.getTerminal(p[u],!1);if(f==m(x)){var v=q.view.getState(x);x!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,v)&&(d=10+Math.max(d,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/l),g=10+Math.max(g,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/l))}}t?g=0:d=0;for(u=0;u<p.length;u++)if(x=q.model.getTerminal(p[u],!1),f==m(x)&&(v=q.view.getState(x),x!=a&&null!=
|
|
|
|
|
v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY()))){var z=[];q.traverse(v.cell,!0,function(a,b){null!=b&&z.push(b);z.push(a);return!0});q.moveCells(z,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function t(a){q.model.beginUpdate();try{var b=m(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=
|
|
|
|
|
e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);q.moveCells(g,k,l);return q.addCells(d,e)}finally{q.model.endUpdate()}}function f(a){q.model.beginUpdate();try{var b=q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],
|
|
|
|
|
a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=q.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=q.view.getBounds(f),n=m(a),p=q.view.translate,t=q.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
|
|
|
|
@ -9507,16 +9510,16 @@ a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.mod
|
|
|
|
|
u.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+D");var y=q.removeCells;
|
|
|
|
|
q.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];x.isEdge(g)&&c(g)&&(e.push(g),g=x.getTerminal(g,!1));b(g)?(q.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=q.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return y.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 C=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=C.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(a[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
|
|
|
|
|
q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var A=q.moveCells;q.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||q.model.isEdge(a[t])&&null==q.model.getTerminal(a[t],!0)){f=q.model.getParent(a[t]);break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var x=
|
|
|
|
|
q.getIncomingEdges(a[0]);if(0<x.length){var u=q.view.getState(q.model.getTerminal(x[0],!0));if(null!=u){var v=q.view.getState(m);null!=v&&(c=(v.getCenterX()-u.getCenterX())/q.view.scale,d=(v.getCenterY()-u.getCenterY())/q.view.scale)}}}}l=A.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[t],!0))&&this.model.setTerminal(l[t],m,!0);else if(b(a[t])&&(x=q.getIncomingEdges(a[t]),0<x.length))if(!e)b(m)&&
|
|
|
|
|
0>mxUtils.indexOf(a,this.model.getTerminal(x[0],!0))&&this.model.setTerminal(x[0],m,!0);else if(0==q.getIncomingEdges(l[t]).length){n=m;if(null==n||n==q.model.getParent(a[t]))n=q.model.getTerminal(x[0],!0);e=this.cloneCell(x[0]);this.addEdge(e,q.getDefaultParent(),n,l[t])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var B=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.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=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var D={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},v=u.onKeyDown;u.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&
|
|
|
|
|
(9==a.which?c=mxEvent.isShiftDown(a)?t(q.getSelectionCell()):f(q.getSelectionCell()):13==a.which&&(c=n(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=D[a.keyCode];
|
|
|
|
|
q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var A=q.moveCells;q.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||q.model.isEdge(a[t])&&null==q.model.getTerminal(a[t],!0)){f=q.model.getParent(a[t]);break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var u=
|
|
|
|
|
q.getIncomingEdges(a[0]);if(0<u.length){var x=q.view.getState(q.model.getTerminal(u[0],!0));if(null!=x){var v=q.view.getState(m);null!=v&&(c=(v.getCenterX()-x.getCenterX())/q.view.scale,d=(v.getCenterY()-x.getCenterY())/q.view.scale)}}}}l=A.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[t],!0))&&this.model.setTerminal(l[t],m,!0);else if(b(a[t])&&(u=q.getIncomingEdges(a[t]),0<u.length))if(!e)b(m)&&
|
|
|
|
|
0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==q.getIncomingEdges(l[t]).length){n=m;if(null==n||n==q.model.getParent(a[t]))n=q.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,q.getDefaultParent(),n,l[t])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var B=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.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=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var H={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},v=u.onKeyDown;u.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&
|
|
|
|
|
(9==a.which?c=mxEvent.isShiftDown(a)?t(q.getSelectionCell()):f(q.getSelectionCell()):13==a.which&&(c=n(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=H[a.keyCode];
|
|
|
|
|
null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(L){console.log("error",L)}mxEvent.isConsumed(a)||v.apply(this,arguments)};var K=q.connectVertex;q.connectVertex=
|
|
|
|
|
function(a,c,d,e,g,k){var l=q.getIncomingEdges(a);return b(a)&&0<l.length?(d=m(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?f(a):e==g?t(a):n(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):K.call(this,a,c,d,e,g,k)};q.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&q.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 H=
|
|
|
|
|
mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.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,
|
|
|
|
|
function(a,c,d,e,g,k){var l=q.getIncomingEdges(a);return b(a)&&0<l.length?(d=m(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?f(a):e==g?t(a):n(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):K.call(this,a,c,d,e,g,k)};q.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&q.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 G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.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 J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),
|
|
|
|
|
var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.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 J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),
|
|
|
|
|
this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.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 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;");
|
|
|
|
@ -9585,18 +9588,18 @@ null],60)}c=k.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.i
|
|
|
|
|
null==urlParams.libs||c(this);var k=this,l=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(k,m);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
|
|
|
|
|
k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var t=k.descriptorChanged;k.descriptorChanged=function(){t.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
|
|
|
|
|
"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};k.setStatusText(k.editor.getStatus());m.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;k.tabContainer=document.createElement("div");
|
|
|
|
|
k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var F=k.menus.get("viewZoom");if(null!=F){this.tabContainer.style.right=
|
|
|
|
|
"70px";var E=p.addMenu("100%",F.funct);E.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");E.style.whiteSpace="nowrap";E.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";E.style.backgroundPosition="right 6px center";E.style.backgroundRepeat="no-repeat";E.style.backgroundColor="#ffffff";E.style.paddingRight="10px";E.style.display="block";E.style.position="absolute";E.style.textDecoration="none";E.style.textDecoration="none";E.style.right="0px";E.style.bottom="0px";
|
|
|
|
|
E.style.overflow="hidden";E.style.visibility="hidden";E.style.textAlign="center";E.style.color="#000";E.style.fontSize="12px";E.style.color="#707070";E.style.width="59px";E.style.cursor="pointer";E.style.borderTop="1px solid lightgray";E.style.borderLeft="1px solid lightgray";E.style.height=parseInt(k.tabContainerHeight)-1+"px";E.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";u.appendChild(E);F=mxUtils.bind(this,function(){E.innerHTML=Math.round(100*k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,
|
|
|
|
|
F);k.editor.addListener("resetGraphView",F);k.editor.addListener("pageSelected",F);var I=k.setGraphEnabled;k.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(E.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer);g.appendChild(u);k.updateTabContainer();var L=null;f();mxEvent.addListener(window,
|
|
|
|
|
k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var E=k.menus.get("viewZoom");if(null!=E){this.tabContainer.style.right=
|
|
|
|
|
"70px";var D=p.addMenu("100%",E.funct);D.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");D.style.whiteSpace="nowrap";D.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";D.style.backgroundPosition="right 6px center";D.style.backgroundRepeat="no-repeat";D.style.backgroundColor="#ffffff";D.style.paddingRight="10px";D.style.display="block";D.style.position="absolute";D.style.textDecoration="none";D.style.textDecoration="none";D.style.right="0px";D.style.bottom="0px";
|
|
|
|
|
D.style.overflow="hidden";D.style.visibility="hidden";D.style.textAlign="center";D.style.color="#000";D.style.fontSize="12px";D.style.color="#707070";D.style.width="59px";D.style.cursor="pointer";D.style.borderTop="1px solid lightgray";D.style.borderLeft="1px solid lightgray";D.style.height=parseInt(k.tabContainerHeight)-1+"px";D.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";u.appendChild(D);E=mxUtils.bind(this,function(){D.innerHTML=Math.round(100*k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,
|
|
|
|
|
E);k.editor.addListener("resetGraphView",E);k.editor.addListener("pageSelected",E);var I=k.setGraphEnabled;k.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(D.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer);g.appendChild(u);k.updateTabContainer();var L=null;f();mxEvent.addListener(window,
|
|
|
|
|
"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
|
|
|
|
|
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,g,l){var d=c.y,e=c.x,t=!1,f=!1;if(null!=this.states&&null!=b&&null!=c){var k=this,p=new mxCellState,u=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+e;p.y=b.y+d;p.width=b.width;p.height=b.height;for(var x=[],z=[],y=0;y<this.states.length;y++){var C=this.states[y];C instanceof mxCellState&&(l||!this.graph.isCellSelected(C.cell))&&((p.x>=C.x&&p.x<=C.x+C.width||C.x>=p.x&&C.x<=p.x+p.width)&&(p.y>
|
|
|
|
|
C.y+C.height+4||p.y+p.height+4<C.y)?x.push(C):(p.y>=C.y&&p.y<=C.y+C.height||C.y>=p.y&&C.y<=p.y+p.height)&&(p.x>C.x+C.width+4||p.x+p.width+4<C.x)&&z.push(C))}var A=0,B=0,D=C=0,v=0,K=0,H=0,G=0,J=5*u;if(1<x.length){x.push(p);x.sort(function(a,b){return a.y-b.y});var F=!1,y=p==x[0],u=p==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(p==x[y]){u=x[y-1];y=x[y+1];C=B=D=(y.y-u.y-u.height-p.height)/2;break}for(y=0;y<x.length-1;y++){var u=x[y],E=x[y+1],I=p==u||p==E,E=E.y-u.y-u.height,F=F|p==u;if(0==B&&
|
|
|
|
|
0==A)B=E,A=1;else if(Math.abs(B-E)<=(I||1==y&&F?q:0))A+=1;else if(1<A&&F){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!F)A=0,C=B=0!=D?D:0,x.splice(0,0==y?1:y),y=-1;else break;0!=C||I||(B=C=E)}3==x.length&&x[1]==p&&(C=0)}if(1<z.length){z.push(p);z.sort(function(a,b){return a.x-b.x});F=!1;y=p==z[0];u=p==z[z.length-1];if(!y&&!u)for(y=1;y<z.length-1;y++)if(p==z[y]){u=z[y-1];y=z[y+1];H=K=G=(y.x-u.x-u.width-p.width)/2;break}for(y=0;y<z.length-1;y++){u=z[y];E=z[y+1];I=p==u||p==E;E=E.x-u.x-u.width;F|=p==
|
|
|
|
|
u;if(0==K&&0==v)K=E,v=1;else if(Math.abs(K-E)<=(I||1==y&&F?q:0))v+=1;else if(1<v&&F){z=z.slice(0,y+1);break}else if(3<=z.length-y&&!F)v=0,H=K=0!=G?G:0,z.splice(0,0==y?1:y),y=-1;else break;0!=H||I||(K=H=E)}3==z.length&&z[1]==p&&(H=0)}q=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
|
|
|
|
|
mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(k.graph.getView().getOverlayPane());return a};K=function(a,b){if(a&&null!=k.guidesArrHor)for(var c=0;c<k.guidesArrHor.length;c++)k.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=k.guidesArrVer)for(c=0;c<k.guidesArrVer.length;c++)k.guidesArrVer[c].node.style.visibility="hidden"};if(1<v&&v==z.length-1){v=[];G=k.guidesArrHor;t=[];e=0;y=z[0]==p?1:0;F=z[y].y+z[y].height;if(0<H)for(y=0;y<z.length-1;y++)u=
|
|
|
|
|
z[y],E=z[y+1],p==u?(e=E.x-u.width-H,t.push(new mxPoint(e+u.width+J,F)),t.push(new mxPoint(E.x-J,F))):p==E?(t.push(new mxPoint(u.x+u.width+J,F)),e=u.x+u.width+H,t.push(new mxPoint(e-J,F))):(t.push(new mxPoint(u.x+u.width+J,F)),t.push(new mxPoint(E.x-J,F)));else u=z[0],y=z[2],e=u.x+u.width+(y.x-u.x-u.width-p.width)/2,t.push(new mxPoint(u.x+u.width+J,F)),t.push(new mxPoint(e-J,F)),t.push(new mxPoint(e+p.width+J,F)),t.push(new mxPoint(y.x-J,F));for(y=0;y<t.length;y+=2)z=t[y],H=t[y+1],z=q(z,H,null!=G?
|
|
|
|
|
G[y/2]:null),z.node.style.visibility="visible",z.redraw(),v.push(z);for(y=t.length/2;null!=G&&y<G.length;y++)G[y].destroy();k.guidesArrHor=v;e-=b.x;t=!0}else K(!0);if(1<A&&A==x.length-1){v=[];G=k.guidesArrVer;f=[];d=0;y=x[0]==p?1:0;A=x[y].x+x[y].width;if(0<C)for(y=0;y<x.length-1;y++)u=x[y],E=x[y+1],p==u?(d=E.y-u.height-C,f.push(new mxPoint(A,d+u.height+J)),f.push(new mxPoint(A,E.y-J))):p==E?(f.push(new mxPoint(A,u.y+u.height+J)),d=u.y+u.height+C,f.push(new mxPoint(A,d-J))):(f.push(new mxPoint(A,u.y+
|
|
|
|
|
u.height+J)),f.push(new mxPoint(A,E.y-J)));else u=x[0],y=x[2],d=u.y+u.height+(y.y-u.y-u.height-p.height)/2,f.push(new mxPoint(A,u.y+u.height+J)),f.push(new mxPoint(A,d-J)),f.push(new mxPoint(A,d+p.height+J)),f.push(new mxPoint(A,y.y-J));for(y=0;y<f.length;y+=2)z=f[y],H=f[y+1],z=q(z,H,null!=G?G[y/2]:null,!0),z.node.style.visibility="visible",z.redraw(),v.push(z);for(y=f.length/2;null!=G&&y<G.length;y++)G[y].destroy();k.guidesArrVer=v;d-=b.y;f=!0}else K(!1,!0)}if(t||f)return p=new mxPoint(e,d),x=a.call(this,
|
|
|
|
|
C.y+C.height+4||p.y+p.height+4<C.y)?x.push(C):(p.y>=C.y&&p.y<=C.y+C.height||C.y>=p.y&&C.y<=p.y+p.height)&&(p.x>C.x+C.width+4||p.x+p.width+4<C.x)&&z.push(C))}var A=0,B=0,H=C=0,v=0,K=0,G=0,F=0,J=5*u;if(1<x.length){x.push(p);x.sort(function(a,b){return a.y-b.y});var E=!1,y=p==x[0],u=p==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(p==x[y]){u=x[y-1];y=x[y+1];C=B=H=(y.y-u.y-u.height-p.height)/2;break}for(y=0;y<x.length-1;y++){var u=x[y],D=x[y+1],I=p==u||p==D,D=D.y-u.y-u.height,E=E|p==u;if(0==B&&
|
|
|
|
|
0==A)B=D,A=1;else if(Math.abs(B-D)<=(I||1==y&&E?q:0))A+=1;else if(1<A&&E){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!E)A=0,C=B=0!=H?H:0,x.splice(0,0==y?1:y),y=-1;else break;0!=C||I||(B=C=D)}3==x.length&&x[1]==p&&(C=0)}if(1<z.length){z.push(p);z.sort(function(a,b){return a.x-b.x});E=!1;y=p==z[0];u=p==z[z.length-1];if(!y&&!u)for(y=1;y<z.length-1;y++)if(p==z[y]){u=z[y-1];y=z[y+1];G=K=F=(y.x-u.x-u.width-p.width)/2;break}for(y=0;y<z.length-1;y++){u=z[y];D=z[y+1];I=p==u||p==D;D=D.x-u.x-u.width;E|=p==
|
|
|
|
|
u;if(0==K&&0==v)K=D,v=1;else if(Math.abs(K-D)<=(I||1==y&&E?q:0))v+=1;else if(1<v&&E){z=z.slice(0,y+1);break}else if(3<=z.length-y&&!E)v=0,G=K=0!=F?F:0,z.splice(0,0==y?1:y),y=-1;else break;0!=G||I||(K=G=D)}3==z.length&&z[1]==p&&(G=0)}q=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
|
|
|
|
|
mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(k.graph.getView().getOverlayPane());return a};K=function(a,b){if(a&&null!=k.guidesArrHor)for(var c=0;c<k.guidesArrHor.length;c++)k.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=k.guidesArrVer)for(c=0;c<k.guidesArrVer.length;c++)k.guidesArrVer[c].node.style.visibility="hidden"};if(1<v&&v==z.length-1){v=[];F=k.guidesArrHor;t=[];e=0;y=z[0]==p?1:0;E=z[y].y+z[y].height;if(0<G)for(y=0;y<z.length-1;y++)u=
|
|
|
|
|
z[y],D=z[y+1],p==u?(e=D.x-u.width-G,t.push(new mxPoint(e+u.width+J,E)),t.push(new mxPoint(D.x-J,E))):p==D?(t.push(new mxPoint(u.x+u.width+J,E)),e=u.x+u.width+G,t.push(new mxPoint(e-J,E))):(t.push(new mxPoint(u.x+u.width+J,E)),t.push(new mxPoint(D.x-J,E)));else u=z[0],y=z[2],e=u.x+u.width+(y.x-u.x-u.width-p.width)/2,t.push(new mxPoint(u.x+u.width+J,E)),t.push(new mxPoint(e-J,E)),t.push(new mxPoint(e+p.width+J,E)),t.push(new mxPoint(y.x-J,E));for(y=0;y<t.length;y+=2)z=t[y],G=t[y+1],z=q(z,G,null!=F?
|
|
|
|
|
F[y/2]:null),z.node.style.visibility="visible",z.redraw(),v.push(z);for(y=t.length/2;null!=F&&y<F.length;y++)F[y].destroy();k.guidesArrHor=v;e-=b.x;t=!0}else K(!0);if(1<A&&A==x.length-1){v=[];F=k.guidesArrVer;f=[];d=0;y=x[0]==p?1:0;A=x[y].x+x[y].width;if(0<C)for(y=0;y<x.length-1;y++)u=x[y],D=x[y+1],p==u?(d=D.y-u.height-C,f.push(new mxPoint(A,d+u.height+J)),f.push(new mxPoint(A,D.y-J))):p==D?(f.push(new mxPoint(A,u.y+u.height+J)),d=u.y+u.height+C,f.push(new mxPoint(A,d-J))):(f.push(new mxPoint(A,u.y+
|
|
|
|
|
u.height+J)),f.push(new mxPoint(A,D.y-J)));else u=x[0],y=x[2],d=u.y+u.height+(y.y-u.y-u.height-p.height)/2,f.push(new mxPoint(A,u.y+u.height+J)),f.push(new mxPoint(A,d-J)),f.push(new mxPoint(A,d+p.height+J)),f.push(new mxPoint(A,y.y-J));for(y=0;y<f.length;y+=2)z=f[y],G=f[y+1],z=q(z,G,null!=F?F[y/2]:null,!0),z.node.style.visibility="visible",z.redraw(),v.push(z);for(y=f.length/2;null!=F&&y<F.length;y++)F[y].destroy();k.guidesArrVer=v;d-=b.y;f=!0}else K(!1,!0)}if(t||f)return p=new mxPoint(e,d),x=a.call(this,
|
|
|
|
|
b,p,g,l),t&&!f?p.y=x.y:f&&!t&&(p.x=x.x),x.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;K(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var l=0;l<b.length;l++)b[l].node.style.visibility=a?"visible":"hidden";if(null!=
|
|
|
|
|
d)for(l=0;l<d.length;l++)d[l].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var g=0;g<a.length;g++)a[g].destroy();this.guidesArrVer=null}if(null!=c){for(g=0;g<c.length;g++)c[g].destroy();this.guidesArrHor=null}}})();
|
|
|
|
|