|
|
|
@ -2800,42 +2800,42 @@ mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[
|
|
|
|
|
"4px";v.style.paddingBottom="4px";v.style.fontWeight="normal";mxUtils.write(v,mxResources.get("writingDirection"));var O=document.createElement("select");O.style.position="absolute";O.style.right="20px";O.style.width="97px";O.style.marginTop="-2px";for(var L=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},n=0;n<L.length;n++){var P=document.createElement("option");P.setAttribute("value",L[n]);mxUtils.write(P,
|
|
|
|
|
mxResources.get(L[n]));O.appendChild(P)}v.appendChild(O);b.isEditing()||(a.appendChild(g),mxEvent.addListener(K,"change",function(a){b.getModel().beginUpdate();try{var c=G[K.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
|
|
|
|
|
a.appendChild(v),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[O.value],b.getSelectionCells());mxEvent.consume(a)}));var H=document.createElement("input");H.style.textAlign="right";H.style.marginTop="4px";mxClient.IS_QUIRKS||(H.style.position="absolute",H.style.right="32px");H.style.width="46px";H.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(H);var B=null,g=this.installInputHandler(H,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
|
|
|
|
|
1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:b.cellEditor.textarea;
|
|
|
|
|
e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}H.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},g=null,document.selection?g=document.selection.createRange().parentElement():(d=window.getSelection(),
|
|
|
|
|
0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,g))for(B=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=B+"px";window.setTimeout(function(){H.value=B+" pt";B=null},0);break}},!0),g=this.createStepper(H,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=H.style.display;g.style.marginTop="4px";mxClient.IS_QUIRKS||
|
|
|
|
|
(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat="right";var I=null,C="#ffffff",T=null,U="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return C},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){I=a},destroy:function(){I=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,
|
|
|
|
|
"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});X.style.fontWeight="bold";var V=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");V.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return U},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),d=[],e=0;e<c.length;e++)d.push({node:c[e],
|
|
|
|
|
color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var g=c.nextSibling;a[e].appendChild(c);c=g}d.appendChild(a[e])}break}}else document.execCommand("forecolor",
|
|
|
|
|
!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){T=a},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";V.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),
|
|
|
|
|
function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(V);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);k.style.fontWeight="bold";f.containsLabel||f.autoSize||0!=f.edges.length||h.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),
|
|
|
|
|
"html","0",null,null,null,d.actions.get("formattedText"));k.style.fontWeight="bold";h.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));k.appendChild(g);var aa,ka,ba,R,la,ca=this.addUnitInput(k,"pt",91,44,function(){aa.apply(this,arguments)}),fa=this.addUnitInput(k,
|
|
|
|
|
"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var ga=this.addUnitInput(k,"pt",162,44,function(){ba.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),Z=this.addUnitInput(k,"pt",20,44,function(){la.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);
|
|
|
|
|
this.addLabel(k,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ea=null,ja=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ea&&(b.cellEditor.restoreSelection(ea),ea=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&
|
|
|
|
|
(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ja=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});
|
|
|
|
|
a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],h,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(k);this.styleButtons(g);k=this.createPanel();
|
|
|
|
|
k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(h);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=E&&b.selectNode(b.insertColumn(E,null!=J?J.cellIndex:0))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",
|
|
|
|
|
mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=E&&b.selectNode(b.insertColumn(E,null!=J?J.cellIndex+1:-1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=E&&null!=J&&b.deleteColumn(E,J.cellIndex)}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,
|
|
|
|
|
function(){try{null!=E&&null!=M&&b.selectNode(b.insertRow(E,M.sectionRowIndex))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.selectNode(b.insertRow(E,M.sectionRowIndex+1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.deleteRow(E,
|
|
|
|
|
M.sectionRowIndex)}catch(S){this.editorUi.handleError(S)}}),k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!=E){var c=
|
|
|
|
|
E.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==J||null!=a&&mxEvent.isShiftDown(a)?E:J;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse=""):(d.setAttribute("border","1"),
|
|
|
|
|
d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=E){var c=E.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==J||null!=
|
|
|
|
|
a&&mxEvent.isShiftDown(a)?E:J;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=E){var a=E.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?E.setAttribute("cellPadding",a):E.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,
|
|
|
|
|
300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=E&&E.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=E&&E.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=E&&E.setAttribute("align","right")},e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),
|
|
|
|
|
mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var W=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);
|
|
|
|
|
l.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=H)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),H.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);
|
|
|
|
|
a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(q,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);K.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&
|
|
|
|
|
b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?
|
|
|
|
|
O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),Z.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
|
|
|
|
|
Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Y.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ga.value=isNaN(a)?"":a+" pt"});ka=this.installInputHandler(fa,mxConstants.STYLE_SPACING,2,-999,999," pt");aa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");la=this.installInputHandler(Z,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");R=this.installInputHandler(Y,
|
|
|
|
|
mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(ga,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(H,W);this.addKeyHandler(fa,W);this.addKeyHandler(ca,W);this.addKeyHandler(Z,W);this.addKeyHandler(Y,W);this.addKeyHandler(ga,W);b.getModel().addListener(mxEvent.CHANGE,W);this.listeners.push({destroy:function(){b.getModel().removeListener(W)}});W();if(b.cellEditor.isContentEditing()){var ma=!1,e=function(){ma||(ma=!0,window.setTimeout(function(){for(var a=
|
|
|
|
|
b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-
|
|
|
|
|
2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var k=mxUtils.getCurrentStyle(a),n=g(k),p=h(n,k,a),q=
|
|
|
|
|
a.getElementsByTagName("*");if(0<q.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var v=window.getSelection(),w=0;w<q.length;w++)if(v.containsNode(q[w],!0)){temp=mxUtils.getCurrentStyle(q[w]);var n=Math.max(g(temp),n),z=h(n,temp,q[w]);if(z!=p||isNaN(z))p=""}null!=k&&(c(m[0],"bold"==k.fontWeight||400<k.fontWeight||e("B")||e("STRONG")),c(m[1],"italic"==k.fontStyle||e("I")||e("EM")),c(m[2],e("U")),c(A,d(k.textAlign,"justify")),c(F,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?
|
|
|
|
|
(c(u,d(k.textAlign,"left")),c(t,d(k.textAlign,"center")),c(r,d(k.textAlign,"right")),A.style.opacity=1,A.style.cursor=""):(d=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),c(u,d==mxConstants.ALIGN_LEFT),c(t,d==mxConstants.ALIGN_CENTER),c(r,d==mxConstants.ALIGN_RIGHT),c(A,!1),A.style.opacity=.2,A.style.cursor="default"),E=b.getParentByName(a,"TABLE",b.cellEditor.textarea),M=null==E?null:b.getParentByName(a,"TR",E),J=null==E?null:b.getParentByNames(a,
|
|
|
|
|
["TD","TH"],E),D.style.display=null!=E?"":"none",document.activeElement!=H&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=B?(a.removeAttribute("size"),a.style.fontSize=B+" pt",B=null):H.value=isNaN(n)?"":n+" pt",z=parseFloat(p),isNaN(z)?ja.value="100 %":ja.value=Math.round(100*z)+" %"),n=k.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),
|
|
|
|
|
p=k.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=T&&(U="#"==n.charAt(0)?n:"#000000",T(U,!0)),null!=I&&(C="#"==p.charAt(0)?p:null,I(C,!0)),null!=l.firstChild&&(k=k.fontFamily,"'"==k.charAt(0)&&(k=k.substring(1)),"'"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1)),'"'==k.charAt(0)&&(k=k.substring(1)),'"'==k.charAt(k.length-
|
|
|
|
|
1)&&(k=k.substring(0,k.length-1)),l.firstChild.nodeValue=k))}ma=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};
|
|
|
|
|
StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
|
|
|
|
|
1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){null!=b.cellEditor.textarea&&c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:
|
|
|
|
|
b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}H.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},g=null,document.selection?g=document.selection.createRange().parentElement():
|
|
|
|
|
(d=window.getSelection(),0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,g))for(B=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=B+"px";window.setTimeout(function(){H.value=B+" pt";B=null},0);break}},!0),g=this.createStepper(H,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=H.style.display;g.style.marginTop=
|
|
|
|
|
"4px";mxClient.IS_QUIRKS||(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat="right";var I=null,C="#ffffff",T=null,U="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return C},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){I=a},destroy:function(){I=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
|
|
|
|
|
mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});X.style.fontWeight="bold";var V=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");V.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return U},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
|
|
|
|
|
d=[],e=0;e<c.length;e++)d.push({node:c[e],color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var g=c.nextSibling;a[e].appendChild(c);
|
|
|
|
|
c=g}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){T=a},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";V.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,
|
|
|
|
|
null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(V);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);k.style.fontWeight="bold";f.containsLabel||f.autoSize||
|
|
|
|
|
0!=f.edges.length||h.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));k.style.fontWeight="bold";h.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));k.appendChild(g);var aa,ka,ba,
|
|
|
|
|
R,la,ca=this.addUnitInput(k,"pt",91,44,function(){aa.apply(this,arguments)}),fa=this.addUnitInput(k,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var ga=this.addUnitInput(k,"pt",162,44,function(){ba.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),Z=this.addUnitInput(k,"pt",20,44,function(){la.apply(this,arguments)});mxUtils.br(k);
|
|
|
|
|
this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ea=null,ja=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ea&&(b.cellEditor.restoreSelection(ea),ea=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;
|
|
|
|
|
null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ja=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});
|
|
|
|
|
mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],h,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),
|
|
|
|
|
!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(k);this.styleButtons(g);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(h);a.appendChild(k);mxClient.IS_QUIRKS&&(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=
|
|
|
|
|
E&&b.selectNode(b.insertColumn(E,null!=J?J.cellIndex:0))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=E&&b.selectNode(b.insertColumn(E,null!=J?J.cellIndex+1:-1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=E&&null!=J&&b.deleteColumn(E,J.cellIndex)}catch(S){this.editorUi.handleError(S)}}),
|
|
|
|
|
k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.selectNode(b.insertRow(E,M.sectionRowIndex))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.selectNode(b.insertRow(E,M.sectionRowIndex+1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",
|
|
|
|
|
mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=E&&null!=M&&b.deleteRow(E,M.sectionRowIndex)}catch(S){this.editorUi.handleError(S)}}),k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",
|
|
|
|
|
mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!=E){var c=E.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==J||null!=a&&mxEvent.isShiftDown(a)?E:J;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),
|
|
|
|
|
d.style.border="",d.style.borderCollapse=""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=E){var c=E.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});
|
|
|
|
|
this.editorUi.pickColor(c,function(c){var d=null==J||null!=a&&mxEvent.isShiftDown(a)?E:J;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=E){var a=E.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?E.setAttribute("cellPadding",a):E.removeAttribute("cellPadding")}),
|
|
|
|
|
mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=E&&E.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=E&&E.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=E&&E.setAttribute("align","right")},e)];this.styleButtons(g);g[2].style.marginRight=
|
|
|
|
|
"9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var W=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==
|
|
|
|
|
mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=H)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),H.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);
|
|
|
|
|
c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(q,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);K.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?
|
|
|
|
|
"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":
|
|
|
|
|
a==mxConstants.TEXT_DIRECTION_LTR?O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),Z.value=isNaN(a)?
|
|
|
|
|
"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Y.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ga.value=isNaN(a)?"":a+" pt"});ka=this.installInputHandler(fa,mxConstants.STYLE_SPACING,2,-999,999," pt");aa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");la=this.installInputHandler(Z,mxConstants.STYLE_SPACING_RIGHT,0,
|
|
|
|
|
-999,999," pt");R=this.installInputHandler(Y,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(ga,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(H,W);this.addKeyHandler(fa,W);this.addKeyHandler(ca,W);this.addKeyHandler(Z,W);this.addKeyHandler(Y,W);this.addKeyHandler(ga,W);b.getModel().addListener(mxEvent.CHANGE,W);this.listeners.push({destroy:function(){b.getModel().removeListener(W)}});W();if(b.cellEditor.isContentEditing()){var ma=!1,e=function(){ma||
|
|
|
|
|
(ma=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:
|
|
|
|
|
null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);
|
|
|
|
|
var k=mxUtils.getCurrentStyle(a),n=g(k),p=h(n,k,a),q=a.getElementsByTagName("*");if(0<q.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var v=window.getSelection(),w=0;w<q.length;w++)if(v.containsNode(q[w],!0)){temp=mxUtils.getCurrentStyle(q[w]);var n=Math.max(g(temp),n),z=h(n,temp,q[w]);if(z!=p||isNaN(z))p=""}null!=k&&(c(m[0],"bold"==k.fontWeight||400<k.fontWeight||e("B")||e("STRONG")),c(m[1],"italic"==k.fontStyle||e("I")||e("EM")),c(m[2],e("U")),c(A,d(k.textAlign,"justify")),
|
|
|
|
|
c(F,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(u,d(k.textAlign,"left")),c(t,d(k.textAlign,"center")),c(r,d(k.textAlign,"right")),A.style.opacity=1,A.style.cursor=""):(d=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),c(u,d==mxConstants.ALIGN_LEFT),c(t,d==mxConstants.ALIGN_CENTER),c(r,d==mxConstants.ALIGN_RIGHT),c(A,!1),A.style.opacity=.2,A.style.cursor="default"),E=b.getParentByName(a,"TABLE",b.cellEditor.textarea),M=null==E?null:b.getParentByName(a,
|
|
|
|
|
"TR",E),J=null==E?null:b.getParentByNames(a,["TD","TH"],E),D.style.display=null!=E?"":"none",document.activeElement!=H&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=B?(a.removeAttribute("size"),a.style.fontSize=B+" pt",B=null):H.value=isNaN(n)?"":n+" pt",z=parseFloat(p),isNaN(z)?ja.value="100 %":ja.value=Math.round(100*z)+" %"),n=k.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
|
|
|
|
|
("0"+Number(d).toString(16)).substr(-2)}),p=k.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=T&&(U="#"==n.charAt(0)?n:"#000000",T(U,!0)),null!=I&&(C="#"==p.charAt(0)?p:null,I(C,!0)),null!=l.firstChild&&(k=k.fontFamily,"'"==k.charAt(0)&&(k=k.substring(1)),"'"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1)),'"'==
|
|
|
|
|
k.charAt(0)&&(k=k.substring(1)),'"'==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1)),l.firstChild.nodeValue=k))}ma=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});
|
|
|
|
|
e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
|
|
|
|
|
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
|
|
|
|
|
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
|
|
|
|
|
StyleFormatPanel.prototype.getCssRules=function(a){var c=document.implementation.createHTMLDocument(""),d=document.createElement("style");mxUtils.setTextContent(d,a);c.body.appendChild(d);return d.sheet.cssRules};
|
|
|
|
@ -7934,7 +7934,8 @@ this.getTagsForStencil("mxgraph.weblogos","xanga","web logos logo").join(" ")),t
|
|
|
|
|
76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))])}})();
|
|
|
|
|
DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=c||"";this.shadowPages=null;this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved";
|
|
|
|
|
DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;
|
|
|
|
|
DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
|
|
|
|
|
DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
|
|
|
|
|
DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
|
|
|
|
|
DrawioFile.prototype.updateFile=function(a,c,b,d){null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(e){try{null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=e?this.mergeFile(e,a,c,d):this.reloadFile(a,c))}catch(g){null!=c&&c(g)}}),c))};
|
|
|
|
|
DrawioFile.prototype.mergeFile=function(a,c,b,d){var e=!0;try{this.stats.fileMerged++;var g=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),k=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=k&&0<k.length){this.shadowPages=k;this.backupPatch=this.isModified()?this.ui.diffPages(g,this.ui.pages):null;var m=[this.ui.diffPages(null!=d?d:g,this.shadowPages)];if(!this.ignorePatches(m)){var n=this.ui.patchPages(g,
|
|
|
|
|
m[0]);d={};var q=this.ui.getHashValueForPages(n,d),g={},f=this.ui.getHashValueForPages(this.shadowPages,g);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",m,"checksum",f==q,q);if(null!=q&&q!=f){var l=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),u=this.ui.hashValue(a.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(b,m,"Shadow Details: "+JSON.stringify(d)+
|
|
|
|
@ -7982,11 +7983,11 @@ DrawioFile.prototype.handleFileError=function(a,c){this.ui.spinner.stop();if(thi
|
|
|
|
|
mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>")}};
|
|
|
|
|
DrawioFile.prototype.handleConflictError=function(a,c){var b=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),e=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,b,d,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
|
|
|
|
|
function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,b,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(b,d,e):this.invalidChecksum?this.showRefreshDialog(b,d,this.getErrorMessage(a)):c?this.showConflictDialog(e,g):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(b,
|
|
|
|
|
d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
|
|
|
|
|
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?this.handleFileSuccess(!0):this.isModified()&&this.ui.scheduleSanityCheck()}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):this.isAutosaveOptional()&&
|
|
|
|
|
this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus()};
|
|
|
|
|
DrawioFile.prototype.fileSaved=function(a,c,b,d){this.lastSaved=new Date;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,d,a)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(k);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,k);else{var e=this.getCurrentUser(),
|
|
|
|
|
g=null!=e?e.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),g,k)}}catch(m){}}};
|
|
|
|
|
d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
|
|
|
|
|
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=
|
|
|
|
|
this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};
|
|
|
|
|
DrawioFile.prototype.fileSaved=function(a,c,b,d){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,d,a)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(k);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,k);else{var e=
|
|
|
|
|
this.getCurrentUser(),g=null!=e?e.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),g,k)}}catch(m){}}};
|
|
|
|
|
DrawioFile.prototype.autosave=function(a,c,b,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<c?a:0;this.clearAutosave();var e=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==e&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=b&&b(a)}),mxUtils.bind(this,
|
|
|
|
|
function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=b&&b(null)}),a);this.autosaveThread=e};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
|
|
|
|
|
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
|
|
|
|
@ -8085,25 +8086,25 @@ try{e=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),
|
|
|
|
|
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 q=document.createElement("option");q.setAttribute("value","plantUmlPng");mxUtils.write(q,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(q),m.appendChild(f));var l=e();k.value=l;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();
|
|
|
|
|
a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(m);mxEvent.addListener(m,"change",function(){var a=e();if(0==k.value.length||k.value==l)l=a,k.value=l});b=mxUtils.button(mxResources.get("close"),function(){k.value==l?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(k.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,k,m,n,q,f,l,p,u,v,t,A){function y(){var a=!0;if(null!=U)for(;I<U.length&&(a||0!=mxUtils.mod(I,30));)a=U[I++],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(ba)b||a.hideDialog(),u(ba,da,E.value);else if(d)b||a.hideDialog(),d(ia,E.value);else{var c=
|
|
|
|
|
E.value;null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,ia,null!=Z&&0<Z.length?Z:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function z(a,b,c,f,d){null!=V&&(V.style.backgroundColor="transparent",V.style.border="1px solid transparent");F.removeAttribute("disabled");ia=b;Z=c;V=a;ba=f;da=d;V.style.backgroundColor=m;V.style.border=n}function B(b,c,f,d,l,p,g,e,x,t){var u=document.createElement("div");u.className=
|
|
|
|
|
function(){a.hideDialog();d(k.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,k,m,n,q,f,l,p,u,v,t,A){function y(){var a=!0;if(null!=V)for(;I<V.length&&(a||0!=mxUtils.mod(I,30));)a=V[I++],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(Z)b||a.hideDialog(),u(Z,ca,E.value);else if(d)b||a.hideDialog(),d(ha,E.value);else{var c=
|
|
|
|
|
E.value;null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,ha,null!=aa&&0<aa.length?aa:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function z(a,b,c,f,d){null!=U&&(U.style.backgroundColor="transparent",U.style.border="1px solid transparent");F.removeAttribute("disabled");ha=b;aa=c;U=a;Z=f;ca=d;U.style.backgroundColor=m;U.style.border=n}function B(b,c,f,d,l,p,g,e,x,t){var u=document.createElement("div");u.className=
|
|
|
|
|
"geTemplate";u.style.height=fa+"px";u.style.width=R+"px";null!=d&&0<d.length&&u.setAttribute("title",d);if(null!=p)u.style.backgroundImage="url("+p+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){z(u,null,null,b,g)}),mxEvent.addListener(u,"dblclick",function(a){C()});else if(!t&&null!=b&&0<b.length){f=x||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";u.style.backgroundImage="url("+f+
|
|
|
|
|
")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";var k=!1;mxEvent.addListener(u,"click",function(f){F.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.editor.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;J.spin(P);mxUtils.get(f,mxUtils.bind(this,function(a){J.stop();200<=a.getStatus()&&299>=a.getStatus()&&(z(u,a.getText(),c),k&&C())}))});
|
|
|
|
|
mxEvent.addListener(u,"dblclick",function(a){k=!0})}else u.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>",l&&z(u),null!=e?mxEvent.addListener(u,"click",e):(mxEvent.addListener(u,"click",function(a){z(u,null,null,b,g)}),mxEvent.addListener(u,"dblclick",function(a){C()}));P.appendChild(u)}function D(){X&&(X=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=
|
|
|
|
|
P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<Q){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"));W.appendChild(b);for(var c in ea){var f=document.createElement("div"),b=c,d=ea[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!=q&&(f.style.padding=q);W.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",I=0,U=ea[b],K=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");W.appendChild(b)}for(c in N)f=document.createElement("div"),
|
|
|
|
|
b=mxResources.get(c),d=N[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!=q&&(f.style.padding=q),W.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,U=d),function(b,c){mxEvent.addListener(f,"click",
|
|
|
|
|
function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",I=0,U=N[b],K=null,y())})}(c,f);y()}b=null!=b?b:!0;e=null!=e?e:!1;k=null!=k?k:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var x=document.createElement("div");x.style.height="100%";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.height="46px";b&&x.appendChild(G);var H=document.createElement("img");H.setAttribute("border",
|
|
|
|
|
f.setAttribute("title",b+" ("+d.length+")");mxUtils.write(f,f.getAttribute("title"));null!=q&&(f.style.padding=q);W.appendChild(f);(function(b,c){mxEvent.addListener(f,"click",function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",I=0,V=ea[b],K=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");W.appendChild(b)}for(c in N)f=document.createElement("div"),
|
|
|
|
|
b=mxResources.get(c),d=N[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!=q&&(f.style.padding=q),W.appendChild(f),null==a&&0<d.length&&(a=f,a.style.backgroundColor=k,V=d),function(b,c){mxEvent.addListener(f,"click",
|
|
|
|
|
function(){a!=c&&(a.style.backgroundColor="",a=c,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",I=0,V=N[b],K=null,y())})}(c,f);y()}b=null!=b?b:!0;e=null!=e?e:!1;k=null!=k?k:"#ebf2f9";m=null!=m?m:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var x=document.createElement("div");x.style.height="100%";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.height="46px";b&&x.appendChild(G);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&&G.appendChild(H);b&&mxUtils.write(G,(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 E=
|
|
|
|
|
document.createElement("input");E.setAttribute("value",a.defaultFilename+H);E.style.marginLeft="10px";E.style.width=c?"220px":"430px";this.init=function(){b&&(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?E.select():document.execCommand("selectAll",!1,null))};b&&(G.appendChild(E),null!=a.editor.fileExtensions&&(H=FilenameDialog.createTypeHint(a,E,a.editor.fileExtensions),H.style.marginTop="12px",G.appendChild(H)));var G=!1,I=0,J=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}),F=mxUtils.button(t||mxResources.get("create"),function(){F.setAttribute("disabled","disabled");C();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(l||p){var M=[],K=null,S=null,L=null,T=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<M.length;b++)M[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},G=!0;t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.height=
|
|
|
|
|
"30px";x.appendChild(t);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){W.style.display="";P.style.left="160px";T(0);P.scrollTop=0;P.innerHTML="";I=0;K!=U&&(U=K,N=S,Q=L,W.innerHTML="",D(),K=null)});M.push(H);t.appendChild(H);var Y=function(a){W.style.display="none";P.style.left="30px";T(a?-1:1);null==K&&(K=U);P.scrollTop=0;P.innerHTML="";J.spin(P);var b=function(a,b,c){I=0;J.stop();U=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==
|
|
|
|
|
f)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<f){W.style.display="";P.style.left="160px";W.innerHTML="";Q=0;N={"draw.io":a};for(d in c)N[d]=c[d];D()}else y()};a?p(aa.value,b):l(b)};l&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Y()}),t.appendChild(H),M.push(H));if(p){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");t.appendChild(H);
|
|
|
|
|
var aa=document.createElement("input");aa.style.marginRight="10px";aa.style.marginLeft="10px";aa.style.width="220px";mxEvent.addListener(aa,"keypress",function(a){13==a.keyCode&&Y(!0)});t.appendChild(aa);H=mxUtils.button(mxResources.get("search"),function(){Y(!0)});H.className="geBtn";t.appendChild(H)}T(0)}var Z=null,ia=null,V=null,ba=null,da=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";P.style.position="absolute";P.style.left="160px";P.style.right="34px";G=(b?72:40)+(G?
|
|
|
|
|
30:0);P.style.top=G+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var W=document.createElement("div");W.style.cssText="position:absolute;left:30px;width:128px;top:"+G+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var fa=140,R=140,N={},ea={},Q=0,X=!0;N.basic=[{title:"blankDiagram",select:!0}];var U=N.basic;if(!c){var ja=function(){mxUtils.get(ca,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=a.getAttribute("section");null==c&&(c=b.indexOf("/"),c=b.substring(0,c));b=N[c];null==b&&(b=[],N[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}J.stop();D()}})};x.appendChild(W);x.appendChild(P);var O=!1,ca=f;/^https?:\/\//.test(ca)&&!a.editor.isCorsEnabledForUrl(ca)&&(ca=PROXY_URL+
|
|
|
|
|
"?url="+encodeURIComponent(ca));J.spin(P);null!=A?A(function(a,b){ea=a;L=Q=b;ja()},ja):ja();S=N}mxEvent.addListener(E,"keypress",function(b){a.dialog.container.firstChild==x&&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||(A=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
|
|
|
|
|
"30px";x.appendChild(t);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){W.style.display="";P.style.left="160px";T(0);P.scrollTop=0;P.innerHTML="";I=0;K!=V&&(V=K,N=S,Q=L,W.innerHTML="",D(),K=null)});M.push(H);t.appendChild(H);var Y=function(a){W.style.display="none";P.style.left="30px";T(a?-1:1);null==K&&(K=V);P.scrollTop=0;P.innerHTML="";J.spin(P);var b=function(a,b,c){I=0;J.stop();V=a;c=c||{};var f=0,d;for(d in c)f+=c[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==
|
|
|
|
|
f)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<f){W.style.display="";P.style.left="160px";W.innerHTML="";Q=0;N={"draw.io":a};for(d in c)N[d]=c[d];D()}else y()};a?p(da.value,b):l(b)};l&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Y()}),t.appendChild(H),M.push(H));if(p){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");t.appendChild(H);
|
|
|
|
|
var da=document.createElement("input");da.style.marginRight="10px";da.style.marginLeft="10px";da.style.width="220px";mxEvent.addListener(da,"keypress",function(a){13==a.keyCode&&Y(!0)});t.appendChild(da);H=mxUtils.button(mxResources.get("search"),function(){Y(!0)});H.className="geBtn";t.appendChild(H)}T(0)}var aa=null,ha=null,U=null,Z=null,ca=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";P.style.position="absolute";P.style.left="160px";P.style.right="34px";G=(b?72:40)+(G?
|
|
|
|
|
30:0);P.style.top=G+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var W=document.createElement("div");W.style.cssText="position:absolute;left:30px;width:128px;top:"+G+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var fa=140,R=140,N={},ea={},Q=0,X=!0;N.basic=[{title:"blankDiagram",select:!0}];var V=N.basic;if(!c){var ja=function(){mxUtils.get(ba,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=a.getAttribute("section");null==c&&(c=b.indexOf("/"),c=b.substring(0,c));b=N[c];null==b&&(b=[],N[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}J.stop();D()}})};x.appendChild(W);x.appendChild(P);var O=!1,ba=f;/^https?:\/\//.test(ba)&&!a.editor.isCorsEnabledForUrl(ba)&&(ba=PROXY_URL+
|
|
|
|
|
"?url="+encodeURIComponent(ba));J.spin(P);null!=A?A(function(a,b){ea=a;L=Q=b;ja()},ja):ja();S=N}mxEvent.addListener(E,"keypress",function(b){a.dialog.container.firstChild==x&&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||(A=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
|
|
|
|
|
A.className="geBtn",f.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});A.className="geBtn";!a.editor.cancelFirst||e&&null==g||f.appendChild(A);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(E.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&&v&&(v=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()}),v.className="geBtn",f.appendChild(v));f.appendChild(F);a.editor.cancelFirst||null!=d||e&&null==g||f.appendChild(A);x.appendChild(f);this.container=x},CreateDialog=function(a,c,b,d,e,g,k,m,n,q,f,l,p,u,v,t){function A(b,f,d,p){function g(){mxEvent.addListener(e,"click",function(){var b=d;if(k){var f=z.value,l=f.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:x.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=
|
|
|
|
@ -8166,14 +8167,14 @@ typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.comp
|
|
|
|
|
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 E=document.createElement("select");E.setAttribute("disabled","disabled");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";var I=null;mxEvent.addListener(E,"change",function(a){null!=I&&(I(a),mxEvent.consume(a))});
|
|
|
|
|
var J=mxUtils.button(mxResources.get("edit"),function(){null!=A&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(A.documentElement)),a.openLink(a.getUrl(),null,!0))});J.className="geBtn";J.setAttribute("disabled","disabled");null!=b&&(J.style.display="none");var F=mxUtils.button(mxResources.get("show"),function(){null!=t&&a.openLink(t.getUrl(E.selectedIndex))});F.className="geBtn gePrimaryBtn";F.setAttribute("disabled","disabled");null!=b&&(F.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 M=document.createElement("div");M.className="geToolbarContainer";M.style.backgroundColor="transparent";M.style.padding="2px";M.style.border="none";M.style.left="199px";M.style.top="442px";var K=null;if(null!=c&&0<c.length){k.style.cursor="move";var S=document.createElement("table");S.style.border="1px solid lightGray";S.style.borderCollapse=
|
|
|
|
|
"collapse";S.style.borderSpacing="0px";S.style.width="100%";var L=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var Y=c.length-1;0<=Y;Y--){var aa=function(b){var d=new Date(b.modifiedDate),l=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var t=function(a){null!=a&&(a=v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));
|
|
|
|
|
"collapse";S.style.borderSpacing="0px";S.style.width="100%";var L=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var Y=c.length-1;0<=Y;Y--){var da=function(b){var d=new Date(b.modifiedDate),l=null;if(0<=d.getTime()){var e=function(c){p.stop();var e=mxUtils.parseXml(c),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var t=function(a){null!=a&&(a=v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));
|
|
|
|
|
return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};E.style.display="none";E.innerHTML="";A=e;y=c;q=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");q=[];for(c=0;c<e.length;c++)q.push(e[c]);f=Math.min(n,q.length-1);0<q.length&&t(q[f]);if(1<q.length)for(E.removeAttribute("disabled"),
|
|
|
|
|
E.style.display="",c=0;c<q.length;c++)e=document.createElement("option"),mxUtils.write(e,q[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),E.appendChild(e);I=function(){try{var b=parseInt(E.value);t(q[b]);f=n=b}catch(Q){E.value=n,a.handleError(Q)}}}else v(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");x.innerHTML="";mxUtils.write(x,(null!=c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());
|
|
|
|
|
x.setAttribute("title",l.getAttribute("title"));C.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");D.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&H.removeAttribute("disabled"),G.removeAttribute("disabled"),F.removeAttribute("disabled"),J.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(D,60)}else E.style.display="none",E.innerHTML="",x.innerHTML="",
|
|
|
|
|
mxUtils.write(x,mxResources.get("errorLoadingFile"))},l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.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()===T?mxUtils.write(g,d.toLocaleTimeString()):mxUtils.write(g,d.toLocaleDateString()+" "+d.toLocaleTimeString());l.appendChild(g);l.setAttribute("title",d.toLocaleDateString()+
|
|
|
|
|
" "+d.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){t!=b&&(p.stop(),null!=v&&(v.style.backgroundColor=""),t=b,v=l,v.style.backgroundColor="#ebf2f9",y=A=null,x.removeAttribute("title"),x.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor="#ffffff",m.getModel().clear(),H.setAttribute("disabled","disabled"),G.setAttribute("disabled",
|
|
|
|
|
"disabled"),C.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(D,20),p.spin(k),b.getXml(function(a){if(t==b)try{e(a)}catch(fa){x.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+fa.message)}},
|
|
|
|
|
function(a){p.stop();E.style.display="none";E.innerHTML="";x.innerHTML="";mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){F.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);L.appendChild(l)}return l}(c[Y]);null!=aa&&Y==c.length-1&&(K=aa)}S.appendChild(L);g.appendChild(S)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==
|
|
|
|
|
function(a){p.stop();E.style.display="none";E.innerHTML="";x.innerHTML="";mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){F.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);L.appendChild(l)}return l}(c[Y]);null!=da&&Y==c.length-1&&(K=da)}S.appendChild(L);g.appendChild(S)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==
|
|
|
|
|
a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",M.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",M.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});g.className="geBtn";M.appendChild(E);M.appendChild(C);M.appendChild(z);M.appendChild(D);M.appendChild(B);a.editor.cancelFirst?(e.appendChild(g),e.appendChild(G),
|
|
|
|
|
e.appendChild(J),e.appendChild(H),e.appendChild(F)):(e.appendChild(G),e.appendChild(J),e.appendChild(H),e.appendChild(F),e.appendChild(g));d.appendChild(e);d.appendChild(M);d.appendChild(x);this.container=d},DraftDialog=function(a,c,b,d,e,g,k,m){var n=document.createElement("div"),q=document.createElement("div");q.style.marginTop="0px";q.style.whiteSpace="nowrap";q.style.overflow="auto";mxUtils.write(q,c);n.appendChild(q);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 l=new Graph(f);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;c=mxUtils.parseXml(b);var p=a.editor.extractGraphModel(c.documentElement,!0),u=0,v=null,t=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==
|
|
|
|
@ -8266,26 +8267,26 @@ mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geT
|
|
|
|
|
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,k,m,n,q){function f(){null!=H&&(H.style.fontWeight="normal",H.style.textDecoration="none",H=null)}function l(a,b,c,f,d,l,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/"+
|
|
|
|
|
l+".svg";return!0}function p(a){function b(a){Z.removeChild(f);D.removeChild(c);Z.scrollTop=l}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 l=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=E){for(var f=E.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}E.className=f.join(" ")}null!=a?(E=a,E.className+=" "+b,I=c,da.className="geTempDlgCreateBtn"):(I=E=null,da.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
|
|
|
|
|
function v(b){if(null!=I){var f=I;I=null;da.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?q(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 t(a){a=a?"":"none";for(var b=D.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
|
|
|
|
|
a}function A(a,b,c){function f(){da.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));t(!b)}T.innerHTML="";u();K=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=
|
|
|
|
|
l+".svg";return!0}function p(a){function b(a){aa.removeChild(f);D.removeChild(c);aa.scrollTop=l}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 l=aa.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);aa.appendChild(f);aa.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function u(a,b,c){if(null!=E){for(var f=E.className.split(" "),d=0;d<f.length;d++)if(-1<f[d].indexOf("Active")){f.splice(d,1);break}E.className=f.join(" ")}null!=a?(E=a,E.className+=" "+b,I=c,ca.className="geTempDlgCreateBtn"):(I=E=null,ca.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
|
|
|
|
|
function v(b){if(null!=I){var f=I;I=null;ca.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?q(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 t(a){a=a?"":"none";for(var b=D.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
|
|
|
|
|
a}function A(a,b,c){function f(){ca.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));t(!b)}T.innerHTML="";u();K=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),e=document.createElement("th");e.style.width="50%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=
|
|
|
|
|
mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));l.appendChild(e);d.appendChild(l);T.appendChild(d)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var g=a[l].url,e=mxUtils.htmlEntities(a[l].title),x=a[l].tooltip||a[l].title,k=a[l].imgUrl,z=mxUtils.htmlEntities(a[l].changedBy||""),m=mxUtils.htmlEntities(a[l].lastModifiedOn||
|
|
|
|
|
"");k||(k=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"),k=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));k.appendChild(n);x=document.createElement("span");x.className="geTempDlgDiagramTitle";x.innerHTML=e;k.appendChild(x);B.appendChild(k);k=document.createElement("td");
|
|
|
|
|
k.innerHTML=z;B.appendChild(k);k=document.createElement("td");k.innerHTML=m;B.appendChild(k);d.appendChild(B);null==E&&(f(),u(B,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(B,"click",function(){E!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(B,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],B)}else{var y=document.createElement("div");y.className="geTempDlgDiagramTile";y.setAttribute("title",x);null==E&&(f(),u(y,"geTempDlgDiagramTileActive",
|
|
|
|
|
a[l]));z=document.createElement("div");z.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var A=document.createElement("img");A.style.display="none";(function(a,b){A.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};A.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(A,z);A.src=k;z.appendChild(A);y.appendChild(z);z=document.createElement("div");z.className="geTempDlgDiagramTileLbl";z.innerHTML=null!=e?e:"";y.appendChild(z);
|
|
|
|
|
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(){E!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(y,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],y);T.appendChild(y)}}}function y(a,b){ba.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 l=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"…");null==E&&(da.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(l,"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);l.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;l.appendChild(e);ba.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){E!=b&&(da.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(d,l)}L.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),l=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";f.setAttribute("title",d+" ("+l.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"…");f.innerHTML=d+" ("+l.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"):(V.style.display="none",ia.style.minHeight=
|
|
|
|
|
"100%"),H=d,H.style.fontWeight="bold",H.style.textDecoration="underline",Z.scrollTop=0,x&&(G=!0),Y.innerHTML=c,aa.style.display="none",A(a[b],!0))})})(c,d,f)}}function z(a){k&&(Z.scrollTop=0,T.innerHTML="",P.spin(T),G=!1,x=!0,Y.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),S=null,k(Q,a?null:g))}function B(a){f();Z.scrollTop=0;T.innerHTML="";P.spin(T);G=!1;x=!0;X=null;Y.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
|
|
|
|
|
mxUtils.htmlEntities(a)+'"';m(a,Q,F?null:g);S=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";e=null!=e?e:NEW_DIAGRAM_CATS_PATH+"/index.xml";var D=this.container,x=!1,G=!1,H=null,E=null,I=null,J=!1,F=!0,M=!1,K=[],S,L=D.querySelector(".geTempDlgShowAllBtn"),T=D.querySelector(".geTempDlgDiagramsTiles"),Y=D.querySelector(".geTempDlgDiagramsListTitle"),aa=D.querySelector(".geTempDlgDiagramsListBtns"),Z=D.querySelector(".geTempDlgContent"),ia=D.querySelector(".geTempDlgDiagramsList"),V=D.querySelector(".geTempDlgNewDiagramCat"),
|
|
|
|
|
ba=D.querySelector(".geTempDlgNewDiagramCatList"),da=D.querySelector(".geTempDlgCreateBtn"),P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(D.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();V.style.display="";ia.style.minHeight="calc(100% - 280px)";z(F)});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){l(this,"geTempDlgAllDiagramsBtnImg",
|
|
|
|
|
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(){E!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(y,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],y);T.appendChild(y)}}}function y(a,b){Z.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 l=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"…");null==E&&(ca.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(l,"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);l.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";e.innerHTML=p;l.appendChild(e);Z.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){E!=b&&(ca.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),t(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(d,l)}L.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),l=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));f.className="geTemplateCatLink";f.setAttribute("title",d+" ("+l.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"…");f.innerHTML=d+" ("+l.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"):(U.style.display="none",ha.style.minHeight=
|
|
|
|
|
"100%"),H=d,H.style.fontWeight="bold",H.style.textDecoration="underline",aa.scrollTop=0,x&&(G=!0),Y.innerHTML=c,da.style.display="none",A(a[b],!0))})})(c,d,f)}}function z(a){k&&(aa.scrollTop=0,T.innerHTML="",P.spin(T),G=!1,x=!0,Y.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),S=null,k(Q,a?null:g))}function B(a){f();aa.scrollTop=0;T.innerHTML="";P.spin(T);G=!1;x=!0;X=null;Y.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+
|
|
|
|
|
' "'+mxUtils.htmlEntities(a)+'"';m(a,Q,F?null:g);S=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";e=null!=e?e:NEW_DIAGRAM_CATS_PATH+"/index.xml";var D=this.container,x=!1,G=!1,H=null,E=null,I=null,J=!1,F=!0,M=!1,K=[],S,L=D.querySelector(".geTempDlgShowAllBtn"),T=D.querySelector(".geTempDlgDiagramsTiles"),Y=D.querySelector(".geTempDlgDiagramsListTitle"),da=D.querySelector(".geTempDlgDiagramsListBtns"),aa=D.querySelector(".geTempDlgContent"),ha=D.querySelector(".geTempDlgDiagramsList"),U=D.querySelector(".geTempDlgNewDiagramCat"),
|
|
|
|
|
Z=D.querySelector(".geTempDlgNewDiagramCatList"),ca=D.querySelector(".geTempDlgCreateBtn"),P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(D.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){f();U.style.display="";ha.style.minHeight="calc(100% - 280px)";z(F)});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){l(this,"geTempDlgAllDiagramsBtnImg",
|
|
|
|
|
"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(F=!0,null==S?z(F):B(S))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){l(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(F=!1,null==S?z(F):B(S))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){l(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
|
|
|
|
|
"tiles",!1)&&(M=!0,A(K,!1,M))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){l(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(M=!1,A(K,!1,M))});mxEvent.addListener(L,"click",function(){J?(V.style.height="280px",ba.style.height="190px",L.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(N)):(V.style.height="440px",ba.style.height="355px",L.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
|
|
|
|
|
"tiles",!1)&&(M=!0,A(K,!1,M))});mxEvent.addListener(D.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){l(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(M=!1,A(K,!1,M))});mxEvent.addListener(L,"click",function(){J?(U.style.height="280px",Z.style.height="190px",L.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(N)):(U.style.height="440px",Z.style.height="355px",L.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
|
|
|
|
|
null,"- Show less")),y(N,!0));J=!J});var W=!1,fa=!1,R={},N=[],ea=1;mxUtils.get(d,function(a){if(!W){W=!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=R[b];null==c&&(ea++,c=[],R[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(R)}});mxUtils.get(e,
|
|
|
|
|
function(a){if(!fa){fa=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&N.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;y(N)}});var Q=function(a,b){aa.style.display="";P.stop();x=!1;G?G=!1:b?T.innerHTML=b:0==a.length?T.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):A(a,!1,M)};z(F);var X=null;m&&mxEvent.addListener(D.querySelector(".geTempDlgSearchBox"),
|
|
|
|
|
"keyup",function(a){var b=this;null!=X&&clearTimeout(X);13==a.keyCode?B(b.value):X=setTimeout(function(){B(b.value)},500)});mxEvent.addListener(da,"click",v);mxEvent.addListener(D.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(D.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=b&&b();a.hideDialog(!0)})};
|
|
|
|
|
function(a){if(!fa){fa=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&N.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;y(N)}});var Q=function(a,b){da.style.display="";P.stop();x=!1;G?G=!1:b?T.innerHTML=b:0==a.length?T.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):A(a,!1,M)};z(F);var X=null;m&&mxEvent.addListener(D.querySelector(".geTempDlgSearchBox"),
|
|
|
|
|
"keyup",function(a){var b=this;null!=X&&clearTimeout(X);13==a.keyCode?B(b.value):X=setTimeout(function(){B(b.value)},500)});mxEvent.addListener(ca,"click",v);mxEvent.addListener(D.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(D.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 k="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
|
|
|
|
|
(k=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(k=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"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":
|
|
|
|
@ -8344,7 +8345,7 @@ g||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==g||/(\.e
|
|
|
|
|
function(a,b,c,f){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,function(){f()}))}),0)):f()};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.graph.mathEnabled&&this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,c,f,d,l,p,e,g,t,k,u,z,v){l=null!=l?l:!0;u=null!=u?u:this.graph;z=null!=z?z:0;var x=g?null:u.background;
|
|
|
|
|
x==mxConstants.NONE&&(x=null);null==x&&(x=f);null==x&&0==g&&(x=this.graph.defaultPageBackgroundColor);this.convertImages(u.getSvg(x,null,null,v,null,null!=p?p:!0,null,null,null,t),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),t=parseInt(c.getAttribute("height"));e=null!=e?e:1;null!=b&&(e=l?Math.min(1,Math.min(3*b/(4*t),b/g)):b/g);g=Math.ceil(e*g)+2*z;t=Math.ceil(e*t)+2*z;p.setAttribute("width",
|
|
|
|
|
g);p.setAttribute("height",t);var k=p.getContext("2d");null!=x&&(k.beginPath(),k.rect(0,0,g,t),k.fillStyle=x,k.fill());k.scale(e,e);mxClient.IS_SF?window.setTimeout(function(){k.drawImage(f,z/e,z/e);a(p)},0):(k.drawImage(f,z/e,z/e),a(p))}catch(R){null!=d&&d(R)}});f.onerror=function(a){null!=d&&d(a)};try{t&&this.graph.addSvgShadow(c);var p=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;
|
|
|
|
|
c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(u,c,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(p)}catch(da){null!=d&&d(da)}}),c,k)};Editor.prototype.writeGraphModelToPng=function(a,b,c,f,d){function l(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=l(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function e(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
|
|
|
c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(u,c,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(p)}catch(ca){null!=d&&d(ca)}}),c,k)};Editor.prototype.writeGraphModelToPng=function(a,b,c,f,d){function l(a,b){var c=g;g+=b;return a.substring(c,g)}function p(a){a=l(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function e(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 g=0;if(l(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(l(a,4),"IHDR"!=l(a,4))null!=d&&d();else{l(a,17);d=a.substring(0,g);do{var t=p(a);if("IDAT"==l(a,4)){d=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;f=EditorUi.prototype.updateCRC(f,b,0,4);f=EditorUi.prototype.updateCRC(f,c,0,c.length);d+=e(c.length)+b+c+e(f^4294967295);
|
|
|
|
|
d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+t);l(a,t);l(a,4)}while(t);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
|
|
|
|
|
function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;
|
|
|
|
@ -8433,9 +8434,9 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
|
|
|
|
|
[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,l,p,e,g,t){if(null!=c&&null==mxMarker.markers[c]){var k=this.getPackageForType(c);null!=k&&mxStencilRegistry.getStencil(k)}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(z.value))));z.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(z.value))))}function f(b){function c(b,c,d){var l=b.getGraphBounds(),
|
|
|
|
|
p=0,e=0,g=O.get(),t=1/b.pageScale,k=y.checked;if(k)var t=parseInt(U.value),u=parseInt(ja.value),t=Math.min(g.height*u/(l.height/b.view.scale),g.width*t/(l.width/b.view.scale));else t=parseInt(n.value)/(100*b.pageScale),isNaN(t)&&(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);t*=f;!k&&b.pageVisible?(l=b.getPageLayout(),p-=l.x*g.width,e-=l.y*g.height):k=!0;if(null==c){c=PrintDialog.createPrintPreview(b,t,g,0,p,e,k);c.pageSelector=
|
|
|
|
|
p=0,e=0,g=O.get(),t=1/b.pageScale,k=y.checked;if(k)var t=parseInt(V.value),u=parseInt(ja.value),t=Math.min(g.height*u/(l.height/b.view.scale),g.width*t/(l.width/b.view.scale));else t=parseInt(n.value)/(100*b.pageScale),isNaN(t)&&(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);t*=f;!k&&b.pageVisible?(l=b.getPageLayout(),p-=l.x*g.width,e-=l.y*g.height):k=!0;if(null==c){c=PrintDialog.createPrintPreview(b,t,g,0,p,e,k);c.pageSelector=
|
|
|
|
|
!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var z=c.writeHead;c.writeHead=function(b){z.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 v=c.renderPage;c.renderPage=function(a,b,c,f,d,l){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=v.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=k;c.appendGraph(b,t,p,e,d,!0)}return c}var f=parseInt(ca.value)/100;isNaN(f)&&(f=1,ca.value="100 %");var f=.75*f,l=z.value,p=m.value,e=!k.checked,t=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;k.checked||(u=parseInt(l)-1,e=parseInt(p)-
|
|
|
|
|
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=k;c.appendGraph(b,t,p,e,d,!0)}return c}var f=parseInt(ba.value)/100;isNaN(f)&&(f=1,ba.value="100 %");var f=.75*f,l=z.value,p=m.value,e=!k.checked,t=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;k.checked||(u=parseInt(l)-1,e=parseInt(p)-
|
|
|
|
|
1);for(var v=u;v<=e;v++){var B=a.pages[v],l=B==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),p=!0,u=!1,x=null,A=null;null==B.viewState&&null==B.root&&a.updatePageRoot(B);null!=B.viewState&&(p=B.viewState.pageVisible,u=B.viewState.mathEnabled,x=B.viewState.background,A=B.viewState.backgroundImage);l.background=x;l.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;l.pageVisible=p;l.mathEnabled=u;var q=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==
|
|
|
|
|
a?B.getName():"pagenumber"==a?v+1:q.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(B);l.model.setRoot(B.root)}t=c(l,t,v!=e);l!=d&&l.container.parentNode.removeChild(l.container)}}else t=c(d);null==t?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(e=t.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 () {"),
|
|
|
|
@ -8444,15 +8445,15 @@ e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.write
|
|
|
|
|
p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");t.appendChild(p);var z=document.createElement("input");z.style.cssText="margin:0 8px 0 8px;";z.setAttribute("value","1");z.setAttribute("type","number");z.setAttribute("min","1");z.style.width="50px";t.appendChild(z);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));t.appendChild(p);var m=z.cloneNode(!0);t.appendChild(m);mxEvent.addListener(z,"focus",function(){u.checked=!0});mxEvent.addListener(m,
|
|
|
|
|
"focus",function(){u.checked=!0});mxEvent.addListener(z,"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;z.value=g;m.value=g;break}z.setAttribute("max",e);m.setAttribute("max",e);1<e&&l.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var B=document.createElement("input");B.style.marginRight="8px";B.setAttribute("value","adjust");B.setAttribute("type",
|
|
|
|
|
"radio");B.setAttribute("name","printZoom");v.appendChild(B);p=document.createElement("span");mxUtils.write(p,mxResources.get("adjustTo"));v.appendChild(p);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width="50px";v.appendChild(n);mxEvent.addListener(n,"focus",function(){B.checked=!0});l.appendChild(v);var t=t.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);t.appendChild(p);v=document.createElement("table");v.style.display="inline-block";var x=document.createElement("tbody"),A=document.createElement("tr"),q=A.cloneNode(!0),C=document.createElement("td"),D=C.cloneNode(!0),G=C.cloneNode(!0),ea=C.cloneNode(!0),Q=C.cloneNode(!0),X=C.cloneNode(!0);C.style.textAlign="right";ea.style.textAlign="right";mxUtils.write(C,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"));G.appendChild(p);mxUtils.write(ea,mxResources.get("fitToBy"));var ja=U.cloneNode(!0);Q.appendChild(ja);mxEvent.addListener(U,"focus",function(){y.checked=!0});mxEvent.addListener(ja,"focus",function(){y.checked=!0});p=document.createElement("span");mxUtils.write(p,
|
|
|
|
|
p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(y);t.appendChild(p);v=document.createElement("table");v.style.display="inline-block";var x=document.createElement("tbody"),A=document.createElement("tr"),q=A.cloneNode(!0),C=document.createElement("td"),D=C.cloneNode(!0),G=C.cloneNode(!0),ea=C.cloneNode(!0),Q=C.cloneNode(!0),X=C.cloneNode(!0);C.style.textAlign="right";ea.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var V=document.createElement("input");
|
|
|
|
|
V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","1");V.setAttribute("min","1");V.setAttribute("type","number");V.style.width="40px";D.appendChild(V);p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsAcross"));G.appendChild(p);mxUtils.write(ea,mxResources.get("fitToBy"));var ja=V.cloneNode(!0);Q.appendChild(ja);mxEvent.addListener(V,"focus",function(){y.checked=!0});mxEvent.addListener(ja,"focus",function(){y.checked=!0});p=document.createElement("span");mxUtils.write(p,
|
|
|
|
|
mxResources.get("fitToSheetsDown"));X.appendChild(p);A.appendChild(C);A.appendChild(D);A.appendChild(G);q.appendChild(ea);q.appendChild(Q);q.appendChild(X);x.appendChild(A);x.appendChild(q);v.appendChild(x);t.appendChild(v);l.appendChild(t);t=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));t.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var O=PageSetupDialog.addPageFormatPanel(p,
|
|
|
|
|
"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));t.appendChild(p);var ca=document.createElement("input");ca.style.cssText="margin:0 8px 0 8px;";ca.setAttribute("value","100 %");ca.style.width="60px";t.appendChild(ca);l.appendChild(t);p=document.createElement("div");p.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
|
|
|
|
|
"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));t.appendChild(p);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";t.appendChild(ba);l.appendChild(t);p=document.createElement("div");p.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
|
|
|
|
|
t.className="geBtn";a.editor.cancelFirst&&p.appendChild(t);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",p.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),v.className="geBtn",p.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});v.className=
|
|
|
|
|
"geBtn gePrimaryBtn";p.appendChild(v);a.editor.cancelFirst||p.appendChild(t);l.appendChild(p);this.container=l};var z=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)):(z.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(G){}};D.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(x){}})();
|
|
|
|
|
(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.9.4";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!=
|
|
|
|
|
(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.9.5";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",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=l+"/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]);
|
|
|
|
@ -8743,19 +8744,19 @@ 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=[],f={};if(0<c.length){var g={},k=null,l=null,m=null,n=null,q=null,x=null,G="",H="auto",E="auto",I=null,J=null,F=40,M=40,K=100,S=0,L=this.editor.graph;L.getGraphBounds();for(var T=function(){null!=b?b(ka):(L.setSelectionCells(ka),L.scrollCellToVisible(L.getSelectionCell()))},Y=L.getFreeInsertPoint(),aa=Y.x,Z=Y.y,Y=Z,ia=null,V="auto",x=null,ba=[],da=null,P=null,W=0;W<c.length&&"#"==c[W].charAt(0);){a=
|
|
|
|
|
c[W];for(W++;W<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[W].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[W].substring(1)),W++;if("#"!=a.charAt(1)){var fa=a.indexOf(":");if(0<fa){var R=mxUtils.trim(a.substring(1,fa)),N=mxUtils.trim(a.substring(fa+1));"label"==R?ia=L.sanitizeHtml(N):"style"==R?k=N:"parentstyle"==R?n=N:"stylename"==R&&0<N.length&&"-"!=N?m=N:"styles"==R&&0<N.length&&"-"!=N?l=JSON.parse(N):"identity"==R&&0<N.length&&"-"!=N?q=N:"parent"==R&&0<N.length&&"-"!=N?x=N:"namespace"==
|
|
|
|
|
R&&0<N.length&&"-"!=N?G=N:"width"==R?H=N:"height"==R?E=N:"left"==R&&0<N.length?I=N:"top"==R&&0<N.length?J=N:"ignore"==R?P=N.split(","):"connect"==R?ba.push(JSON.parse(N)):"link"==R?da=N:"padding"==R?S=parseFloat(N):"edgespacing"==R?F=parseFloat(N):"nodespacing"==R?M=parseFloat(N):"levelspacing"==R?K=parseFloat(N):"layout"==R&&(V=N)}}}if(null==c[W])throw Error(mxResources.get("invalidOrMissingFile"));var ea=this.editor.csvToArray(c[W]),R=fa=null;if(null!=q||null!=x)for(var Q=0;Q<ea.length;Q++)q==ea[Q]&&
|
|
|
|
|
(fa=Q),x==ea[Q]&&(R=Q);null==ia&&(ia="%"+ea[0]+"%");if(null!=ba)for(var X=0;X<ba.length;X++)null==g[ba[X].to]&&(g[ba[X].to]={});L.model.beginUpdate();try{for(Q=W+1;Q<c.length;Q++){var U=this.editor.csvToArray(c[Q]);if(null==U){var ja=40<c[Q].length?c[Q].substring(0,40)+"...":c[Q];throw Error(Q+" ("+ja+") "+mxResources.get("containsValidationErrors"));}if(U.length==ea.length){var O=null,ca=null!=fa?G+U[fa]:null;null!=ca&&(O=L.model.getCell(ca));var q=null!=O,ga=new mxCell(ia,new mxGeometry(aa,Y,0,
|
|
|
|
|
0),k||"whiteSpace=wrap;html=1;");ga.vertex=!0;ga.id=ca;for(var ha=0;ha<U.length;ha++)L.setAttributeForCell(ga,ea[ha],U[ha]);if(null!=m&&null!=l){var ra=l[ga.getAttribute(m)];null!=ra&&(ga.style=ra)}L.setAttributeForCell(ga,"placeholders","1");ga.style=L.replacePlaceholders(ga,ga.style);q&&(L.model.setGeometry(O,ga.geometry),L.model.setStyle(O,ga.style),0>mxUtils.indexOf(e,O)&&e.push(O));O=ga;if(!q)for(X=0;X<ba.length;X++)g[ba[X].to][O.getAttribute(ba[X].to)]=O;null!=da&&"link"!=da&&(L.setLinkForCell(O,
|
|
|
|
|
O.getAttribute(da)),L.setAttributeForCell(O,da,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var ta=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=I&&null!=O.getAttribute(I)&&(O.geometry.x=aa+parseFloat(O.getAttribute(I))),null!=J&&null!=O.getAttribute(J)&&(O.geometry.y=Z+parseFloat(O.getAttribute(J))),"@"==H.charAt(0)&&null!=O.getAttribute(H.substring(1))?O.geometry.width=parseFloat(O.getAttribute(H.substring(1))):O.geometry.width="auto"==H?ta.width+S:parseFloat(H),
|
|
|
|
|
"@"==E.charAt(0)&&null!=O.getAttribute(E.substring(1))?O.geometry.height=parseFloat(O.getAttribute(E.substring(1))):O.geometry.height="auto"==E?ta.height+S:parseFloat(E),Y+=O.geometry.height+M);q?(null==f[ca]&&(f[ca]=[]),f[ca].push(O)):(x=null!=R?L.model.getCell(G+U[R]):null,d.push(O),null!=x?(x.style=L.replacePlaceholders(x,n),L.addCell(O,x)):e.push(L.addCell(O)))}}for(var la=e.slice(),ka=e.slice(),X=0;X<ba.length;X++)for(var ua=ba[X],Q=0;Q<e.length;Q++){var O=e[Q],va=mxUtils.bind(this,function(a,
|
|
|
|
|
b,c){var d=b.getAttribute(c.from);if(null!=d){L.setAttributeForCell(b,c.from,null);for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));ka.push(L.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,c.style||L.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:f,la)}}}});va(O,O,ua);if(null!=f[O.id])for(ha=0;ha<f[O.id].length;ha++)va(O,
|
|
|
|
|
f[O.id][ha],ua)}if(null!=P)for(Q=0;Q<d.length;Q++)for(O=d[Q],ha=0;ha<P.length;ha++)L.setAttributeForCell(O,mxUtils.trim(P[ha]),null);if(0<e.length){var ma=new mxParallelEdgeLayout(L);ma.spacing=F;var sa=function(){0<ma.spacing&&ma.execute(L.getDefaultParent());for(var a=0;a<e.length;a++){var b=L.getCellGeometry(e[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y));"auto"==H&&(b.width=Math.round(L.snap(b.width)));"auto"==E&&(b.height=Math.round(L.snap(b.height)))}};if("["==V.charAt(0)){var wa=
|
|
|
|
|
T;L.view.validate();this.executeLayoutList(JSON.parse(V),function(){sa();wa()});T=null}else if("circle"==V){var pa=new mxCircleLayout(L);pa.resetEdges=!1;var xa=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){pa.execute(L.getDefaultParent());sa()},!0,T);T=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&ka.length==2*e.length-1&&1==la.length){L.view.validate();var qa=new mxCompactTreeLayout(L,"horizontaltree"==
|
|
|
|
|
V);qa.levelDistance=M;qa.edgeRouting=!1;qa.resetEdges=!1;this.executeLayout(function(){qa.execute(L.getDefaultParent(),0<la.length?la[0]:null)},!0,T);T=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==la.length){L.view.validate();var na=new mxHierarchicalLayout(L,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);na.intraCellSpacing=M;na.parallelEdgeSpacing=F;na.interRankCellSpacing=K;na.disableEdgeStyle=!1;this.executeLayout(function(){na.execute(L.getDefaultParent(),
|
|
|
|
|
ka);L.moveCells(ka,aa,Z)},!0,T);T=null}else if("organic"==V||"auto"==V&&ka.length>e.length){L.view.validate();var oa=new mxFastOrganicLayout(L);oa.forceConstant=3*M;oa.resetEdges=!1;var ya=oa.isVertexIgnored;oa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ma=new mxParallelEdgeLayout(L);ma.spacing=F;this.executeLayout(function(){oa.execute(L.getDefaultParent());sa()},!0,T);T=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=T&&T()}}catch(za){this.handleError(za)}};
|
|
|
|
|
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(" "),
|
|
|
|
|
0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,l=null,m=null,n=null,q=null,x=null,G="",H="auto",E="auto",I=null,J=null,F=40,M=40,K=100,S=0,L=this.editor.graph;L.getGraphBounds();for(var T=function(){null!=b?b(ka):(L.setSelectionCells(ka),L.scrollCellToVisible(L.getSelectionCell()))},Y=L.getFreeInsertPoint(),da=Y.x,aa=Y.y,Y=aa,ha=null,U="auto",x=null,Z=[],ca=null,P=null,W=0;W<c.length&&"#"==c[W].charAt(0);){a=
|
|
|
|
|
c[W];for(W++;W<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[W].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[W].substring(1)),W++;if("#"!=a.charAt(1)){var fa=a.indexOf(":");if(0<fa){var R=mxUtils.trim(a.substring(1,fa)),N=mxUtils.trim(a.substring(fa+1));"label"==R?ha=L.sanitizeHtml(N):"style"==R?k=N:"parentstyle"==R?n=N:"stylename"==R&&0<N.length&&"-"!=N?m=N:"styles"==R&&0<N.length&&"-"!=N?l=JSON.parse(N):"identity"==R&&0<N.length&&"-"!=N?q=N:"parent"==R&&0<N.length&&"-"!=N?x=N:"namespace"==
|
|
|
|
|
R&&0<N.length&&"-"!=N?G=N:"width"==R?H=N:"height"==R?E=N:"left"==R&&0<N.length?I=N:"top"==R&&0<N.length?J=N:"ignore"==R?P=N.split(","):"connect"==R?Z.push(JSON.parse(N)):"link"==R?ca=N:"padding"==R?S=parseFloat(N):"edgespacing"==R?F=parseFloat(N):"nodespacing"==R?M=parseFloat(N):"levelspacing"==R?K=parseFloat(N):"layout"==R&&(U=N)}}}if(null==c[W])throw Error(mxResources.get("invalidOrMissingFile"));var ea=this.editor.csvToArray(c[W]),R=fa=null;if(null!=q||null!=x)for(var Q=0;Q<ea.length;Q++)q==ea[Q]&&
|
|
|
|
|
(fa=Q),x==ea[Q]&&(R=Q);null==ha&&(ha="%"+ea[0]+"%");if(null!=Z)for(var X=0;X<Z.length;X++)null==g[Z[X].to]&&(g[Z[X].to]={});L.model.beginUpdate();try{for(Q=W+1;Q<c.length;Q++){var V=this.editor.csvToArray(c[Q]);if(null==V){var ja=40<c[Q].length?c[Q].substring(0,40)+"...":c[Q];throw Error(Q+" ("+ja+") "+mxResources.get("containsValidationErrors"));}if(V.length==ea.length){var O=null,ba=null!=fa?G+V[fa]:null;null!=ba&&(O=L.model.getCell(ba));var q=null!=O,ga=new mxCell(ha,new mxGeometry(da,Y,0,0),k||
|
|
|
|
|
"whiteSpace=wrap;html=1;");ga.vertex=!0;ga.id=ba;for(var ia=0;ia<V.length;ia++)L.setAttributeForCell(ga,ea[ia],V[ia]);if(null!=m&&null!=l){var ra=l[ga.getAttribute(m)];null!=ra&&(ga.style=ra)}L.setAttributeForCell(ga,"placeholders","1");ga.style=L.replacePlaceholders(ga,ga.style);q&&(L.model.setGeometry(O,ga.geometry),L.model.setStyle(O,ga.style),0>mxUtils.indexOf(e,O)&&e.push(O));O=ga;if(!q)for(X=0;X<Z.length;X++)g[Z[X].to][O.getAttribute(Z[X].to)]=O;null!=ca&&"link"!=ca&&(L.setLinkForCell(O,O.getAttribute(ca)),
|
|
|
|
|
L.setAttributeForCell(O,ca,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var ta=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=I&&null!=O.getAttribute(I)&&(O.geometry.x=da+parseFloat(O.getAttribute(I))),null!=J&&null!=O.getAttribute(J)&&(O.geometry.y=aa+parseFloat(O.getAttribute(J))),"@"==H.charAt(0)&&null!=O.getAttribute(H.substring(1))?O.geometry.width=parseFloat(O.getAttribute(H.substring(1))):O.geometry.width="auto"==H?ta.width+S:parseFloat(H),"@"==E.charAt(0)&&
|
|
|
|
|
null!=O.getAttribute(E.substring(1))?O.geometry.height=parseFloat(O.getAttribute(E.substring(1))):O.geometry.height="auto"==E?ta.height+S:parseFloat(E),Y+=O.geometry.height+M);q?(null==f[ba]&&(f[ba]=[]),f[ba].push(O)):(x=null!=R?L.model.getCell(G+V[R]):null,d.push(O),null!=x?(x.style=L.replacePlaceholders(x,n),L.addCell(O,x)):e.push(L.addCell(O)))}}for(var la=e.slice(),ka=e.slice(),X=0;X<Z.length;X++)for(var ua=Z[X],Q=0;Q<e.length;Q++){var O=e[Q],va=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);
|
|
|
|
|
if(null!=d){L.setAttributeForCell(b,c.from,null);for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));ka.push(L.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,c.style||L.createCurrentEdgeStyle()));mxUtils.remove(c.invert?a:f,la)}}}});va(O,O,ua);if(null!=f[O.id])for(ia=0;ia<f[O.id].length;ia++)va(O,f[O.id][ia],ua)}if(null!=P)for(Q=0;Q<
|
|
|
|
|
d.length;Q++)for(O=d[Q],ia=0;ia<P.length;ia++)L.setAttributeForCell(O,mxUtils.trim(P[ia]),null);if(0<e.length){var ma=new mxParallelEdgeLayout(L);ma.spacing=F;var sa=function(){0<ma.spacing&&ma.execute(L.getDefaultParent());for(var a=0;a<e.length;a++){var b=L.getCellGeometry(e[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y));"auto"==H&&(b.width=Math.round(L.snap(b.width)));"auto"==E&&(b.height=Math.round(L.snap(b.height)))}};if("["==U.charAt(0)){var wa=T;L.view.validate();this.executeLayoutList(JSON.parse(U),
|
|
|
|
|
function(){sa();wa()});T=null}else if("circle"==U){var pa=new mxCircleLayout(L);pa.resetEdges=!1;var xa=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){pa.execute(L.getDefaultParent());sa()},!0,T);T=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&ka.length==2*e.length-1&&1==la.length){L.view.validate();var qa=new mxCompactTreeLayout(L,"horizontaltree"==U);qa.levelDistance=M;qa.edgeRouting=!1;qa.resetEdges=
|
|
|
|
|
!1;this.executeLayout(function(){qa.execute(L.getDefaultParent(),0<la.length?la[0]:null)},!0,T);T=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==la.length){L.view.validate();var na=new mxHierarchicalLayout(L,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);na.intraCellSpacing=M;na.parallelEdgeSpacing=F;na.interRankCellSpacing=K;na.disableEdgeStyle=!1;this.executeLayout(function(){na.execute(L.getDefaultParent(),ka);L.moveCells(ka,da,aa)},!0,T);T=null}else if("organic"==
|
|
|
|
|
U||"auto"==U&&ka.length>e.length){L.view.validate();var oa=new mxFastOrganicLayout(L);oa.forceConstant=3*M;oa.resetEdges=!1;var ya=oa.isVertexIgnored;oa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ma=new mxParallelEdgeLayout(L);ma.spacing=F;this.executeLayout(function(){oa.execute(L.getDefaultParent());sa()},!0,T);T=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=T&&T()}}catch(za){this.handleError(za)}};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)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
|
|
|
|
@ -8976,11 +8977,11 @@ null!=d&&null!=e&&(x.thumbnail={image:d,mimeType:e}));var y=a.getData(),A=mxUtil
|
|
|
|
|
"-"+this.ui.hashValue(d.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(K){}}else{a.saveLevel=null;b(d,y);if(null!=z){this.executeRequest(gapi.client.drive.revisions.get({fileId:z.id,revisionId:z.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:z.id,revisionId:z.headRevisionId,resource:a}))})));
|
|
|
|
|
try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+z.id+"."+z.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(K){}}try{EditorUi.logEvent({category:"SUCCESS-SAVE-FILE-"+a.getHash()+"-rev0_"+u+"-mod0_"+p,action:"rev-"+d.headRevisionId+"-mod_"+d.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+
|
|
|
|
|
(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(K){}}}catch(K){q(K)}}),E=mxUtils.bind(this,function(b,e){a.saveLevel=4;try{null!=m&&(x.properties=m);var f=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,l=mxUtils.bind(this,function(d){a.saveLevel=
|
|
|
|
|
5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),x,b,c||d||k,e,d?null:f,D),A,mxUtils.bind(this,function(b){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(l,2*g*this.coolOff*
|
|
|
|
|
(1+.1*(Math.random()-.5)));else{l(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(Z){}}else n(b,c)}catch(Z){q(Z)}}),mxUtils.bind(this,function(){n(b)})):n(b)}catch(aa){q(aa)}}))}catch(Y){q(Y)}});if(v&&null==d){a.saveLevel=8;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,"_");x.thumbnail={image:c,mimeType:"image/png"};l(!1)}catch(aa){l(!1)}});p.src="data:image/png;base64,"+b}else l(!1)}catch(L){q(L)}});v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){E(a,!0)}),n,this.ui.getCurrentFile()!=a?y:null):E(y,!1)}catch(I){q(I)}}),A=mxUtils.bind(this,function(){try{if(a.saveLevel=
|
|
|
|
|
2,g||v||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(b){try{var c=a.thumbTime=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(z){c=null}t(c,"image/png")}catch(z){q(z)}})))a.thumbTime=null,t(null,
|
|
|
|
|
null,a.constructor!=DriveLibrary)}catch(y){q(y)}});e||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(y){q(y)}};
|
|
|
|
|
5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,m=!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),4*this.ui.timeout);this.executeRequest(this.createUploadRequest(a.getId(),x,b,c||d||k,e,d?null:f,D),mxUtils.bind(this,function(a){window.clearTimeout(p);m&&A(a)}),mxUtils.bind(this,function(b){window.clearTimeout(p);if(m){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),
|
|
|
|
|
fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(l,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{l(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(U){}}else n(b,c)}catch(U){q(U)}}),mxUtils.bind(this,function(){n(b)})):
|
|
|
|
|
n(b)}catch(ha){q(ha)}}}))}catch(aa){q(aa)}});if(v&&null==d){a.saveLevel=8;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,"_");x.thumbnail={image:c,mimeType:"image/png"};l(!1)}catch(da){l(!1)}});p.src="data:image/png;base64,"+
|
|
|
|
|
b}else l(!1)}catch(L){q(L)}});v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){E(a,!0)}),n,this.ui.getCurrentFile()!=a?y:null):E(y,!1)}catch(I){q(I)}}),A=mxUtils.bind(this,function(){try{if(a.saveLevel=2,g||v||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(b){try{var c=a.thumbTime=null;try{null!=b&&(c=b.toDataURL("image/png")),
|
|
|
|
|
null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(z){c=null}t(c,"image/png")}catch(z){q(z)}})))a.thumbTime=null,t(null,null,a.constructor!=DriveLibrary)}catch(y){q(y)}});e||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(y){q(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!=
|
|
|
|
|
c&&c()})))};
|
|
|
|
|
DriveClient.prototype.redirectToNewApp=function(a,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#G"+c,d=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),d,mxUtils.bind(this,function(){this.redirectDialogShowing=
|
|
|
|
@ -9089,7 +9090,7 @@ 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(k){k?(k="/me/drive/root",null!=g&&(k=this.getItemURL(g,!0)),k=this.baseUrl+k+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(k,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 k=this.getItemURL(a.getId());this.writeFile(k+"/content/",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){try{var e=a.getData(),g=mxUtils.bind(this,function(g){var k=this.getItemURL(a.getId());this.writeFile(k+"/content/",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)}catch(k){b(k)}};
|
|
|
|
|
OneDriveClient.prototype.writeFile=function(a,c,b,d,e,g,k){try{if(null!=a&&null!=c){var m=mxUtils.bind(this,function(n){try{var q=!0,f=window.setTimeout(mxUtils.bind(this,function(){q=!1;g({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),l=new mxXmlRequest(a,c,b);l.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});l.send(mxUtils.bind(this,function(a){window.clearTimeout(f);
|
|
|
|
|
q&&(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);q&&g(this.parseRequestText(a))}))}catch(p){g(p)}});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){m(!0)},g):m(!1)}else g({message:mxResources.get("unknownError")})}catch(n){g(n)}};
|
|
|
|
|
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)})};
|
|
|
|
@ -9158,14 +9159,13 @@ null!=q&&q(b)}))});a()}),l=null,p=null,u=mxUtils.bind(this,function(g){null==g&&
|
|
|
|
|
this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m));for(var t=0;t<e.length;t++)mxUtils.bind(this,function(d){m.appendChild(n(d.name,mxUtils.bind(this,function(){a?(b=d.id,f()):(this.ui.hideDialog(),c(d.id))})))})(e[t]);100==e.length&&(m.appendChild(l),p=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(v,q,!0):null!=q&&q({message:a.responseText})}))});v()});u()};
|
|
|
|
|
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};DrawioComment=function(a,c,b,d,e,g,k){this.file=a;this.id=c;this.content=b;this.modifiedDate=d;this.createdDate=e;this.isResolved=g;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,b,d,e){c()};DrawioComment.prototype.editComment=function(a,c,b){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,b,d,e,g,k,m){DrawioComment.call(this,a,c,b,d,e,g,k);this.pCommentId=m};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,b,d,e){a={content:a.content};d?a.verb="resolve":e&&(a.verb="reopen");this.file.ui.drive.executeRequest(gapi.client.drive.replies.insert({fileId:this.file.getId(),commentId:this.id,resource:a}),mxUtils.bind(this,function(a){c(a.replyId)}),b)};
|
|
|
|
|
DriveComment.prototype.editComment=function(a,c,b){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies.patch({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id,resource:a}):gapi.client.drive.comments.patch({fileId:this.file.getId(),commentId:this.id,resource:a}),c,b)};
|
|
|
|
|
DriveComment.prototype.deleteComment=function(a,c){this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies["delete"]({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id}):gapi.client.drive.comments["delete"]({fileId:this.file.getId(),commentId:this.id}),a,c)};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var b={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.autosaveThread?"-thread":"")+"-sl_"+(null!=a.saveLevel?
|
|
|
|
|
a.saveLevel:"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":"")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x"),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};a.constructor==
|
|
|
|
|
DriveFile&&null!=a.desc&&null!=this.drive&&(b.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(b)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+a.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
|
|
|
|
|
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
|
|
|
|
|
DriveComment.prototype.deleteComment=function(a,c){this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies["delete"]({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id}):gapi.client.drive.comments["delete"]({fileId:this.file.getId(),commentId:this.id}),a,c)};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var b={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+"-sl_"+(null!=a.saveLevel?a.saveLevel:"x")+(this.editor.autosave?
|
|
|
|
|
"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(b.label+=(null!=this.drive.user?
|
|
|
|
|
"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(b)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+a.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
|
|
|
|
|
(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var d=null;try{d=window.open(a)}catch(m){}null==d||void 0===d?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
|
|
|
|
|
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[a])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(a){try{a(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=0,this.initializeEmbedMode())}),5E3)}this.load()};
|
|
|
|
|
App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";
|
|
|
|
|
App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";App.GOOGLE_APIS="client,drive-share";
|
|
|
|
|
App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";App.GOOGLE_APIS="client,drive-share";App.startTime=new Date;
|
|
|
|
|
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",ac148:"/plugins/cConf-1-4-8.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js",
|
|
|
|
|
"import":"/plugins/import.js",replay:"/plugins/replay.js",anon:"/plugins/anonymize.js",tr:"/plugins/trello.js",f5:"/plugins/rackF5.js",tickets:"/plugins/tickets.js",flow:"/plugins/flow.js",webcola:"/plugins/webcola/webcola.js",rnd:"/plugins/random.js",page:"/plugins/page.js",gd:"/plugins/googledrive.js",tags:"/plugins/tags.js"};
|
|
|
|
|
App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var c=document.cookie.split(";"),b=0;b<c.length;b++){var d=mxUtils.trim(c[b]);if("MODE="==d.substring(0,5)){a=d.substring(5);break}}null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie="MODE=; expires="+c.toUTCString(),localStorage.setItem(".mode",a))}return a};
|
|
|
|
@ -9211,11 +9211,11 @@ typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new Dr
|
|
|
|
|
action:"timeout",label:408})}),this.timeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(a){window.clearTimeout(g)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right=
|
|
|
|
|
"0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)})),
|
|
|
|
|
mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};App.prototype.scheduleSanityCheck=function(){null==this.sanityCheckThread&&(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
|
|
|
|
|
App.prototype.sanityCheck=function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()&&a.isAutosave()&&Date.now()-(null!=a.lastSaved?a.lastSaved.getTime():a.opened.getTime())>=this.warnInterval){var c={category:"WARN-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.autosaveThread?"-thread":"")+"-sl_"+(null!=a.saveLevel?a.saveLevel:"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?
|
|
|
|
|
"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":"")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x"),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(c.label+=(null!=
|
|
|
|
|
this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(c);c=mxResources.get("ensureDataSaved");null!=a.lastSaved&&(c=this.timeSince(a.lastSaved),null==c&&(c=mxResources.get("lessThanAMinute")),c=mxResources.get("lastSaved",[c]));this.showError(mxResources.get("unsavedChanges"),c,mxResources.get("ignore"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),
|
|
|
|
|
mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=this.mode&&a.isEditable()?"save":"saveAs").funct()}),null,null,360,120,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};
|
|
|
|
|
App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};
|
|
|
|
|
App.prototype.sanityCheck=function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()&&a.isAutosave()&&a.isOverdue()){var c={category:"WARN-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+"-age_"+(null!=a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+"-sl_"+(null!=a.saveLevel?a.saveLevel:"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=
|
|
|
|
|
a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(c.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+
|
|
|
|
|
"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(c);c=mxResources.get("ensureDataSaved");null!=a.lastSaved&&(c=this.timeSince(a.lastSaved),null==c&&(c=mxResources.get("lessThanAMinute")),c=mxResources.get("lastSaved",[c]));this.showError(mxResources.get("unsavedChanges"),c,mxResources.get("ignore"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=this.mode&&
|
|
|
|
|
a.isEditable()?"save":"saveAs").funct()}),null,null,360,120,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
|
|
|
|
|
App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};
|
|
|
|
|
App.prototype.checkLicense=function(){var a=this.drive.getUser(),c=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=c){var b=c.lastIndexOf("@"),d=c;0<=b&&(d=c.substring(b+1),c=this.crc32(c.substring(0,b))+"@"+d);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&email="+encodeURIComponent(c)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
|
|
|
|
|
a.getStatus()&&299>=a.getStatus()){var b=a.getText();if(0<b.length){var c=JSON.parse(b);null!=c&&this.handleLicense(c,d)}}}catch(m){}}))}};App.prototype.handleLicense=function(a,c){null!=a&&null!=a.plugins&&App.loadPlugins(a.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};
|
|
|
|
|
App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
|
|
|
|
|