diff --git a/ChangeLog b/ChangeLog index a3643f92..aa908337 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +28-OCT-2017: 7.6.4 + +- Adds vector handles +- Fixes text style combo in Firefox +- Fixes text flow after word wrap change +- Uses mxGraph 3.7.6 beta 7 + 26-OCT-2017: 7.6.3 - Adds current style to CSV and text diff --git a/VERSION b/VERSION index 43bcdded..c2cd2461 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.6.3 \ No newline at end of file +7.6.4 \ No newline at end of file diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js index ccc0025b..7ea58c3d 100644 --- a/etc/mxgraph/mxClient.js +++ b/etc/mxgraph/mxClient.js @@ -928,9 +928,9 @@ e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},f mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0}; mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var d=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)d=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,d,c),d=b.view.getState(b.getCellAt(c.x,c.y));return d};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,a))}),mxUtils.bind(this, function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,c(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,c(d)))}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))}; -mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);null==a.text&&null!=c&&(mxUtils.isNode(c)||0 0 ) + { + chunk = Arrays.copyOf(chunk,len); + result.append(mxBase64.encodeToString(chunk, false)); + } + + out.write(result.toString().getBytes()); + } + } + else + { + response.setContentType(connection.getContentType()); + Utils.copy(connection.getInputStream(), out); + } } out.flush(); diff --git a/war/cache.manifest b/war/cache.manifest index e27e6e27..12b9a321 100644 --- a/war/cache.manifest +++ b/war/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 10/26/2017 11:09 AM +# 10/28/2017 05:38 PM app.html index.html?offline=1 diff --git a/war/images/drawlogo-text-bottom.svg b/war/images/drawlogo-text-bottom.svg new file mode 100644 index 00000000..8bb3ecc6 --- /dev/null +++ b/war/images/drawlogo-text-bottom.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/war/images/dropbox-logo-white.svg b/war/images/dropbox-logo-white.svg index 92e6985d..49d2573d 100644 --- a/war/images/dropbox-logo-white.svg +++ b/war/images/dropbox-logo-white.svg @@ -1,13 +1,12 @@ - - - - - - - - - - + + + + + DropboxGlyph + + + + + \ No newline at end of file diff --git a/war/images/dropbox-logo.svg b/war/images/dropbox-logo.svg index 9d84db3e..f2382fc5 100644 --- a/war/images/dropbox-logo.svg +++ b/war/images/dropbox-logo.svg @@ -1,11 +1,12 @@ - - - - - - - - - + + + + + DropboxGlyph + + + + + + \ No newline at end of file diff --git a/war/js/app.min.js b/war/js/app.min.js index 3472f768..61bce95b 100644 --- a/war/js/app.min.js +++ b/war/js/app.min.js @@ -1034,9 +1034,9 @@ e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},f mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0}; mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var d=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)d=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,d,c),d=b.view.getState(b.getCellAt(c.x,c.y));return d};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,a))}),mxUtils.bind(this, function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,c(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,c(d)))}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))}; -mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);null==a.text&&null!=c&&(mxUtils.isNode(c)||0'+d+""))),a,c)}; Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ5NeoVcKDAZs+//PXLKI8YKlWvaRU7jXuFpb9qsbdK05XILUiE8JHQox1Pv3OgFUzf1AGqWqUg+QBwLF0YAeegBlCNgRWOpB5vUfTCmeoHQ/wNdy0jLH/cM+b+wLTw4n/7ACEmH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W5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+ @@ -1969,14 +1970,14 @@ this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView")) Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize", this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width); a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a}; -Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,d){c.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,c){for(var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes),e=a.getModel(),g=[],k=0;kdocument.documentMode)&&(g=80);d+=g;b+=g;var k=d,l=b,m=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-d-64)/2)),p=Math.max(1,Math.round((m-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=Math.min(d,document.body.scrollWidth-64);b>m-64&&(c.style.overflowY="auto");b=Math.min(b,m-64);0document.documentMode)&&(g=80);d+=g;b+=g;var h=d,l=b,m=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-d-64)/2)),p=Math.max(1,Math.round((m-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=Math.min(d,document.body.scrollWidth-64);b>m-64&&(c.style.overflowY="auto");b=Math.min(b,m-64);0m-64?"auto":"";null!=this.dialogImg&&(this.dialogImg.style.top=p+14+"px",this.dialogImg.style.left=n+d+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; +this.dialogImg=e,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){m=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=m+"px";n=Math.max(1,Math.round((document.body.clientWidth-d-64)/2));p=Math.max(1,Math.round((m-b-a.footerHeight)/3));r.style.left=n+"px";r.style.top=p+"px";d=Math.min(h,document.body.scrollWidth-64);b=Math.min(l,m-64);r.style.width=d+"px";r.style.height= +b+"px";c.style.overflowY=l>m-64?"auto":"";null!=this.dialogImg&&(this.dialogImg.style.top=p+14+"px",this.dialogImg.style.left=n+d+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAx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G9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -1985,29 +1986,29 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA "/locked.png"; Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+ "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};var PrintDialog=function(a,c){this.create(a,c)}; -PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,f=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,e=1/d.pageScale;if(b){var h=g.checked?1:parseInt(m.value);isNaN(h)||(e=mxUtils.getScaleForPageCount(h,d,f))}d.getGraphBounds();var k=h=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*c);f.height=Math.ceil(f.height*c);e*=c;!b&&d.pageVisible?(c=d.getPageLayout(),h-=c.x*f.width,k-=c.y*f.height): -b=!0;b=PrintDialog.createPrintPreview(d,e,f,0,h,k,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,e,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");b=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");e=document.createElement("td");e.setAttribute("colspan","2");e.style.fontSize="10pt";e.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("fitPage")); -e.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;l.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){l.checked=!g.checked});b.appendChild(e);h.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");e=document.createElement("td");e.style.fontSize="10pt";e.appendChild(l);k=document.createElement("span");mxUtils.write(k," "+mxResources.get("posterPrint")+":");e.appendChild(k);mxEvent.addListener(k, -"click",function(a){l.checked=!l.checked;g.checked=!l.checked;mxEvent.consume(a)});b.appendChild(e);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";e=document.createElement("td");e.style.fontSize="10pt";e.appendChild(m);mxUtils.write(e," "+mxResources.get("pages")+" (max)");b.appendChild(e);h.appendChild(b);mxEvent.addListener(l,"change", -function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");g.checked=!l.checked});b=b.cloneNode(!1);e=document.createElement("td");mxUtils.write(e,mxResources.get("pageScale")+":");b.appendChild(e);e=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";e.appendChild(n);b.appendChild(e);h.appendChild(b);b=document.createElement("tr");e=document.createElement("td");e.colSpan=2; -e.style.paddingTop="20px";e.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&e.appendChild(k);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});p.className="geBtn";e.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";e.appendChild(p);a.editor.cancelFirst|| -e.appendChild(k);b.appendChild(e);h.appendChild(b);f.appendChild(h);this.container=f};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}; -PrintDialog.createPrintPreview=function(a,c,d,b,e,f,h){c=new mxPrintPreview(a,c,d,b,e,f);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=h;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var g=c.writeHead;c.writeHead=function(a){g.apply(this,arguments);a.writeln('")};return c}; +PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,f=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,e=1/d.pageScale;if(b){var k=g.checked?1:parseInt(m.value);isNaN(k)||(e=mxUtils.getScaleForPageCount(k,d,f))}d.getGraphBounds();var h=k=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*c);f.height=Math.ceil(f.height*c);e*=c;!b&&d.pageVisible?(c=d.getPageLayout(),k-=c.x*f.width,h-=c.y*f.height): +b=!0;b=PrintDialog.createPrintPreview(d,e,f,0,k,h,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,e,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var k=document.createElement("tbody");b=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");e=document.createElement("td");e.setAttribute("colspan","2");e.style.fontSize="10pt";e.appendChild(g);var h=document.createElement("span");mxUtils.write(h," "+mxResources.get("fitPage")); +e.appendChild(h);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;l.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){l.checked=!g.checked});b.appendChild(e);k.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");e=document.createElement("td");e.style.fontSize="10pt";e.appendChild(l);h=document.createElement("span");mxUtils.write(h," "+mxResources.get("posterPrint")+":");e.appendChild(h);mxEvent.addListener(h, +"click",function(a){l.checked=!l.checked;g.checked=!l.checked;mxEvent.consume(a)});b.appendChild(e);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";e=document.createElement("td");e.style.fontSize="10pt";e.appendChild(m);mxUtils.write(e," "+mxResources.get("pages")+" (max)");b.appendChild(e);k.appendChild(b);mxEvent.addListener(l,"change", +function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");g.checked=!l.checked});b=b.cloneNode(!1);e=document.createElement("td");mxUtils.write(e,mxResources.get("pageScale")+":");b.appendChild(e);e=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";e.appendChild(n);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");e.colSpan=2; +e.style.paddingTop="20px";e.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&e.appendChild(h);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});p.className="geBtn";e.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";e.appendChild(p);a.editor.cancelFirst|| +e.appendChild(h);b.appendChild(e);k.appendChild(b);f.appendChild(k);this.container=f};PrintDialog.printPreview=function(a){if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}; +PrintDialog.createPrintPreview=function(a,c,d,b,e,f,k){c=new mxPrintPreview(a,c,d,b,e,f);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var g=c.writeHead;c.writeHead=function(a){g.apply(this,arguments);a.writeln('")};return c}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==q?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",q.src),p.style.fontSize="11px",p.innerHTML=q.src.substring(0,42)+"...")}var b=a.editor.graph,e,f,h=document.createElement("table");h.style.width= -"100%";h.style.height="100%";var g=document.createElement("tbody");e=document.createElement("tr");f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("paperSize")+":");e.appendChild(f);f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";var k=PageSetupDialog.addPageFormatPanel(f,"pagesetupdialog",b.pageFormat);e.appendChild(f);g.appendChild(e);e=document.createElement("tr");f=document.createElement("td"); +var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==q?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",q.src),p.style.fontSize="11px",p.innerHTML=q.src.substring(0,42)+"...")}var b=a.editor.graph,e,f,k=document.createElement("table");k.style.width= +"100%";k.style.height="100%";var g=document.createElement("tbody");e=document.createElement("tr");f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("paperSize")+":");e.appendChild(f);f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";var h=PageSetupDialog.addPageFormatPanel(f,"pagesetupdialog",b.pageFormat);e.appendChild(f);g.appendChild(e);e=document.createElement("tr");f=document.createElement("td"); mxUtils.write(f,mxResources.get("background")+":");e.appendChild(f);f=document.createElement("td");f.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="18px";l.style.height="18px";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";var m=b.background;c();mxEvent.addListener(l,"click",function(b){a.pickColor(m||"none",function(a){m=a;c()});mxEvent.consume(b)}); f.appendChild(l);mxUtils.write(f,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=b.getGridSize();f.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?b.getGridSize():a)});e.appendChild(f);g.appendChild(e);e=document.createElement("tr");f=document.createElement("td");mxUtils.write(f,mxResources.get("image")+ ":");e.appendChild(f);f=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var q=b.backgroundImage;mxEvent.addListener(p,"click",function(b){a.showBackgroundImageDialog(function(a){q=a;d()});mxEvent.consume(b)});d();f.appendChild(p);e.appendChild(f);g.appendChild(e);e=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="16px";f.setAttribute("align","right");var r= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&f.appendChild(r);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==n.value&&b.setGridSize(parseInt(n.value));var c=new ChangePageSetup(a,m,q,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&& -c.ignoreColor&&c.ignoreImage||b.model.execute(c)});t.className="geBtn gePrimaryBtn";f.appendChild(t);a.editor.cancelFirst||f.appendChild(r);e.appendChild(f);g.appendChild(e);h.appendChild(g);this.container=h}; +mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&f.appendChild(r);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==n.value&&b.setGridSize(parseInt(n.value));var c=new ChangePageSetup(a,m,q,h.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&& +c.ignoreColor&&c.ignoreImage||b.model.execute(c)});t.className="geBtn gePrimaryBtn";f.appendChild(t);a.editor.cancelFirst||f.appendChild(r);e.appendChild(f);g.appendChild(e);k.appendChild(g);this.container=k}; PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function e(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=this.view.canvas;null!= -d.ownerSVGElement&&(d=d.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+c,f))+"px";d.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,f=this.view.translate,e=this.pageFormat,g=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=new mxRectangle(d*f.x,d* -f.y,e.width*g,e.height*g),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,u=a?Math.ceil(b/k.width)-1:0,v=h.x+b,A=h.y+c;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,u=a?Math.ceil(b/h.width)-1:0,v=k.x+b,A=k.y+c;null==this.horizontalPageBreaks&&0document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c:b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,a)&& -(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var f=0;fmxUtils.indexOf(this.toolbar.staticElements,a)&& +(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var f=0;fmxUtils.indexOf(u,v[a])&&u.push(v[a]);var C=function(a,c){b.getModel().beginUpdate();try{if(c)for(var d=b.getModel().isEdge(h),f=d?b.currentEdgeStyle:b.currentVertexStyle,d=["fontSize","fontFamily","fontColor"],e=0;emxUtils.indexOf(v,p))&&b.setCellStyles(p,w,[h])}}}finally{b.getModel().endUpdate()}}; +"strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;amxUtils.indexOf(u,v[a])&&u.push(v[a]);var C=function(a,c){b.getModel().beginUpdate();try{if(c)for(var d=b.getModel().isEdge(k),f=d?b.currentEdgeStyle:b.currentVertexStyle,d=["fontSize","fontFamily","fontColor"],e=0;emxUtils.indexOf(v,D))&&b.setCellStyles(D,w,[k])}}}finally{b.getModel().endUpdate()}}; b.addListener("cellsInserted",function(a,b){C(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){C(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));C(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),f=!1,e=!1;if(0screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)}; EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var c=document.createElement("div");c.className=a;return c}; -EditorUi.prototype.addSplitHandler=function(a,c,d,b){function e(a){if(null!=h){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,g+(c?f.x-h.x:h.y-f.y)-d));mxEvent.consume(a);g!=m()&&(k=!0,l=null)}}function f(a){e(a);h=g=null}var h=null,g=null,k=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+d-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){h=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));g=m();k=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!k){var c=null!=l?l-d:0;l=m();b(c);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,e,f);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,e,f)})};EditorUi.prototype.showDialog=function(a,c,d,b,e,f){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,d,b,e,f);this.dialogs.push(this.dialog)}; +EditorUi.prototype.addSplitHandler=function(a,c,d,b){function e(a){if(null!=k){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b(Math.max(0,g+(c?f.x-k.x:k.y-f.y)-d));mxEvent.consume(a);g!=m()&&(h=!0,l=null)}}function f(a){e(a);k=g=null}var k=null,g=null,h=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var b=parseInt(c?a.style.left:a.style.bottom);c||(b=b+d-this.footerHeight);return b});mxEvent.addGestureListeners(a,function(a){k=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));g=m();h=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!h){var c=null!=l?l-d:0;l=m();b(c);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,e,f);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,e,f)})};EditorUi.prototype.showDialog=function(a,c,d,b,e,f){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,d,b,e,f);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(b),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){b.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(b.getModel().endUpdate(),null!=d&&d())}}}; -EditorUi.prototype.showImageDialog=function(a,c,d,b){b=this.editor.graph.cellEditor;var e=b.saveSelection(),f=mxUtils.prompt(a,c);b.restoreSelection(e);if(null!=f&&0this.maxTooltipWidth||b>this.maxTooltipHeight?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==f||f;var g=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c); -mxClient.NO_FO=g;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,g=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltipImage.style.visibility="visible";this.tooltip.style.width=l+"px";this.tooltipTitles&&null!=e&&0Heading

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;",120,60,"","Double Rectangle",null,null,"rect rectangle box double"), this.createVertexTemplateEntry("shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;",120,60,"","Double Rounded Rectangle",null,null,"rounded rect rectangle box double"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;",120,80,"","Double Ellipse",null,null,"oval ellipse start end state double"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;", @@ -2289,77 +2290,77 @@ null,"bpmn send task"),this.createVertexTemplateEntry("shape=message;whiteSpace= 100,0,"","Sequence Flow",null,"bpmn sequence flow"),this.createEdgeTemplateEntry("startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Default Flow",null,"bpmn default flow"),this.createEdgeTemplateEntry("startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6;html=1;",100,0,"","Conditional Flow",null,"bpmn conditional flow"),this.createEdgeTemplateEntry("startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;", 100,0,"","Message Flow 1",null,"bpmn message flow"),this.addEntry("bpmn message flow",function(){var a=new mxCell("",new mxGeometry(0,0,0,0),"startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1;html=1;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(100,0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;b.geometry.offset= new mxPoint(-10,-7);a.insert(b);return d.createEdgeTemplateFromCells([a],100,0,"Message Flow 2")}),this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"bpmn link")];this.addPaletteFunctions("bpmn","BPMN "+mxResources.get("general"),!1,b)};Sidebar.prototype.createTitle=function(a){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");c.setAttribute("title",mxResources.get("sidebarTooltip"));c.className="geTitle";mxUtils.write(c,a);return c}; -Sidebar.prototype.createThumb=function(a,c,d,b,e,f,h,g,k){this.graph.labelsVisible=null==f||f;f=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();g=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(g,Math.floor((c-a.width*g)/2/g-a.x),Math.floor((d-a.height*g)/2/g-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG|| +Sidebar.prototype.createThumb=function(a,c,d,b,e,f,k,g,h){this.graph.labelsVisible=null==f||f;f=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();g=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(g,Math.floor((c-a.width*g)/2/g-a.x),Math.floor((d-a.height*g)/2/g-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG|| mxClient.NO_FO?(g=this.graph.container.cloneNode(!1),g.innerHTML=this.graph.container.innerHTML):g=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=f;mxClient.IS_IE6&&(b.style.backgroundImage="url("+this.editorUi.editor.transparentImage+")");g.style.position="relative";g.style.overflow="hidden";g.style.cursor="move";g.style.left=this.thumbBorder+"px";g.style.top=this.thumbBorder+"px";g.style.width=c+"px";g.style.height=d+"px";g.style.visibility= -"";g.style.minWidth="";g.style.minHeight="";b.appendChild(g);this.sidebarTitles&&null!=e&&0!=h&&(b.style.height=this.thumbHeight+(mxClient.IS_QUIRKS?2*this.thumbPadding+2:0)+this.sidebarTitleSize+8+"px",c=document.createElement("div"),c.style.fontSize=this.sidebarTitleSize+"px",c.style.color="#303030",c.style.textAlign="center",c.style.whiteSpace="nowrap",mxClient.IS_IE&&(c.style.height=this.sidebarTitleSize+12+"px"),c.style.paddingTop="4px",mxUtils.write(c,e),b.appendChild(c));return a}; -Sidebar.prototype.createItem=function(a,c,d,b,e,f,h){var g=document.createElement("a");g.setAttribute("href","javascript:void(0);");g.className="geItem";g.style.overflow="hidden";var k=mxClient.IS_QUIRKS?8+2*this.thumbPadding:2*this.thumbBorder;g.style.width=this.thumbWidth+k+"px";g.style.height=this.thumbHeight+k+"px";g.style.padding=this.thumbPadding+"px";mxClient.IS_IE6&&(g.style.border="none");mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});this.createThumb(a,this.thumbWidth,this.thumbHeight, -g,c,d,b,e,f);var l=new mxRectangle(0,0,e,f);1F&&null!=k&&!mxEvent.isShiftDown(f)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){u=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k): -new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==I&&(a.container.appendChild(y),I=y.parentNode);h(c,d,l,y)}else null==u||!mxUtils.contains(u,c,d)||1500G&&null!=h&&!mxEvent.isShiftDown(f)&&(mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(D,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(h.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(D,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&(a.model.isVertex(h.cell)&&null!=m||a.model.isEdge(h.cell)&&a.model.isEdge(b[0]))){u=h;var l=a.model.isEdge(h.cell)?a.view.getPoint(h): +new mxPoint(h.getCenterX(),h.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==I&&(a.container.appendChild(y),I=y.parentNode);k(c,d,l,y)}else null==u||!mxUtils.contains(u,c,d)||1500F&&F>this.dropTargetDelay||a.model.isEdge(e)?k:null,null!=t&&l){g=[L,J,A,x,B,C];for(l=0;lG&&G>this.dropTargetDelay||a.model.isEdge(e)?h:null,null!=t&&l){g=[L,J,A,x,B,C];for(l=0;lmxUtils.indexOf(e,c)){d=this.getTagsForStencil(a,c);var m=null!=g?g[c]:null;null!=m&&d.push(m);l.push(this.createVertexTemplateEntry("shape="+a+c.toLowerCase()+b,Math.round(f*h),Math.round(k*h),"",c.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}), -!0,!0);this.addPaletteFunctions(a,c,!1,l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==b&&(b="");null!=f&&f.call(this,a);if(null!=k)for(var c=0;cmxUtils.indexOf(e,d))&&a.appendChild(this.createVertexTemplate("shape="+c+d.toLowerCase()+b,Math.round(g*h),Math.round(k*h),"",d.replace(/_/g," "),!0))}),!0)}))}; +Sidebar.prototype.addStencilPalette=function(a,c,d,b,e,f,k,g,h){k=null!=k?k:1;if(this.addStencilsToIndex){var l=[];if(null!=h)for(var m=0;mmxUtils.indexOf(e,c)){d=this.getTagsForStencil(a,c);var m=null!=g?g[c]:null;null!=m&&d.push(m);l.push(this.createVertexTemplateEntry("shape="+a+c.toLowerCase()+b,Math.round(f*k),Math.round(h*k),"",c.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}), +!0,!0);this.addPaletteFunctions(a,c,!1,l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==b&&(b="");null!=f&&f.call(this,a);if(null!=h)for(var c=0;cmxUtils.indexOf(e,d))&&a.appendChild(this.createVertexTemplate("shape="+c+d.toLowerCase()+b,Math.round(g*k),Math.round(h*k),"",d.replace(/_/g," "),!0))}),!0)}))}; Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler), this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1; (function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(c){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1; mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]"; Graph=function(a,c,d,b,e){mxGraph.call(this,a,c,d,b);this.themes=e||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0d||Math.abs(f.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var e=this.selectionCellsHandler.getHandler(c.cell);if(null!=e&&null!=e.bends&&0d||Math.abs(f.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var e=this.selectionCellsHandler.getHandler(c.cell);if(null!=e&&null!=e.bends&&0=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var B=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)? +var x=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return x.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&f.push(D);this.getAllCells(a,b,c,d,D,f)}}}return f};var B=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)? !1:B.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();C=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=C?this.addSelectionCells(C):1p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0b&&"%"==c.charAt(match.index-1))f=e.substring(1);else{var h=e.substring(1,e.length-1);if(0>h.indexOf("{"))for(var g=a;null==f&&null!=g;)null!=g.value&&"object"==typeof g.value&&(f=g.hasAttribute(h)?null!=g.getAttribute(h)?g.getAttribute(h):"":null),g=this.model.getParent(g);null==f&&(f=this.getGlobalVariable(h))}d.push(c.substring(b, +Graph.prototype.replacePlaceholders=function(a,c){for(var d=[],b=0;match=this.placeholderPattern.exec(c);){var e=match[0];if(2b&&"%"==c.charAt(match.index-1))f=e.substring(1);else{var k=e.substring(1,e.length-1);if(0>k.indexOf("{"))for(var g=a;null==f&&null!=g;)null!=g.value&&"object"==typeof g.value&&(f=g.hasAttribute(k)?null!=g.getAttribute(k)?g.getAttribute(k):"":null),g=this.model.getParent(g);null==f&&(f=this.getGlobalVariable(k))}d.push(c.substring(b, match.index)+(null!=f?f:e));b=match.index+e.length}}d.push(c.substring(b));return d.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,c,d){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=d&&(mxEvent.isTouchEvent(c)?d.update(d.getState(this.view.getState(a[1]))):d.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; -Graph.prototype.connectVertex=function(a,c,d,b,e,f){f=f?f:!1;var h=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(h.x+=a.geometry.width/2,h.y-=d):c==mxConstants.DIRECTION_SOUTH?(h.x+=a.geometry.width/2,h.y+=a.geometry.height+d):(h.x=c==mxConstants.DIRECTION_WEST?h.x-d:h.x+(a.geometry.width+d),h.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a)); -var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(d.cell)&&(l=d.x,k=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(h.x+=a.parent.geometry.x,h.y+=a.parent.geometry.y);f=f||mxEvent.isControlDown(b)&&!e?null:this.getCellAt(l+h.x*g,k+h.y*g);this.model.isAncestor(f,a)&&(f=null);for(d=f;null!=d;){if(this.isCellLocked(d)){f=null;break}d=this.model.getParent(d)}null!=f&&(d=this.view.getState(a),g=this.view.getState(f),null!=d&&null!=g&&mxUtils.intersects(d,g)&&(f= -null));if(e=!mxEvent.isShiftDown(b)||e)c==mxConstants.DIRECTION_NORTH?h.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?h.y+=a.geometry.height/2:h.x=c==mxConstants.DIRECTION_WEST?h.x-a.geometry.width/2:h.x+a.geometry.width/2;null==f||this.isCellConnectable(f)||(d=this.getModel().getParent(f),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(f=d));if(f==a||this.model.isEdge(f)||!this.isCellConnectable(f))f=null;d=[];this.model.beginUpdate();try{g=f;if(null==g&&e){for(var l=a,m=this.getCellGeometry(a);null!= -m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var n=this.view.getState(l),p=null!=n?n.style:this.getCellStyle(l);if(mxUtils.getValue(p,"part",!1)){var q=this.model.getParent(l);this.model.isVertex(q)&&(l=q)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=h.x-m.width/2,m.y=h.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(b)&&e||null==f&&null!=m&&m.constructor==mxStackLayout? +Graph.prototype.connectVertex=function(a,c,d,b,e,f){f=f?f:!1;var k=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(k.x+=a.geometry.width/2,k.y-=d):c==mxConstants.DIRECTION_SOUTH?(k.x+=a.geometry.width/2,k.y+=a.geometry.height+d):(k.x=c==mxConstants.DIRECTION_WEST?k.x-d:k.x+(a.geometry.width+d),k.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a)); +var g=this.view.scale,h=this.view.translate,l=h.x*g,h=h.y*g;this.model.isVertex(d.cell)&&(l=d.x,h=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(k.x+=a.parent.geometry.x,k.y+=a.parent.geometry.y);f=f||mxEvent.isControlDown(b)&&!e?null:this.getCellAt(l+k.x*g,h+k.y*g);this.model.isAncestor(f,a)&&(f=null);for(d=f;null!=d;){if(this.isCellLocked(d)){f=null;break}d=this.model.getParent(d)}null!=f&&(d=this.view.getState(a),g=this.view.getState(f),null!=d&&null!=g&&mxUtils.intersects(d,g)&&(f= +null));if(e=!mxEvent.isShiftDown(b)||e)c==mxConstants.DIRECTION_NORTH?k.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?k.y+=a.geometry.height/2:k.x=c==mxConstants.DIRECTION_WEST?k.x-a.geometry.width/2:k.x+a.geometry.width/2;null==f||this.isCellConnectable(f)||(d=this.getModel().getParent(f),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(f=d));if(f==a||this.model.isEdge(f)||!this.isCellConnectable(f))f=null;d=[];this.model.beginUpdate();try{g=f;if(null==g&&e){for(var l=a,m=this.getCellGeometry(a);null!= +m&&m.relative;)l=this.getModel().getParent(l),m=this.getCellGeometry(l);var n=this.view.getState(l),p=null!=n?n.style:this.getCellStyle(l);if(mxUtils.getValue(p,"part",!1)){var q=this.model.getParent(l);this.model.isVertex(q)&&(l=q)}g=this.duplicateCells([l],!1)[0];m=this.getCellGeometry(g);null!=m&&(m.x=k.x-m.width/2,m.y=k.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(b)&&e||null==f&&null!=m&&m.constructor==mxStackLayout? null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var t=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=r.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==r.parent&&(t=b.parent.getIndex(b),b.parent.insert(r,t))}null==f&&null!=g&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(t=a.parent.getIndex(a),a.parent.insert(g,t)); -null!=r&&d.push(r);null==f&&null!=g&&d.push(g);null==g&&null!=r&&r.geometry.setTerminalPoint(h,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return d}; +null!=r&&d.push(r);null==f&&null!=g&&d.push(g);null==g&&null!=r&&r.geometry.setTerminalPoint(k,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return d}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],d,b;for(b in this.model.cells)if(d=this.model.cells[b],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.getLabel(d),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0b.name?1:0});for(e=0;e'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Editor.createSvgImage(14,26,''):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26); +HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Editor.createSvgImage(26,14,''):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Editor.createSvgImage(14,26,''):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26); +HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Editor.createSvgImage(26,26,''):new mxImage(IMAGE_PATH+"/round-drop.png",26,26); HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHht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xR+Doyz0ZE1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":IMAGE_PATH+ "/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0; HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE, @@ -2467,16 +2461,16 @@ null;if(this.outline||null==this.state||null==this.style||null==this.state.route B=new mxPoint(x.x/this.scale,x.y/this.scale);0==A?B=b[0]:A==this.state.routedPoints.length-1&&(B=b[b.length-1]);var C=!1;if(null!=l&&1==x.type){var y=this.state.routedPoints[A+1],x=y.x/this.scale-B.x,y=y.y/this.scale-B.y,x=x*x+y*y;null==v&&(v=new mxPoint(B.x-l.x,B.y-l.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*f/m,v.y=v.y*f/m);x>f*f&&0f*f&&(C=new mxPoint(B.x-v.x,B.y-v.y),x=new mxPoint(B.x+v.x,B.y+v.y),h.push(C),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(v.x)|| 0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(C.x-v.y*h,C.y+v.x*h),a.lineTo(x.x-v.y*h,x.y+v.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(C.x-v.y*h,C.y+v.x*h,x.x-v.y*h,x.y+v.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],C=!0))}else v=null;C||(h.push(B),l=B)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var f=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&& "1"!=a.style.snapToPoint)f.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),g=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),e=mxUtils.getRotatedPoint(e,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| -0);e=this.getPerimeterPoint(b,e,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),e=mxUtils.getRotatedPoint(e,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;for(var f=0;f=f.getStatus()&&eval.call(window,f.getText())}catch(h){null!=window.console&&console.log("error in getStencil:",e,h)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);c=mxStencilRegistry.stencils[a]}}return c}; +3,e.length))try{var f=mxUtils.load(e);null!=f&&200<=f.getStatus()&&299>=f.getStatus()&&eval.call(window,f.getText())}catch(k){null!=window.console&&console.log("error in getStencil:",e,k)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);c=mxStencilRegistry.stencils[a]}}return c}; mxStencilRegistry.getBasenameForStencil=function(a){var c=null;if(null!=a&&(a=a.split("."),0=b.getStatus()&&(e=b.getXml(),mxStencilRegistry.packages[a]=e,f=!0,null!=e&&null!=e.documentElement&&mxStencilRegistry.parseStencilSet(e.documentElement,c,f))}));return}h=mxUtils.load(a);e=h.getXml();mxStencilRegistry.packages[a]=e;f=!0}catch(g){null!=window.console&&console.log("error in loadStencilSet:", +mxStencilRegistry.loadStencilSet=function(a,c,d,b){var e=mxStencilRegistry.packages[a];if(null!=d&&d||null==e){var f=!1;if(null==e)try{if(b){var k=mxUtils.get(a,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(e=b.getXml(),mxStencilRegistry.packages[a]=e,f=!0,null!=e&&null!=e.documentElement&&mxStencilRegistry.parseStencilSet(e.documentElement,c,f))}));return}k=mxUtils.load(a);e=k.getXml();mxStencilRegistry.packages[a]=e;f=!0}catch(g){null!=window.console&&console.log("error in loadStencilSet:", a,g)}null!=e&&null!=e.documentElement&&mxStencilRegistry.parseStencilSet(e.documentElement,c,f)}};mxStencilRegistry.parseStencilSets=function(a){for(var c=0;cb&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b; @@ -2524,8 +2518,8 @@ a);null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);60"):h,!0);this.tex mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle= g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=""; -this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var k=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a, +this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var h=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a, b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE))); this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= +h.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"
"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"
").replace(/\n/g,"
"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer= -function(){try{this.graph.container.focus()}catch(E){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell], +function(){try{this.graph.container.focus()}catch(F){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell], !1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var n=mxGraphHandler.prototype.moveCells; mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width- this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()|| -(this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", -null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& -(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,arguments)};var t=(new Date).getTime(),w=0,u=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){u.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(), -w=0):w=(new Date).getTime()-t;this.currentTerminalState=c};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect= -!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox= -function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var B=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell), -d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):B.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell); -(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Editor.createSvgImage(16,16,''):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Editor.createSvgImage(18,18,''): +new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Editor.createSvgImage(18,18,''):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZC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EXnQ3d39kCTHxsYIgC6Xi3NzcwyHw8xkMozFYlxaWmJbWxuVUuzt7WUul6PX6/1cRN4WEe2uA0SkaWVl5XGpRVhdXU0A1DSNlZWVdz3qdDrZ09PDWCzG4+Pjn0XEWvp9KJKw2WwKwBsA3gHQHAqFfr24uMDGxgZ2d3cRiUQAAHa7HU6nE319fTg5Ofmlq6vrGwB/AngaCoWK6rbsNptNA1AJoA7Aux6Pp3NoaMhjsVg+QNmIRqO/u1yubwFEASRKUAEA7rASqABUAKgC8KAUb5XWCOAfAFcA/gJwDSB7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=": +IMAGE_PATH+"/handle-rotate.png",19,21);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Editor.createSvgImage(5,5,''));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage= +HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget, +Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src, +(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxVertexHandler.prototype.rotationHandleVSpacing= +-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())}; +if(Graph.touchStyle){if(mxClient.IS_TOUCH||0g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c), +this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height= +Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this, +arguments)};var t=(new Date).getTime(),w=0,u=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){u.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),w=0):w=(new Date).getTime()-t;this.currentTerminalState=c};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c), +e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE? +HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this, +arguments)};var B=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):B.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown; +mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells|| +this.graph.getSelectionCount()a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var ga=c(a-this.lastX)*d/g,c=c(b- -this.lastY)*e/g,d=d/f,e=e/f,f=0;fa?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var ha=c(a-this.lastX)*d/g,c=c(b- +this.lastY)*e/g,d=d/f,e=e/f,f=0;ff+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)); a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=N;mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke(); a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=P;mxUtils.extend(O,mxCylinder);O.prototype.jettyWidth=32;O.prototype.jettyHeight=12;O.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c, -h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=O;mxUtils.extend(F,mxDoubleEllipse);F.prototype.outerStroke=!0;F.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5)); -0")}),b)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 1

";d("","h2").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 2

";d("","h3").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 3

";d("","h4").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+ " 4

";d("","h5").firstChild.nextSibling.innerHTML='
'+mxResources.get("heading")+" 5
";d("","h6").firstChild.nextSibling.innerHTML='
'+mxResources.get("heading")+" 6
";d("","pre").firstChild.nextSibling.innerHTML='
'+mxResources.get("formatted")+"
";d("","blockquote").firstChild.nextSibling.innerHTML='
'+mxResources.get("blockquote")+"
"})));this.put("fontSize", -new Menu(mxUtils.bind(this,function(c,b){for(var d=[6,8,9,10,11,12,14,18,24,36,48,72],f=mxUtils.bind(this,function(d){this.styleChange(c,d,[mxConstants.STYLE_FONTSIZE],[d],null,b,function(){document.execCommand("fontSize",!1,"3");for(var b=a.cellEditor.textarea.getElementsByTagName("font"),c=0;c"],d=0;d");for(var e=0;e
");c.push("")}c.push("");return c.join("")}var d=this.editorUi.editor.graph;a=a.addItem("",null,mxUtils.bind(this,function(a){var b=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=b){var e=d.getParentByName(b,"TR"),f=d.cellEditor.textarea.getElementsByTagName("table");a=[];for(var h=0;h';a.firstChild.innerHTML="";var e=function(a,c){var d=document.createElement("table");d.setAttribute("border","1");d.style.borderCollapse="collapse";mxClient.IS_QUIRKS||d.setAttribute("cellPadding", -"8");for(var e=0;e"],d=0;d");for(var e=0;e
");c.push("")}c.push("");return c.join("")}var d=this.editorUi.editor.graph;a=a.addItem("",null,mxUtils.bind(this,function(a){var b=d.getParentByName(mxEvent.getSource(a),"TD");if(null!=b){var e=d.getParentByName(b,"TR"),f=d.cellEditor.textarea.getElementsByTagName("table");a=[];for(var k=0;k';a.firstChild.innerHTML="";var e=function(a,c){var d=document.createElement("table");d.setAttribute("border","1");d.style.borderCollapse="collapse";mxClient.IS_QUIRKS||d.setAttribute("cellPadding", +"8");for(var e=0;e';if(mxClient.IS_QUIRKS||8==document.documentMode)p.firstChild.style.margin="0px";null!=a&&a!=mxConstants.NONE?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1);p.style.display=k.checked||h?"":"none";null!=f&&f(a);e||!h&&n==a||(n=a,(h|| -c()!=n)&&d(n));m=!1}},p=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(n,q);mxEvent.consume(a)}));p.style.position="absolute";p.style.marginTop="-4px";p.style.right=mxClient.IS_QUIRKS?"0px":"20px";p.style.height="22px";p.className="geColorBtn";p.style.display=k.checked||h?"":"none";g.appendChild(p);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==k||"INPUT"!=a.nodeName)a!=k&&(k.checked=!k.checked),k.checked||null==n||n==mxConstants.NONE||b==mxConstants.NONE|| -(b=n),q(k.checked?b:mxConstants.NONE)});q(n,!0);null!=e&&(e.install(q),this.listeners.push(e));return g}; -BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,e){var f=this.editorUi,h=f.editor.graph;return this.createColorOption(a,function(){var a=h.view.getState(h.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){h.getModel().beginUpdate();try{null!=e&&e(a),h.setCellStyles(c,a,h.getSelectionCells()),f.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",h.getSelectionCells()))}finally{h.getModel().endUpdate()}},d||mxConstants.NONE, -{install:function(a){this.listener=function(){var b=h.view.getState(h.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,null))};h.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){h.getModel().removeListener(this.listener)}},b)}; +BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,e,f,k){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.style.margin="0px 6px 0px 0px";k||g.appendChild(h);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=!1,n=c(),p=null,q=function(a,e){if(!m){m= +!0;p.innerHTML='
';if(mxClient.IS_QUIRKS||8==document.documentMode)p.firstChild.style.margin="0px";null!=a&&a!=mxConstants.NONE?(h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0):(h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1);p.style.display=h.checked||k?"":"none";null!=f&&f(a);e||!k&&n==a||(n=a,(k|| +c()!=n)&&d(n));m=!1}},p=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(n,q);mxEvent.consume(a)}));p.style.position="absolute";p.style.marginTop="-4px";p.style.right=mxClient.IS_QUIRKS?"0px":"20px";p.style.height="22px";p.className="geColorBtn";p.style.display=h.checked||k?"":"none";g.appendChild(p);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==h||"INPUT"!=a.nodeName)a!=h&&(h.checked=!h.checked),h.checked||null==n||n==mxConstants.NONE||b==mxConstants.NONE|| +(b=n),q(h.checked?b:mxConstants.NONE)});q(n,!0);null!=e&&(e.install(q),this.listeners.push(e));return g}; +BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,e){var f=this.editorUi,k=f.editor.graph;return this.createColorOption(a,function(){var a=k.view.getState(k.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){k.getModel().beginUpdate();try{null!=e&&e(a),k.setCellStyles(c,a,k.getSelectionCells()),f.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}},d||mxConstants.NONE, +{install:function(a){this.listener=function(){var b=k.view.getState(k.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,null))};k.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){k.getModel().removeListener(this.listener)}},b)}; BaseFormatPanel.prototype.addArrow=function(a,c){c=null!=c?c:10;var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.padding="6px";d.style.paddingRight="4px";var b=10-c;2==b?d.style.paddingTop="6px":0';mxUtils.setOpacity(d,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor="white";a.style.backgroundImage="none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius", -"3px");a.appendChild(d);return b};BaseFormatPanel.prototype.addUnitInput=function(a,c,d,b,e,f,h,g){h=null!=h?h:0;c=document.createElement("input");c.style.position="absolute";c.style.textAlign="right";c.style.marginTop="-2px";c.style.right=d+12+"px";c.style.width=b+"px";a.appendChild(c);b=this.createStepper(c,e,f,null,g);b.style.marginTop=h-2+"px";b.style.right=d+"px";a.appendChild(b);return c}; -BaseFormatPanel.prototype.createRelativeOption=function(a,c,d,b,e){function f(a){if(null!=b)b(k);else{var d=parseInt(k.value),d=Math.min(100,Math.max(0,isNaN(d)?100:d)),e=h.view.getState(h.getSelectionCell());null!=e&&d!=mxUtils.getValue(e.style,c,100)&&(100==d&&(d=null),h.setCellStyles(c,d,h.getSelectionCells()));k.value=(null!=d?d:"100")+" %"}mxEvent.consume(a)}d=null!=d?d:44;var h=this.editorUi.editor.graph,g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";mxUtils.write(g, -a);g.style.fontWeight="bold";var k=this.addUnitInput(g,"%",20,d,f,10,-15,null!=b);if(null!=c){var l=mxUtils.bind(this,function(a,b,d){if(d||k!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,c,100)),k.value=isNaN(a)?"":a+" %"});mxEvent.addListener(k,"keydown",function(a){13==a.keyCode?(h.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(l(null,null,!0),h.container.focus(),mxEvent.consume(a))});h.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){h.getModel().removeListener(l)}}); -l()}mxEvent.addListener(k,"blur",f);mxEvent.addListener(k,"change",f);null!=e&&e(k);return g};BaseFormatPanel.prototype.addLabel=function(a,c,d,b){b=null!=b?b:61;var e=document.createElement("div");mxUtils.write(e,c);e.style.position="absolute";e.style.right=d+"px";e.style.width=b+"px";e.style.marginTop="6px";e.style.textAlign="center";a.appendChild(e)}; +"3px");a.appendChild(d);return b};BaseFormatPanel.prototype.addUnitInput=function(a,c,d,b,e,f,k,g){k=null!=k?k:0;c=document.createElement("input");c.style.position="absolute";c.style.textAlign="right";c.style.marginTop="-2px";c.style.right=d+12+"px";c.style.width=b+"px";a.appendChild(c);b=this.createStepper(c,e,f,null,g);b.style.marginTop=k-2+"px";b.style.right=d+"px";a.appendChild(b);return c}; +BaseFormatPanel.prototype.createRelativeOption=function(a,c,d,b,e){function f(a){if(null!=b)b(h);else{var d=parseInt(h.value),d=Math.min(100,Math.max(0,isNaN(d)?100:d)),e=k.view.getState(k.getSelectionCell());null!=e&&d!=mxUtils.getValue(e.style,c,100)&&(100==d&&(d=null),k.setCellStyles(c,d,k.getSelectionCells()));h.value=(null!=d?d:"100")+" %"}mxEvent.consume(a)}d=null!=d?d:44;var k=this.editorUi.editor.graph,g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";mxUtils.write(g, +a);g.style.fontWeight="bold";var h=this.addUnitInput(g,"%",20,d,f,10,-15,null!=b);if(null!=c){var l=mxUtils.bind(this,function(a,b,d){if(d||h!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,c,100)),h.value=isNaN(a)?"":a+" %"});mxEvent.addListener(h,"keydown",function(a){13==a.keyCode?(k.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(l(null,null,!0),k.container.focus(),mxEvent.consume(a))});k.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){k.getModel().removeListener(l)}}); +l()}mxEvent.addListener(h,"blur",f);mxEvent.addListener(h,"change",f);null!=e&&e(h);return g};BaseFormatPanel.prototype.addLabel=function(a,c,d,b){b=null!=b?b:61;var e=document.createElement("div");mxUtils.write(e,c);e.style.position="absolute";e.style.right=d+"px";e.style.width=b+"px";e.style.marginTop="6px";e.style.textAlign="center";a.appendChild(e)}; BaseFormatPanel.prototype.addKeyHandler=function(a,c){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(a){13==a.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(null!=c&&c(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(a))}))}; BaseFormatPanel.prototype.styleButtons=function(a){for(var c=0;cdocument.documentMode)?a.style.filter=b?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#c5ecff', EndColorStr='#87d4fb', GradientType=0)":"":a.style.backgroundImage=b?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var d=this.editorUi,b=d.editor.graph,e=this.format.getSelectionState(),f=this.createTitle(mxResources.get("font"));f.style.paddingLeft="18px";f.style.paddingTop="10px";f.style.paddingBottom= -"6px";a.appendChild(f);f=this.createPanel();f.style.paddingTop="2px";f.style.paddingBottom="2px";f.style.position="relative";f.style.marginLeft="-2px";f.style.borderWidth="0px";f.className="geToolbarContainer";mxClient.IS_QUIRKS&&(f.style.display="block");if(b.cellEditor.isContentEditing()){var h=f.cloneNode(),g=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",h);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow="hidden"; -g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px";g=g.getElementsByTagName("div")[0];g.style.cssFloat="right";a.appendChild(h)}a.appendChild(f);h=this.createPanel();h.style.marginTop="8px";h.style.borderTop="1px solid #c0c0c0";h.style.paddingTop="6px";h.style.paddingBottom="6px";var k=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",f);k.style.color="rgb(112, 112, 112)";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.margin= -"0px";this.addArrow(k);k.style.width="192px";k.style.height="15px";mxClient.IS_FF&&(k.getElementsByTagName("div")[0].style.marginTop="-18px");g=f.cloneNode(!1);g.style.marginLeft="-3px";var l=this.editorUi.toolbar.addItems(["bold","italic","underline"],g,!0);l[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");l[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");l[2].setAttribute("title",mxResources.get("underline")+ -" ("+this.editorUi.actions.get("underline").shortcut+")");var m=this.editorUi.toolbar.addItems(["vertical"],g,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);this.styleButtons(l);this.styleButtons([m]);var n=f.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], -[mxConstants.ALIGN_LEFT]),n),q=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),n),r=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], -[mxConstants.ALIGN_RIGHT]),n);this.styleButtons([p,q,r]);if(b.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},g);this.styleButtons([t])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),n),u=this.editorUi.toolbar.addButton("geSprite-middle", -mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),n),v=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),n);this.styleButtons([w,u,v]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var A,x,B,C,y,I,L;b.cellEditor.isContentEditing()?(w.style.display="none",u.style.display="none", -v.style.display="none",m.style.display="none",B=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},n),this.styleButtons([B,A=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),x=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript", -!1,null)},n)]),B.style.marginRight="9px",t=n.cloneNode(!1),t.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent", -!1,null)},t),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},t)],this.styleButtons(n),n[n.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),t.style.height="40"),a.appendChild(t)):(l[2].style.marginRight="9px",r.style.marginRight="9px");n=f.cloneNode(!1);n.style.marginLeft="0px"; -n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var J=document.createElement("select");J.style.position="absolute";J.style.right="20px";J.style.width="97px";J.style.marginTop="-2px";for(var G="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),D={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP, -mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT, -mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},t=0;t"+b.cellEditor.textarea.innerHTML+"

"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){na=a;mxEvent.addListener(a,"mousedown",function(){Z=b.cellEditor.saveSelection()});mxEvent.addListener(a,"touchstart", -function(){Z=b.cellEditor.saveSelection()});a.value="120 %"}));h=f.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))]; -this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=f.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex:0))}catch(R){alert(R)}},g), -this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex+1:-1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=y&&null!=I&&b.deleteColumn(y,I.cellIndex)}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=y&&null!=L&& -b.selectNode(b.insertRow(y,L.sectionRowIndex))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=y&&null!=L&&b.selectNode(b.insertRow(y,L.sectionRowIndex+1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=y&&null!=L&&b.deleteRow(y,L.sectionRowIndex)}catch(R){alert(R)}},g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel(); -h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");f=f.cloneNode(!1);f.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=y){var a=y.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(a,function(a){null==a||a==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+a,y.style.borderCollapse="collapse")})}}),f),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=y){var a=y.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(a,function(a){y.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),f),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=y){var a=y.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0"+b.cellEditor.textarea.innerHTML+"

"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){oa= +a;mxEvent.addListener(a,"mousedown",function(){aa=b.cellEditor.saveSelection()});mxEvent.addListener(a,"touchstart",function(){aa=b.cellEditor.saveSelection()});a.value="120 %"}));k=f.cloneNode(!1);k.style.paddingLeft="0px";h=this.editorUi.toolbar.addItems(["link","image"],k,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-table", +mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(h);this.styleButtons(g);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("insert")));h.appendChild(k);a.appendChild(h);mxClient.IS_QUIRKS&&(h.style.height="70");h=f.cloneNode(!1);h.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"), +function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex:0))}catch(Q){alert(Q)}},h),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex+1:-1))}catch(Q){alert(Q)}},h),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=y&&null!=I&&b.deleteColumn(y,I.cellIndex)}catch(Q){alert(Q)}},h),this.editorUi.toolbar.addButton("geSprite-insertrowbefore", +mxResources.get("insertRowBefore"),function(){try{null!=y&&null!=L&&b.selectNode(b.insertRow(y,L.sectionRowIndex))}catch(Q){alert(Q)}},h),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=y&&null!=L&&b.selectNode(b.insertRow(y,L.sectionRowIndex+1))}catch(Q){alert(Q)}},h),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=y&&null!=L&&b.deleteRow(y,L.sectionRowIndex)}catch(Q){alert(Q)}}, +h)];this.styleButtons(g);g[2].style.marginRight="9px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(h);mxClient.IS_QUIRKS&&(mxUtils.br(a),k.style.height="70");f=f.cloneNode(!1);f.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=y){var a=y.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(a,function(a){null==a||a==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+a,y.style.borderCollapse="collapse")})}}),f),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!= +y){var a=y.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(a,function(a){y.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),f),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=y){var a=y.getAttribute("cellPadding")||0,a=new FilenameDialog(d, +a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0'+mxUtils.htmlEntities(mxResources.get("none"))+"";"connector"==f.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW, "startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",null,!1).setAttribute("title",mxResources.get("openArrow")), this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",null,!1).setAttribute("title",mxResources.get("block")), @@ -2984,7 +2976,7 @@ mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants. "",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],"geIcon geSprite geSprite-startdash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle", null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW, "startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans", -null,!1).setAttribute("title",mxResources.get("block"))}})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML=''+mxUtils.htmlEntities(mxResources.get("none"))+ +null,!1).setAttribute("title",mxResources.get("block"))}})),C=this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML=''+mxUtils.htmlEntities(mxResources.get("none"))+ "";"connector"==f.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-endclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN, 0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK, 1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-endblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],"geIcon geSprite geSprite-endasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1], @@ -2996,25 +2988,25 @@ null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeS null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"], ["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans", null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(B);this.addArrow(C);v=this.addArrow(l,9);v.className="geIcon";v.style.width="84px";A=this.addArrow(m,9);A.className="geIcon";A.style.width="22px";var y=document.createElement("div");y.style.width="85px";y.style.height="1px";y.style.borderBottom="1px solid black";y.style.marginBottom="9px";v.appendChild(y);var I=document.createElement("div");I.style.width="23px";I.style.height="1px";I.style.borderBottom= -"1px solid black";I.style.marginBottom="9px";A.appendChild(I);l.style.height="15px";m.style.height="15px";t.style.height="15px";x.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";a.appendChild(h);a.appendChild(r);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px"; -m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var L,J,G=this.addUnitInput(l,"pt",74,33,function(){L.apply(this,arguments)}),D=this.addUnitInput(l,"pt",20,33,function(){J.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var K,N,P=this.addUnitInput(l,"pt",74,33,function(){K.apply(this, -arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom= -"12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var F,E=this.addUnitInput(h,"pt",20,41,function(){F.apply(this,arguments)});f.edges.length==e.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):f.vertices.length==e.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,e){d= +"1px solid black";I.style.marginBottom="9px";A.appendChild(I);l.style.height="15px";m.style.height="15px";t.style.height="15px";x.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";a.appendChild(k);a.appendChild(r);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px"; +m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var L,J,H=this.addUnitInput(l,"pt",74,33,function(){L.apply(this,arguments)}),E=this.addUnitInput(l,"pt",20,33,function(){J.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var K,N,P=this.addUnitInput(l,"pt",74,33,function(){K.apply(this, +arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom="2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom= +"12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));k.appendChild(m);var G,F=this.addUnitInput(k,"pt",20,41,function(){G.apply(this,arguments)});f.edges.length==e.getSelectionCount()?(a.appendChild(h),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):f.vertices.length==e.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(k));var D=mxUtils.bind(this,function(a,c,d){function h(a,c,d,e){d= d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(e,f.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.nextSibling.style.marginTop="0px");return d}f=this.format.getSelectionState();mxUtils.getValue(f.style,n,null);if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH, 1)),w.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=u)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==f.style.shape||"filledEdge"==f.style.shape?"":"hidden";"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(f.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(f.style, mxConstants.STYLE_DASH_PATTERN,null)?y.style.borderBottom="1px dashed black":y.style.borderBottom="1px dotted black":y.style.borderBottom="1px solid black";I.style.borderBottom=y.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(f.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className= "straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";t.getElementsByTagName("div")[0].className= "link"==f.style.shape?"geSprite geSprite-linkedge":"flexArrow"==f.style.shape?"geSprite geSprite-arrow":"arrow"==f.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";f.edges.length==e.getSelectionCount()?(r.style.display="",p.style.display="none"):(r.style.display="none",p.style.display="");a=h(mxUtils.getValue(f.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(f.style,"startFill","1"),B,"start");c=h(mxUtils.getValue(f.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(f.style, "endFill","1"),C,"end");"arrow"==f.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==f.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==f.style.shape?30:100);"connector"!=f.style.shape&&"flexArrow"!=f.style.shape?(mxUtils.setOpacity(B,30),mxUtils.setOpacity(C,30)):(mxUtils.setOpacity(B,100),mxUtils.setOpacity(C,100));if(d||document.activeElement!=O)a=parseInt(mxUtils.getValue(f.style, -mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=D)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),D.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)), -G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=E)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),E.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(P,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");J=this.installInputHandler(D,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(G,mxConstants.STYLE_TARGET_PERIMETER_SPACING, -0,-999,999," pt");F=this.installInputHandler(E,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(w,H);this.addKeyHandler(O,H);this.addKeyHandler(P,H);this.addKeyHandler(D,H);this.addKeyHandler(G,H);this.addKeyHandler(E,H);e.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){e.getModel().removeListener(H)}});H();return a}; +mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=E)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),E.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)), +H.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=F)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),F.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(P,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");J=this.installInputHandler(E,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING, +0,-999,999," pt");G=this.installInputHandler(F,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(w,D);this.addKeyHandler(O,D);this.addKeyHandler(P,D);this.addKeyHandler(E,D);this.addKeyHandler(H,D);this.addKeyHandler(F,D);e.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){e.getModel().removeListener(D)}});D();return a}; StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0'+this.dropdownImageHtml;a.style.width=mxClient.IS_QUIRKS?b+"px":b-(null!=h?h:32)+"px";mxClient.IS_QUIRKS&&(a.style.height=EditorUi.compactUi?"24px":"26px");EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top= +Toolbar.prototype.addDropDownArrow=function(a,c,d,b,e,f,k,g){e=EditorUi.compactUi?e:g;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.innerHTML='
'+this.dropdownImageHtml;a.style.width=mxClient.IS_QUIRKS?b+"px":b-(null!=k?k:32)+"px";mxClient.IS_QUIRKS&&(a.style.height=EditorUi.compactUi?"24px":"26px");EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top= "5px",a.style.width=mxClient.IS_QUIRKS?d+"px":d-10+"px")};Toolbar.prototype.setFontName=function(a){null!=this.fontMenu&&(this.fontMenu.innerHTML='
'+mxUtils.htmlEntities(a)+"
"+this.dropdownImageHtml)};Toolbar.prototype.setFontSize=function(a){null!=this.sizeMenu&&(this.sizeMenu.innerHTML='
'+a+"
"+this.dropdownImageHtml)}; Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi.editor.graph,c=this.addMenu("",mxResources.get("style"),!0,"formatBlock");c.style.position="relative";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.innerHTML=mxResources.get("style")+this.dropdownImageHtml;EditorUi.compactUi&&(c.style.paddingRight="18px",c.getElementsByTagName("img")[0].style.right="1px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"), !0,"fontFamily");this.fontMenu.style.position="relative";this.fontMenu.style.whiteSpace="nowrap";this.fontMenu.style.overflow="hidden";this.fontMenu.style.width=mxClient.IS_QUIRKS?"80px":"60px";this.setFontName(Menus.prototype.defaultFont);EditorUi.compactUi&&(this.fontMenu.style.paddingRight="18px",this.fontMenu.getElementsByTagName("img")[0].style.right="1px",this.fontMenu.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.sizeMenu=this.addMenu(Menus.prototype.defaultFontSize, @@ -3061,96 +3053,96 @@ mxResources.get("fontColor"));d=a.addItem("",null,this.editorUi.actions.get("bac '
'+this.dropdownImageHtml;c.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(c.getElementsByTagName("img")[0].style.left="22px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){a.cellEditor.toggleViewMode();0f.div.clientHeight&&(f.div.style.width="40px"); -f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);this.editorUi.resetCurrentMenu();f.destroy()});f.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}h=!0;mxEvent.consume(g)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){h=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}}; +Toolbar.prototype.addMenuHandler=function(a,c,d,b){if(null!=d){var e=this.editorUi.editor.graph,f=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if(k&&(null==a.enabled||a.enabled)){e.popupMenuHandler.hideMenu();f=new mxPopupMenu(d);f.div.className+=" geToolbarMenu";f.showDisabled=b;f.labels=c;f.autoExpand=!0;var h=mxUtils.getOffset(a);f.popup(h.x,h.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(f,a);!c&&f.div.scrollHeight>f.div.clientHeight&&(f.div.style.width="40px"); +f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);this.editorUi.resetCurrentMenu();f.destroy()});f.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}k=!0;mxEvent.consume(g)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){k=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}}; Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog= -function(a,c,d,b){function e(){var a=f(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function f(a,b,c,d){b=null!=b?b:12;var f=document.createElement("table");f.style.borderCollapse="collapse";f.setAttribute("cellspacing","0");f.style.marginBottom="20px";f.style.cellSpacing="0px";var k=document.createElement("tbody");f.appendChild(k);for(var m=a.length/b,n=0;n=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var d=document.createElement("h3");mxUtils.write(d,mxResources.get("about")+" GraphEditor");c.appendChild(d);d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(d);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);d=document.createElement("a");d.setAttribute("href", -"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},FilenameDialog=function(a,c,d,b,e,f,h,g,k,l){k=null!=k?k:!0;var m,n,p=document.createElement("table"),q=document.createElement("tbody");p.style.marginTop="8px";m=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace= -"nowrap";n.style.fontSize="10pt";n.style.width="120px";mxUtils.write(n,(e||mxResources.get("filename"))+":");m.appendChild(n);var r=document.createElement("input");r.setAttribute("value",c||"");r.style.marginLeft="4px";r.style.width="180px";var t=mxUtils.button(d,function(){if(null==f||f(r.value))k&&a.hideDialog(),b(r.value)});t.className="geBtn gePrimaryBtn";this.init=function(){if(null!=e||null==h)if(r.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select(): +"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},FilenameDialog=function(a,c,d,b,e,f,k,g,h,l){h=null!=h?h:!0;var m,n,p=document.createElement("table"),q=document.createElement("tbody");p.style.marginTop="8px";m=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace= +"nowrap";n.style.fontSize="10pt";n.style.width="120px";mxUtils.write(n,(e||mxResources.get("filename"))+":");m.appendChild(n);var r=document.createElement("input");r.setAttribute("value",c||"");r.style.marginLeft="4px";r.style.width="180px";var t=mxUtils.button(d,function(){if(null==f||f(r.value))h&&a.hideDialog(),b(r.value)});t.className="geBtn gePrimaryBtn";this.init=function(){if(null!=e||null==k)if(r.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select(): document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=p.parentNode,b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10MAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var b=a.editor.graph,e=b.getGraphBounds(),f=b.view.scale,h=Math.ceil(e.width/f),g=Math.ceil(e.height/f),k,f=document.createElement("table"),l=document.createElement("tbody");f.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k, -mxResources.get("filename")+":");e.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");e.appendChild(k);var n=document.createElement("select");n.style.width="180px";k=document.createElement("option");k.setAttribute("value", -"png");mxUtils.write(k,mxResources.get("formatPng"));n.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),n.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));n.appendChild(k);k=document.createElement("option");k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));n.appendChild(k);k=document.createElement("option"); -k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));n.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),n.appendChild(k));k=document.createElement("td");k.appendChild(n);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");e.appendChild(k);var p=document.createElement("input"); -p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";k=document.createElement("td");k.appendChild(p);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");e.appendChild(k);var q=document.createElement("input");q.setAttribute("value",h);q.style.width="180px";k=document.createElement("td");k.appendChild(q);e.appendChild(k);l.appendChild(e);e=document.createElement("tr"); -k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");e.appendChild(k);var r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";k=document.createElement("td");k.appendChild(r);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");e.appendChild(k);var t=document.createElement("input");t.setAttribute("type", -"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(t);mxUtils.write(k,mxResources.get("transparent"));e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");e.appendChild(k);var w=document.createElement("input");w.setAttribute("type","number");w.setAttribute("value",ExportDialog.lastBorderValue);w.style.width="180px"; -k=document.createElement("td");k.appendChild(w);e.appendChild(k);l.appendChild(e);f.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c= -m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(w.value)),g=b.background;if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));u.className="geBtn gePrimaryBtn";var v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst?(k.appendChild(v),k.appendChild(u)):(k.appendChild(u),k.appendChild(v));e.appendChild(k); +function d(){q.style.backgroundColor=q.value*r.value>MAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var b=a.editor.graph,e=b.getGraphBounds(),f=b.view.scale,k=Math.ceil(e.width/f),g=Math.ceil(e.height/f),h,f=document.createElement("table"),l=document.createElement("tbody");f.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");e=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";h.style.width="100px";mxUtils.write(h, +mxResources.get("filename")+":");e.appendChild(h);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";h=document.createElement("td");h.appendChild(m);e.appendChild(h);l.appendChild(e);e=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("format")+":");e.appendChild(h);var n=document.createElement("select");n.style.width="180px";h=document.createElement("option");h.setAttribute("value", +"png");mxUtils.write(h,mxResources.get("formatPng"));n.appendChild(h);h=document.createElement("option");ExportDialog.showGifOption&&(h.setAttribute("value","gif"),mxUtils.write(h,mxResources.get("formatGif")),n.appendChild(h));h=document.createElement("option");h.setAttribute("value","jpg");mxUtils.write(h,mxResources.get("formatJpg"));n.appendChild(h);h=document.createElement("option");h.setAttribute("value","pdf");mxUtils.write(h,mxResources.get("formatPdf"));n.appendChild(h);h=document.createElement("option"); +h.setAttribute("value","svg");mxUtils.write(h,mxResources.get("formatSvg"));n.appendChild(h);ExportDialog.showXmlOption&&(h=document.createElement("option"),h.setAttribute("value","xml"),mxUtils.write(h,mxResources.get("formatXml")),n.appendChild(h));h=document.createElement("td");h.appendChild(n);e.appendChild(h);l.appendChild(e);e=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("zoom")+" (%):");e.appendChild(h);var p=document.createElement("input"); +p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";h=document.createElement("td");h.appendChild(p);e.appendChild(h);l.appendChild(e);e=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("width")+":");e.appendChild(h);var q=document.createElement("input");q.setAttribute("value",k);q.style.width="180px";h=document.createElement("td");h.appendChild(q);e.appendChild(h);l.appendChild(e);e=document.createElement("tr"); +h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("height")+":");e.appendChild(h);var r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";h=document.createElement("td");h.appendChild(r);e.appendChild(h);l.appendChild(e);e=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("background")+":");e.appendChild(h);var t=document.createElement("input");t.setAttribute("type", +"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;h=document.createElement("td");h.appendChild(t);mxUtils.write(h,mxResources.get("transparent"));e.appendChild(h);l.appendChild(e);e=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("borderWidth")+":");e.appendChild(h);var w=document.createElement("input");w.setAttribute("type","number");w.setAttribute("value",ExportDialog.lastBorderValue);w.style.width="180px"; +h=document.createElement("td");h.appendChild(w);e.appendChild(h);l.appendChild(e);f.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c= +m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(w.value)),g=b.background;if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));u.className="geBtn gePrimaryBtn";var v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst?(h.appendChild(v),h.appendChild(u)):(h.appendChild(u),h.appendChild(v));e.appendChild(h); l.appendChild(e);f.appendChild(l);this.container=f};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; -ExportDialog.exportFile=function(a,c,d,b,e,f){var h=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(b,e,f)),c,d);else{var g=h.getGraphBounds(),k=mxUtils.createXmlDocument(),l=k.createElement("output");k.appendChild(l);k=new mxXmlCanvas2D(l);k.translate(Math.floor((f/e-g.x)/h.view.scale),Math.floor((f/e-g.y)/h.view.scale));k.scale(e/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root), -k);l="xml="+encodeURIComponent(mxUtils.getXml(l));k=Math.ceil(g.width*e/h.view.scale+2*f);e=Math.ceil(g.height*e/h.view.scale+2*f);l.length<=MAX_REQUEST_SIZE&&k*eb.name?1:0});for(r=0;ra.indexOf(":"))try{var b=mxUtils.indexOf(k,a);if(0<=b&&null!=l[b])l[b].focus();else{f.cloneNode(!1).setAttribute(a,"");0<=b&&(k.splice(b,1),l.splice(b,1));k.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);n(c,a);c.focus()}t.value=""}catch(C){mxUtils.alert(C)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0b.name?1:0});for(r=0;ra.indexOf(":"))try{var b=mxUtils.indexOf(h,a);if(0<=b&&null!=l[b])l[b].focus();else{f.cloneNode(!1).setAttribute(a,"");0<=b&&(h.splice(b,1),l.splice(b,1));h.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);n(c,a);c.focus()}t.value=""}catch(C){mxUtils.alert(C)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0")});mxEvent.addListener(e,"dragend",function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var t=g.view.getState(c),u=null!=t?t.style:g.getCellStyle(c); -"1"==mxUtils.getValue(u,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(u,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l); -l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));l.style.marginLeft="4px";l.style.marginRight="6px";l.style.marginTop="4px";k.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(k,b);e.appendChild(k);if(g.isEnabled()){if(mxClient.IS_TOUCH|| -mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0'; mxEvent.addListener(w,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(r);g.removeCells([r],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0';v.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(v,"click",function(a){g.isEnabled()&&f(r);mxEvent.consume(a)});g.isEnabled()||(v.className="geButton mxDisabled"); t.appendChild(v);var A=l.cloneNode();A.innerHTML='
';mxEvent.addListener(A,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCells([r])[0],a.value=mxResources.get("untitledLayer"),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(A.className="geButton mxDisabled");t.appendChild(A);l=l.cloneNode(); -l.innerHTML='
';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");t.appendChild(l);k.appendChild(t);h();g.model.addListener(mxEvent.CHANGE,function(){h()}); -g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?u.className="geButton mxDisabled":u.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a= +l.innerHTML='
';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");t.appendChild(l);h.appendChild(t);k();g.model.addListener(mxEvent.CHANGE,function(){k()}); +g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?u.className="geButton mxDisabled":u.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),h,c,d,b,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=k;this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a= Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)}))}; (function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaB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3dwyr1N7Wk0VcZjA8veYXB0RmRYOkBy99jFtDiUrpbTfX3+APq4gMOCYAkI2oCgQKVkfSVwNAHqoyaCp/ztTXE0nD7TCJ4cAz47Bnx+DPhzFzDscoR6WGrQb9ycJgGn2HYjGF2gr3iR9XjdVYwyy2QQlrNBWM4HYfk8CMuXQVi+9me5xHDCWMjZMsCKkj/Ri2oyHNXZcFTnQ1BNWR68Ww/mHLy+G1gmg7CcDcJyfiQLHNeYqgw9JVcCp5DsbReaG4V7TSbjpwptVlNgraQLWo295AGaUPpuSZcdecySE1Mh+QLBJ87PO1p0+3SKiWiohmfJBml6lmyQxqfJwgHfMhzuJaF6kmBHVC5LMxmG5mwYmvNhaD4PQ/NlGJqv3WmMAVSzCFAHGZFz7WT8cHWCx8qkm1NOe27xhjfuv61m+pkzbXnBZK67MC1ApkRmhUx400Omxc+cyciBNx1kumTrNQ0GgsxeOUPVEl1xFrSdZMOE8lriye0SQOiGyfgCu4uFzN70aLTEByEdktJl2nh6xA4zbSXx3ksePCcYI85tkcCwXAX8zXh3BGLV4cVwZzB5AdvtWo5InC+aM2Xmi7rMOBmGudnq6dksqDzRrBoLGY8zRpTrXXL8R6zHpIK8YuzF3r//Aw=="; Sidebar.prototype.searchFileUrl="search.xml";Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3"};Sidebar.prototype.defaultEntries="general;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.ibm="Analytics Applications Blockchain Data DevOps Infrastructure Management Miscellaneous Security Social Users".split(" "); @@ -6279,15 +6271,15 @@ encodeURIComponent(mxResources.get("preview"))+'b.length&&(g= mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);window.open(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),h=document.createElement("img"),h.setAttribute("src",Editor.tweetImage),h.setAttribute("width","18"),h.setAttribute("height","18"),h.setAttribute("border","0"),h.style.marginBottom="5px",g.appendChild(h),g.setAttribute("title", mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),g.style.verticalAlign="bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",k.appendChild(g))}h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(h);g=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))}); -5E5>b.length?mxClient.IS_SF||null!=document.documentMode?h.className="geBtn gePrimaryBtn":(k.appendChild(g),g.className="geBtn gePrimaryBtn",h.className="geBtn"):(k.appendChild(n),h.className="geBtn",n.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=F.getTitle()?F.getTitle():this.defaultFilename;if(y.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value)); -null!=a&&(b+="&title="+encodeURIComponent(a));0b.length?mxClient.IS_SF||null!=document.documentMode?h.className="geBtn gePrimaryBtn":(k.appendChild(g),g.className="geBtn gePrimaryBtn",h.className="geBtn"):(k.appendChild(n),h.className="geBtn",n.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=C.getTitle()?C.getTitle():this.defaultFilename;if(y.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value)); +null!=a&&(b+="&title="+encodeURIComponent(a));0");if(2==A.length){var l=v(A[0]),A=v(A[1]),E=new mxCell("",new mxGeometry);E.edge=!0;l.insertEdge(E,!0);A.insertEdge(E,!1);D.push(E)}}if(0");if(2==E.length){var l=v(E[0]),E=v(E[1]),F=new mxCell("",new mxGeometry);F.edge=!0;l.insertEdge(F,!0);E.insertEdge(F,!1);D.push(F)}}if(0 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":"plantUmlSvg"==l.value? "@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->c\nc->a\n"}var e=a.editor.graph.getFreeInsertPoint(),f=document.createElement("div");f.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height="354px";k.style.marginBottom="16px";var l=document.createElement("select"), @@ -6323,28 +6315,28 @@ n=document.createElement("option");n.setAttribute("value","list");n.setAttribute "plantUmlPng");mxUtils.write(h,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(l.appendChild(n),l.appendChild(h));var g=c();k.value=g;f.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0=a.getStatus()&&(F.removeAttribute("disabled"),p(g,a.getText(),b),e&&m())}))});mxEvent.addListener(g,"dblclick",function(a){e=!0})}else g.innerHTML='
'+mxResources.get(c)+ -"
",h&&p(g),mxEvent.addListener(g,"click",function(a){p(g)}),mxEvent.addListener(g,"dblclick",function(a){m()});D.appendChild(g)}function u(){function a(){for(var a=!0;b=D.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in E){var g=document.createElement("div"),m=mxResources.get(d),e=E[d];null==m&& -(m=d.substring(0,1).toUpperCase()+d.substring(1));18=a.getStatus()&&(C.removeAttribute("disabled"),p(g,a.getText(),b),e&&m())}))});mxEvent.addListener(g,"dblclick",function(a){e=!0})}else g.innerHTML='
'+mxResources.get(c)+ +"
",h&&p(g),mxEvent.addListener(g,"click",function(a){p(g)}),mxEvent.addListener(g,"dblclick",function(a){m()});D.appendChild(g)}function u(){function a(){for(var a=!0;b=D.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in F){var g=document.createElement("div"),m=mxResources.get(d),e=F[d];null==m&& +(m=d.substring(0,1).toUpperCase()+d.substring(1));18b.lastIndexOf(".")&&0>g){var c=null!=c?c:F.value,m="";c==App.MODE_GOOGLE?m=a.drive.extension:c==App.MODE_GITHUB?m=a.gitHub.extension:c==App.MODE_TRELLO?m=a.trello.extension:c==App.MODE_DROPBOX?m=a.dropbox.extension:c==App.MODE_ONEDRIVE?m=a.oneDrive.extension:c==App.MODE_DEVICE&&(m=".xml");0<=g&&(d=d.substring(0, +function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0b.lastIndexOf(".")&&0>g){var c=null!=c?c:C.value,m="";c==App.MODE_GOOGLE?m=a.drive.extension:c==App.MODE_GITHUB?m=a.gitHub.extension:c==App.MODE_TRELLO?m=a.trello.extension:c==App.MODE_DROPBOX?m=a.dropbox.extension:c==App.MODE_ONEDRIVE?m=a.oneDrive.extension:c==App.MODE_DEVICE&&(m=".xml");0<=g&&(d=d.substring(0, g));x.value=d+m}}z(h)})}var v=document.createElement("a");v.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.position="relative";v.style.margin="4px";v.style.padding="8px 8px 10px 8px";v.style.whiteSpace="nowrap";v.appendChild(f);mxClient.IS_QUIRKS&&(v.style.cssFloat= "left",v.style.zoom="1");v.style.color="gray";v.style.fontSize="11px";var q=document.createElement("div");v.appendChild(q);mxUtils.write(q,d);if(null!=g&&null==a[g]){f.style.visibility="hidden";mxUtils.setOpacity(q,10);var p=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});p.spin(v);var t=window.setTimeout(function(){null==a[g]&&(p.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this, -function(){null!=a[g]&&(window.clearTimeout(t),mxUtils.setOpacity(q,100),f.style.visibility="",p.stop(),e())}))}else e();y.appendChild(v);++C==m&&(mxUtils.br(y),C=0)}function z(b){var c=x.value;if(null==b||null!=c&&0JGraph Ltd.
All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=b},FeedbackDialog=function(a){var b=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize= -"18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(k.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")): -(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+n.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop(); -a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var f=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(c,"change",function(){0JGraph Ltd.
All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container= +b},FeedbackDialog=function(a){var b=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"), +function(){var b=(k.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+n.value+b), +function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var f=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(c,"change", +function(){0a.maxImageSize||e>a.maxImageSize){var G=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,e));m*=G;e*=G}B>C?(C=Math.round(100*C/B),B=100):(B=Math.round(100*B/C),C=100);var A=document.createElement("div"); -A.setAttribute("draggable","true");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.position="relative";A.style.cursor="move";mxUtils.setPrefixedStyle(A.style,"transition","transform .1s ease-in-out");if(null!=b){var I=document.createElement("img");I.setAttribute("src",x.convert(b));I.style.width=B+"px";I.style.height=C+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-C)/2)+"px";I.style.paddingLeft=Math.floor((100-B)/2)+"px";A.appendChild(I)}else if(null!=f){var F= -a.stringToCells(a.editor.graph.decompress(f.xml));0z?w-1:w,0,g.splice(z,1)[0]),t.insertBefore(t.children[z],t.children[w])):(g.push(g.splice(z,1)[0]),t.appendChild(t.children[z]));else if(0a.maxImageSize||e>a.maxImageSize){var G=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,e));m*=G;e*=G}A>B?(B=Math.round(100*B/A),A=100):(A=Math.round(100*A/B),B=100);var C=document.createElement("div"); +C.setAttribute("draggable","true");C.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";C.style.position="relative";C.style.cursor="move";mxUtils.setPrefixedStyle(C.style,"transition","transform .1s ease-in-out");if(null!=b){var E=document.createElement("img");E.setAttribute("src",x.convert(b));E.style.width=A+"px";E.style.height=B+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-B)/2)+"px";E.style.paddingLeft=Math.floor((100-A)/2)+"px";C.appendChild(E)}else if(null!=f){var I= +a.stringToCells(a.editor.graph.decompress(f.xml));0z?w-1:w,0,g.splice(z,1)[0]),t.insertBefore(t.children[z],t.children[w])):(g.push(g.splice(z,1)[0]),t.appendChild(t.children[z]));else if(0=c.status&&(l(c.responseText,d,h,g,m,e,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(l(c,d,h,g,m,e,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover", n);mxEvent.addListener(t,"drop",h);mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",h);d.appendChild(t);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(g),c=p.value;/(\.xml)$/i.test(c)||(c+=".xml"); -a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";c.appendChild(m);var F=document.createElement("input");F.setAttribute("multiple","multiple");F.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(F,"change",function(b){y=!1;a.importFiles(F.files,0,0,a.maxImageSize,function(a, -c,d,h,g,m,e,f,v){C(b)(a,c,d,h,g,m,e,f,v);F.value=""});t.scrollTop=t.scrollHeight}),m=mxUtils.button(mxResources.get("import"),function(){null!=v&&(v(),v=null);F.click()}),m.setAttribute("id","btnAddImage"),m.className="geBtn",c.appendChild(m));m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=v&&(v(),v=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){y=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0';EditorUi.prototype.emptyLibraryXml="[]"; +g.appendChild(m);this.container=g}})();(function(){EditorUi.VERSION="7.6.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='';EditorUi.prototype.emptyLibraryXml="[]"; EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600; EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b, 0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6
')))}catch(p){}try{a=document.createElement("canvas");a.width=a.height=1;var c= @@ -6575,8 +6567,8 @@ e+'" target="_blank">\n\n'+mxUtils.getXml(a))})))}else g=h+".svg",k=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();l(a)}),d)}}catch(F){this.handleError(F)}}; +c){try{var h=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var g=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=h;return g}catch(A){this.handleError(A)}}));else{var k=null,l=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});if("svg"==a){var p=this.editor.graph.background; +p==mxConstants.NONE&&(p=null);var n=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(n);this.convertImages(n,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();l('\n\n'+mxUtils.getXml(a))})))}else g=h+".svg",k=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();l(a)}),d)}}catch(C){this.handleError(C)}}; EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var h=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var g="";if(h.width*h.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};h="0";if("xmlpng"==b&&(h="1",b="png",null!=this.pages&&null!=this.currentPage))for(var m=0;m=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})), -mxEvent.addListener(e,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(e.style.border="3px solid transparent",e.style.cursor="");a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",IMAGE_PATH+"/edit.gif");k.setAttribute("title",mxResources.get("edit"));f.insertBefore(k,f.firstChild);mxEvent.addListener(k,"click",C);mxEvent.addListener(e,"dblclick",function(a){mxEvent.getSource(a)==e&&C(a)});k=k.cloneNode(!1);k.setAttribute("src",Editor.plusImage); -k.setAttribute("title",mxResources.get("add"));f.insertBefore(k,f.firstChild);this.isOffline()||".scratchpad"!=a.title||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){window.open("https://desk.draw.io/support/solutions/articles/16000042367");mxEvent.consume(a)})),f.insertBefore(c,f.firstChild));var E=null;mxEvent.addListener(k, -"click",A)}m.appendChild(f);m.style.paddingRight=18*f.childNodes.length+"px"}};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition= +mxEvent.addListener(e,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(e.style.border="3px solid transparent",e.style.cursor="");a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",IMAGE_PATH+"/edit.gif");k.setAttribute("title",mxResources.get("edit"));f.insertBefore(k,f.firstChild);mxEvent.addListener(k,"click",B);mxEvent.addListener(e,"dblclick",function(a){mxEvent.getSource(a)==e&&B(a)});k=k.cloneNode(!1);k.setAttribute("src",Editor.plusImage); +k.setAttribute("title",mxResources.get("add"));f.insertBefore(k,f.firstChild);this.isOffline()||".scratchpad"!=a.title||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){window.open("https://desk.draw.io/support/solutions/articles/16000042367");mxEvent.consume(a)})),f.insertBefore(c,f.firstChild));var F=null;mxEvent.addListener(k, +"click",E)}m.appendChild(f);m.style.paddingRight=18*f.childNodes.length+"px"}};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition= 188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border", "0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())}; EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()}; @@ -6619,18 +6611,18 @@ btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=fun 1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c= window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var g=document.createElement("a"),h=!mxClient.IS_SF&&"undefined"!==typeof g.download;if(h||this.isOffline()){g.href= URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));h?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},0),g.click(),g.parentNode.removeChild(g)}catch(z){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e: -"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,g=Math.ceil(d/1024),e=Array(g),h=0;h'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog), -this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding= -"4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var g=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});g.spin(this.exportDialog); -this.exportToCanvas(mxUtils.bind(this,function(a){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this, -function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c, -a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,g){return this.createEchoRequest(c,a,d,e,b,g)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,f){var g=!mxClient.IS_IOS||!navigator.standalone,h=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,g){if("_blank"==g||null!=a&&0=e.getStatus())try{this.exportFile(e.getText(),a,f,!0,g,c)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}), -mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,g,null,null,4'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b); +null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width= +"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var g=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff", +speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});g.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0"); +a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this, +arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,g){return this.createEchoRequest(c,a,d,e,b,g)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,f,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var g=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,g){if("_blank"==g||null!=a&&0=e.getStatus())try{this.exportFile(e.getText(),a,f,!0,g,c)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}), +function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,null,4';a=null!=a?"&fetch="+encodeURI mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(e);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");e=f.cloneNode(!0);e.setAttribute("value", "copy");h.appendChild(e);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(m);mxUtils.br(h);h.appendChild(f);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));h.appendChild(m);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")), h.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));e.setAttribute("checked","checked");null==c&&f.setAttribute("disabled","disabled");g.appendChild(h);var l=this.addLinkSection(g),n=this.addCheckbox(g,mxResources.get("zoom"),!0,null,!0);mxUtils.write(g,":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight= -"12px";p.value="100%";g.appendChild(p);var F=this.addCheckbox(g,mxResources.get("fit"),!0),h=null!=this.pages&&1")}var h=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}), null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),h.width*h.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?g("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})}; EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,k){var g=this.editor.graph.getSvg(),h=g.getElementsByTagName("a");if(null!=h)for(var m=0;m=a.getStatus()){if(null!= @@ -6687,7 +6679,7 @@ b){var d=a.getText();if(g){if((9==document.documentMode||10==document.documentMo retry:h})})});h()}catch(w){null!=c&&c(w)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"), d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var g=[];try{var f=this.editor.graph;if(null!=a&&0b.Properties.Order?1:0})}else a.push(e);if(0=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g= @@ -6697,102 +6689,103 @@ null,"",g.snap(b),g.snap(c),f,d,"shape=image;verticalLabelPosition=bottom;labelB if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(e.value)&& g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024=a.status&& -(a=a.responseText,null!=a&&"> -2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}h=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>> -2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(h&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,k,l,n,v,x,y){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var g=null!=b&&null!=c,h=!0,m=!1;if(!mxClient.IS_CHROMEAPP&& -null!=a)for(var p=x||this.resampleThreshold,q=0;qp){m=!0;break}var B=mxUtils.bind(this,function(){var m=this.editor.graph,n=m.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,h,k,m){return null!=a&&"','',isLocalStorage||mxClient.IS_CHROMEAPP)).container, -340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width), -h=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var k=Math.max(g/e,h/e);if(1d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>> -1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function g(a,b){var c=k;k+=b;return a.substring(c,k)}function f(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob? -atob(a):Base64.decode(a,!0);var k=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,k);do{var m=f(a);if("IDAT"==g(a,4)){e=a.substring(0,k-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=h(c.length)+b+c+h(d^4294967295);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+m);d=g(a,m);g(a, -4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "), -null!=a&&0this.resampleThreshold?this.confirmImageResize(function(a){l=a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)? -this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",g,f,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,g,f,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types, -"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),g,f,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle= -mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged")); -this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor); -mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(), -mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus(); -document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body; -var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container? -this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c=a.status)if(a=a.responseText,"=a.getStatus()?q("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0name.indexOf("."),/(\.svg)$/i.test(name),/(\.html)$/i.test(name)),null,h.mode,null,!0,h.folder)}),I=mxUtils.bind(this,function(){null!=h.template?this.trello.getFile(h.folder+this.trello.SEPARATOR+h.template,function(a){G(a.getData())},function(){G()}):G()});if(null==this.trello){var H=function(){null!=this.trello&&(this.removeListener(H), -I())};this.addListener("clientLoaded",H)}else I()}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight= -"38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}h=g(h);c=!0;try{a(h,f)}catch(P){this.handleError(P)}c= -!1;null!=urlParams.modified&&this.editor.setStatus("");var z=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(y.getDefaultParent());ha()},!0,C);C=null}else if("horizontaltree"==B|| -"verticaltree"==B||"auto"==B&&V.length==2*c.length-1&&1==S.length){y.view.validate();var Z=new mxCompactTreeLayout(y,"horizontaltree"==B);Z.levelDistance=n;Z.edgeRouting=!1;Z.resetEdges=!1;this.executeLayout(function(){Z.execute(y.getDefaultParent(),0c.length){y.view.validate();var aa=new mxFastOrganicLayout(y);aa.forceConstant=3*n;aa.resetEdges=!1;var ja=aa.isVertexIgnored;aa.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(y);ca.spacing=l;this.executeLayout(function(){aa.execute(y.getDefaultParent());ha()},!0,C);C=null}this.hideDialog()}finally{y.model.endUpdate()}null!= -C&&C()}}catch(ka){this.handleError(ka)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0mxUtils.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.status&&(a=a.responseText,null!=a&&">2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f& +240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}h=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(h&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h&63)}return b}; +EditorUi.prototype.importFiles=function(a,b,c,d,e,f,k,l,n,v,x,y){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var g=null!=b&&null!=c,h=!0,m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=x||this.resampleThreshold,q=0;qp){m=!0;break}var A=mxUtils.bind(this,function(){var m=this.editor.graph,n=m.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,h,k,m){return null!=a&&"','',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange= +function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),h=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var k=Math.max(g/e,h/e);if(1d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function g(a,b){var c=k;k+=b;return a.substring(c,k)} +function f(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,k);do{var m=f(a);if("IDAT"==g(a,4)){e=a.substring(0,k-8);c=c+String.fromCharCode(0)+ +("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=h(c.length)+b+c+h(d^4294967295);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+m);d=g(a,m);g(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this, +function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0this.resampleThreshold?this.confirmImageResize(function(a){l=a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",g,f,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ +h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,g,f,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),g,f,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)}; +EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle); +mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat); +mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search", +mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())), +e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})), +mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/": +"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+ +2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument), +d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c=a.status)if(a=a.responseText,"=a.getStatus()?q("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0name.indexOf("."),/(\.svg)$/i.test(name), +/(\.html)$/i.test(name)),null,h.mode,null,!0,h.folder)}),I=mxUtils.bind(this,function(){null!=h.template?this.trello.getFile(h.folder+this.trello.SEPARATOR+h.template,function(a){G(a.getData())},function(){G()}):G()});if(null==this.trello){var H=function(){null!=this.trello&&(this.removeListener(H),I())};this.addListener("clientLoaded",H)}else I()}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&& +null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l), +this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}h=g(h);c=!0;try{a(h,f)}catch(P){this.handleError(P)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var z=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(y.getDefaultParent());ha()},!0,B);B=null}else if("horizontaltree"==A||"verticaltree"==A||"auto"==A&&V.length==2*c.length-1&&1==S.length){y.view.validate();var Z=new mxCompactTreeLayout(y,"horizontaltree"== +A);Z.levelDistance=n;Z.edgeRouting=!1;Z.resetEdges=!1;this.executeLayout(function(){Z.execute(y.getDefaultParent(),0c.length){y.view.validate();var aa=new mxFastOrganicLayout(y);aa.forceConstant=3*n;aa.resetEdges=!1;var ja=aa.isVertexIgnored;aa.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(y);ca.spacing=l;this.executeLayout(function(){aa.execute(y.getDefaultParent());ha()},!0,B);B=null}this.hideDialog()}finally{y.model.endUpdate()}null!=B&&B()}}catch(ka){this.handleError(ka)}};EditorUi.prototype.getSearch=function(a){var b= +"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0mxUtils.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=0mxUtils.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,420,120,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&& null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width* b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/ @@ -7039,8 +7032,8 @@ DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct a(e.substring(1),new DropboxLibrary(this.ui,c,k))}catch(l){this.ui.handleError(l)}else this.createLibrary(b[0],a,d)}),d)}else this.createLibrary(b[0],a,d)}})})}; DropboxClient.prototype.createLibrary=function(a,b,d){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.loadUrl(a.link,mxUtils.bind(this,function(c){this.insertFile(a.name,c,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),b(a.getHash().substring(1),a)}catch(f){d(f)}}),d,!0)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))}; DropboxClient.prototype.pickFile=function(a,b){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,b){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):b.getHash(),null,b)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(b)this.ui.spinner.stop(),a(d[0].link);else{var c=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),e=mxUtils.bind(this, -function(b,c){this.ui.spinner.stop();a(b,c)}),f=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&f)e(d[0].link);else{var k=d[0].link.indexOf(this.appPath);if(0f.getStatus()||300<=f.getStatus()?b({message:mxResources.get("accessDenied")}): (f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,f.email,f.name)),a()))}))}; GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,l){if(c)if(window.onGitHubCallback=null,c=!1,null==k)b({message:mxResources.get("accessDenied"),retry:d});else{var n=mxUtils.bind(this,function(){var c= -!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(g){window.clearTimeout(d);if(c)try{if(200>g.getStatus()||300<=g.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=f&&f();var h=g.getText();this.token=h.substring(h.indexOf("=")+1,h.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(t){b(t)}finally{null!=l&& +!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(g){window.clearTimeout(d);if(c)try{if(200>g.getStatus()||300<=g.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=f&&f();var k=g.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(t){b(t)}finally{null!=l&& l.close()}}))});n()}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onGitHubCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})}; GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),n=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+n)};a.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(k)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this, function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var h=!1;try{var g=JSON.parse(a.getText());null!=g&&null!=g.errors&&0=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",q))}}),p)}),w=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");h.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);"); mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",q);w(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this, function(a){if(null!=a){var b=a.split("/");if(1b.length?(d=a,c=g,f=e=null,z()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+g+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;e=decodeURIComponent(a.meta.ref);f="";t()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(), this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var h=0;h=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll", -q))}),p)});w()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!1};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1}; +q))}),p)});w()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1}; TrelloFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};TrelloFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};TrelloFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)}; -TrelloFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.meta=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified= -e;this.setModified(f||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}c(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(b){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,b)}));else null!=d&&d()};TrelloLibrary=function(a,b,d){TrelloFile.call(this,a,b,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml"; +TrelloFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(f){this.savingFile=!1;this.isModified=e;this.meta=f;this.contentChanged();null!=d&&d();0',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help", new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search",null,null,c,null,null,!1),f=document.createElement("div");f.style.display="inline";f.innerHTML=':
';e.firstChild.nextSibling.appendChild(f);e.style.backgroundColor="whiteSmoke";e.style.cursor= -"default";var g=f.getElementsByTagName("form")[0],h=f.getElementsByTagName("input")[0];null!=h&&null!=g&&(mxEvent.addListener(g,"submit",function(){if(EditorUi.enableLogging)try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity=CONFIG&msg=helpsearch:"+encodeURIComponent(h.value)+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(A){}window.setTimeout(function(){a.menubar.hideMenu()},0)}),mxEvent.addGestureListeners(e,function(a){document.activeElement!=h&&h.focus(); +"default";var g=f.getElementsByTagName("form")[0],h=f.getElementsByTagName("input")[0];null!=h&&null!=g&&(mxEvent.addListener(g,"submit",function(){if(EditorUi.enableLogging)try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity=CONFIG&msg=helpsearch:"+encodeURIComponent(h.value)+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(E){}window.setTimeout(function(){a.menubar.hideMenu()},0)}),mxEvent.addGestureListeners(e,function(a){document.activeElement!=h&&h.focus(); mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)}),window.setTimeout(function(){h.focus()},0));this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support","-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES); this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel", mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c, @@ -7388,7 +7382,7 @@ c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(m null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive? b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):n&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):h&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+ "...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(A){a.handleError(A,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))}))); +c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(E){a.handleError(E,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))}))); this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c); mxClient.IS_SVG&&(null==document.documentMode||9a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function n(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=l(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width- 10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=q.view.getState(a),k=q.view.scale;if(null!=h){var m=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n= -q.getOutgoingEdges(q.model.getTerminal(d[0],!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,B=g=d=0;BmxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(b(a[p])&& -(t=q.getIncomingEdges(a[p]),0mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==q.getIncomingEdges(k[p]).length){m=l;if(null==m||m==q.model.getParent(a[p]))m=q.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,q.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};if(null!=u.sidebar){var C=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate(); -try{if(g=C.apply(this,arguments),b(a))for(var h=0;hmxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==q.getIncomingEdges(k[p]).length){m=l;if(null==m||m==q.model.getParent(a[p]))m=q.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,q.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};if(null!=u.sidebar){var B=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate(); +try{if(g=B.apply(this,arguments),b(a))for(var h=0;hmxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};t.prototype.destroy=function(){if(null!=this.images)for(var a=0;amxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};t.prototype.destroy=function(){if(null!=this.images)for(var a=0;aa&&(a=0);6b&&(b=0);1d&&(d=0);1'+e+""))),a,b)}; Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ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DOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+ @@ -1970,13 +1971,13 @@ this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView")) Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize", this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width); a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a}; -Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){for(var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes),h=a.getModel(),r=[],u=0;udocument.documentMode)&&(r=80);e+=r;d+=r;var u=e,c=d,f=Math.max(document.body.clientHeight,document.documentElement.clientHeight),g=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),p=Math.max(1,Math.round((f-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d>f-64&&(b.style.overflowY="auto");d=Math.min(d,f-64);0document.documentMode)&&(r=80);e+=r;d+=r;var u=e,c=d,f=Math.max(document.body.clientHeight,document.documentElement.clientHeight),g=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),p=Math.max(1,Math.round((f-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d>f-64&&(b.style.overflowY="auto");d=Math.min(d,f-64);0f-64?"auto":"";null!=this.dialogImg&&(this.dialogImg.style.top=p+14+"px",this.dialogImg.style.left=g+e+38-r+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=n;this.container=q;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; @@ -1986,30 +1987,30 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA "/locked.png"; Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1M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iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+ "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};var PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var b=r.checked||c.checked,d=parseInt(g.value)/100;isNaN(d)&&(d=1,g.value="100%");var d=.75*d,p=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(b){var t=r.checked?1:parseInt(f.value);isNaN(t)||(m=mxUtils.getScaleForPageCount(t,e,p))}e.getGraphBounds();var h=t=0,p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*d);p.height=Math.ceil(p.height*d);m*=d;!b&&e.pageVisible?(d=e.getPageLayout(),t-=d.x*p.width,h-=d.y*p.height): -b=!0;b=PrintDialog.createPrintPreview(e,m,p,0,t,h,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,d,h,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var n=document.createElement("tbody");d=document.createElement("tr");var r=document.createElement("input");r.setAttribute("type","checkbox");h=document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";h.appendChild(r);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage")); -h.appendChild(u);mxEvent.addListener(u,"click",function(a){r.checked=!r.checked;c.checked=!r.checked;mxEvent.consume(a)});mxEvent.addListener(r,"change",function(){c.checked=!r.checked});d.appendChild(h);n.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");h.appendChild(u);mxEvent.addListener(u, -"click",function(a){c.checked=!c.checked;r.checked=!c.checked;mxEvent.consume(a)});d.appendChild(h);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(f);mxUtils.write(h," "+mxResources.get("pages")+" (max)");d.appendChild(h);n.appendChild(d);mxEvent.addListener(c,"change", -function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");r.checked=!c.checked});d=d.cloneNode(!1);h=document.createElement("td");mxUtils.write(h,mxResources.get("pageScale")+":");d.appendChild(h);h=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";h.appendChild(g);d.appendChild(h);n.appendChild(d);d=document.createElement("tr");h=document.createElement("td");h.colSpan=2; -h.style.paddingTop="20px";h.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&h.appendChild(u);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";h.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";h.appendChild(p);a.editor.cancelFirst|| -h.appendChild(u);d.appendChild(h);n.appendChild(d);l.appendChild(n);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}; -PrintDialog.createPrintPreview=function(a,b,e,d,h,l,n){b=new mxPrintPreview(a,b,e,d,h,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=n;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var r=b.writeHead;b.writeHead=function(a){r.apply(this,arguments);a.writeln('")};return b}; +PrintDialog.prototype.create=function(a){function b(a){var b=r.checked||c.checked,d=parseInt(g.value)/100;isNaN(d)&&(d=1,g.value="100%");var d=.75*d,p=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(b){var t=r.checked?1:parseInt(f.value);isNaN(t)||(m=mxUtils.getScaleForPageCount(t,e,p))}e.getGraphBounds();var k=t=0,p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*d);p.height=Math.ceil(p.height*d);m*=d;!b&&e.pageVisible?(d=e.getPageLayout(),t-=d.x*p.width,k-=d.y*p.height): +b=!0;b=PrintDialog.createPrintPreview(e,m,p,0,t,k,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var n=document.createElement("tbody");d=document.createElement("tr");var r=document.createElement("input");r.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(r);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage")); +k.appendChild(u);mxEvent.addListener(u,"click",function(a){r.checked=!r.checked;c.checked=!r.checked;mxEvent.consume(a)});mxEvent.addListener(r,"change",function(){c.checked=!r.checked});d.appendChild(k);n.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");k.appendChild(u);mxEvent.addListener(u, +"click",function(a){c.checked=!c.checked;r.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);n.appendChild(d);mxEvent.addListener(c,"change", +function(){c.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");r.checked=!c.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);d.appendChild(k);n.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2; +k.style.paddingTop="20px";k.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&k.appendChild(u);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";k.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";k.appendChild(p);a.editor.cancelFirst|| +k.appendChild(u);d.appendChild(k);n.appendChild(d);l.appendChild(n);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}; +PrintDialog.createPrintPreview=function(a,b,e,d,k,l,n){b=new mxPrintPreview(a,b,e,d,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=n;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var r=b.writeHead;b.writeHead=function(a){r.apply(this,arguments);a.writeln('")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=f,c.style.backgroundImage="")}function e(){null==m?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",m.src),p.style.fontSize="11px",p.innerHTML=m.src.substring(0,42)+"...")}var d=a.editor.graph,h,l,n=document.createElement("table");n.style.width= -"100%";n.style.height="100%";var r=document.createElement("tbody");h=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");h.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);h.appendChild(l);r.appendChild(h);h=document.createElement("tr");l=document.createElement("td"); -mxUtils.write(l,mxResources.get("background")+":");h.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var c=document.createElement("button");c.style.width="18px";c.style.height="18px";c.style.marginRight="20px";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";var f=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(c)}); -l.appendChild(c);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=d.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?d.getGridSize():a)});h.appendChild(l);r.appendChild(h);h=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+ -":");h.appendChild(l);l=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var m=d.backgroundImage;mxEvent.addListener(p,"click",function(c){a.showBackgroundImageDialog(function(a){m=a;e()});mxEvent.consume(c)});e();l.appendChild(p);h.appendChild(l);r.appendChild(h);h=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var q= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&l.appendChild(q);var k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==g.value&&d.setGridSize(parseInt(g.value));var c=new ChangePageSetup(a,f,m,u.get());c.ignoreColor=d.background==f;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=m?m.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&& -c.ignoreColor&&c.ignoreImage||d.model.execute(c)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||l.appendChild(q);h.appendChild(l);r.appendChild(h);n.appendChild(r);this.container=n}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function h(a,c,b){if(b||g!=document.activeElement&&p!=document.activeElement){a=!1;for(c=0;c'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=this.view.canvas;null!= -c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+d,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,g=this.view.translate,e=this.pageFormat,m=d*this.pageScale,q=this.view.getBackgroundPageBounds();b=q.width;c=q.height;var k=new mxRectangle(d*g.x,d* -g.y,e.width*m,e.height*m),w=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,x=a?Math.ceil(b/k.width)-1:0,t=q.x+b,r=q.y+c;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,x=a?Math.ceil(b/h.width)-1:0,t=q.x+b,r=q.y+c;null==this.horizontalPageBreaks&&0document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b:d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,a)&& -(a.parentNode.removeChild(a),b.push(a));a=k}a=this.toolbar.fontMenu;k=this.toolbar.sizeMenu;if(null==g)this.toolbar.createTextToolbar();else{for(var e=0;emxUtils.indexOf(this.toolbar.staticElements,a)&& +(a.parentNode.removeChild(a),b.push(a));a=h}a=this.toolbar.fontMenu;h=this.toolbar.sizeMenu;if(null==g)this.toolbar.createTextToolbar();else{for(var e=0;emxUtils.indexOf(x,t[a])&&x.push(t[a]);var F=function(a,c){d.getModel().beginUpdate();try{if(c)for(var b=d.getModel().isEdge(e),f=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],g=0;gmxUtils.indexOf(t,h))&&d.setCellStyles(h,u,[e])}}}finally{d.getModel().endUpdate()}}; -d.addListener("cellsInserted",function(a,c){F(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){F(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));F(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0mxUtils.indexOf(x,t[a])&&x.push(t[a]);var F=function(a,c){d.getModel().beginUpdate();try{if(c)for(var b=d.getModel().isEdge(e),f=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],g=0;gmxUtils.indexOf(t,k))&&d.setCellStyles(k,u,[e])}}}finally{d.getModel().endUpdate()}}; +d.addListener("cellsInserted",function(a,c){F(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){F(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));F(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+ .01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor, 160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,f=0;null!=v&&(d=a.container.offsetWidth/2-v.x+c.x,f=a.container.offsetHeight/2-v.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&b(!1,null,d*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==f||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-1),a.container.scrollTop-= @@ -2103,27 +2104,27 @@ EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.e 0a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,a.scrollTileSize.height* a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-b.height)/ 4))-b.y)))}; -EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,h=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,h=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y* -b.view.scale-h);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=b;this.previousImage=e;this.previousFormat=d;this.ignoreImage=this.ignoreColor=!1} +EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,k=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y* +b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=b;this.previousImage=e;this.previousFormat=d;this.ignoreImage=this.ignoreColor=!1} ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b)}; EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))}; EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))}; EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))}; -EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing; +EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing; this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);d()};d()}; -EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,h=a.getSelectionCells();if(null!=h)for(var l=0;lscreen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)}; EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b}; -EditorUi.prototype.addSplitHandler=function(a,b,e,d){function h(a){if(null!=n){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,r+(b?g.x-n.x:n.y-g.y)-e));mxEvent.consume(a);r!=f()&&(u=!0,c=null)}}function l(a){h(a);n=r=null}var n=null,r=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){n=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));r=f();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!u){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,h,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,l)})};EditorUi.prototype.showDialog=function(a,b,e,d,h,l){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,h,l);this.dialogs.push(this.dialog)}; +EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=n){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,r+(b?g.x-n.x:n.y-g.y)-e));mxEvent.consume(a);r!=f()&&(u=!0,c=null)}}function l(a){k(a);n=r=null}var n=null,r=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){n=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));r=f();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!u){var b=null!=c?c-e:0;c=f();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,d,k,l){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0e&&(b=a.substring(e,d+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(h){}return b}; +EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("<mxGraphModel ");if(0<=e){var d=a.lastIndexOf("</mxGraphModel>");d>e&&(b=a.substring(e,d+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(k){}return b}; EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&& (b=e);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}}; -EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var h=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(h);if(null!=l&&0navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}}; +EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=l&&0f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var g=this.selectionCellsHandler.getHandler(d.cell);if(null!=g&&null!=g.bends&&0f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var g=this.selectionCellsHandler.getHandler(d.cell);if(null!=g&&null!=g.bends&&0mxUtils.indexOf(c,f)&&b.push(f)):b.push(c[d])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this); -this.getRubberband=function(){return g};var p=(new Date).getTime(),m=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),m=0):m=(new Date).getTime()-p};var k=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3=a&&t.y+t.height<=p&&t.y>=c&&t.x+t.width<=k&&g.push(q);this.getAllCells(a,c,b,d,q,g)}}}return g};var G=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)? +var v=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return v.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,f,g){g=null!=g?g:[];if(0=a&&t.y+t.height<=p&&t.y>=c&&t.x+t.width<=e&&g.push(q);this.getAllCells(a,c,b,d,q,g)}}}return g};var G=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)? !1:G.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();F=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),g.start(b.x,b.y)):null!=F?this.addSelectionCells(F):1p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(l,""),o:(0p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0d&&"%"==b.charAt(match.index-1))l=h.substring(1);else{var n=h.substring(1,h.length-1);if(0>n.indexOf("{"))for(var r=a;null==l&&null!=r;)null!=r.value&&"object"==typeof r.value&&(l=r.hasAttribute(n)?null!=r.getAttribute(n)?r.getAttribute(n):"":null),r=this.model.getParent(r);null==l&&(l=this.getGlobalVariable(n))}e.push(b.substring(d, -match.index)+(null!=l?l:h));d=match.index+h.length}}e.push(b.substring(d));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; -Graph.prototype.connectVertex=function(a,b,e,d,h,l){l=l?l:!1;var n=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=a.geometry.width/2,n.y-=e):b==mxConstants.DIRECTION_SOUTH?(n.x+=a.geometry.width/2,n.y+=a.geometry.height+e):(n.x=b==mxConstants.DIRECTION_WEST?n.x-e:n.x+(a.geometry.width+e),n.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); -var r=this.view.scale,u=this.view.translate,c=u.x*r,u=u.y*r;this.model.isVertex(e.cell)&&(c=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!h?null:this.getCellAt(c+n.x*r,u+n.y*r);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),r=this.view.getState(l),null!=e&&null!=r&&mxUtils.intersects(e,r)&&(l= -null));if(h=!mxEvent.isShiftDown(d)||h)b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{r=l;if(null==r&&h){for(var c=a,f=this.getCellGeometry(a);null!= -f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),p=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(p,"part",!1)){var m=this.model.getParent(c);this.model.isVertex(m)&&(c=m)}r=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(r);null!=f&&(f.x=n.x-f.width/2,f.y=n.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var q=mxEvent.isControlDown(d)&&h||null==l&&null!=f&&f.constructor==mxStackLayout? -null:this.insertEdge(this.model.getParent(a),null,"",a,r,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var k=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=q.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==q.parent&&(k=d.parent.getIndex(d),d.parent.insert(q,k))}null==l&&null!=r&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),a.parent.insert(r,k)); +Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;dd&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var n=k.substring(1,k.length-1);if(0>n.indexOf("{"))for(var r=a;null==l&&null!=r;)null!=r.value&&"object"==typeof r.value&&(l=r.hasAttribute(n)?null!=r.getAttribute(n)?r.getAttribute(n):"":null),r=this.model.getParent(r);null==l&&(l=this.getGlobalVariable(n))}e.push(b.substring(d, +match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; +Graph.prototype.connectVertex=function(a,b,e,d,k,l){l=l?l:!1;var n=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=a.geometry.width/2,n.y-=e):b==mxConstants.DIRECTION_SOUTH?(n.x+=a.geometry.width/2,n.y+=a.geometry.height+e):(n.x=b==mxConstants.DIRECTION_WEST?n.x-e:n.x+(a.geometry.width+e),n.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); +var r=this.view.scale,u=this.view.translate,c=u.x*r,u=u.y*r;this.model.isVertex(e.cell)&&(c=e.x,u=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+n.x*r,u+n.y*r);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),r=this.view.getState(l),null!=e&&null!=r&&mxUtils.intersects(e,r)&&(l= +null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{r=l;if(null==r&&k){for(var c=a,f=this.getCellGeometry(a);null!= +f&&f.relative;)c=this.getModel().getParent(c),f=this.getCellGeometry(c);var g=this.view.getState(c),p=null!=g?g.style:this.getCellStyle(c);if(mxUtils.getValue(p,"part",!1)){var m=this.model.getParent(c);this.model.isVertex(m)&&(c=m)}r=this.duplicateCells([c],!1)[0];f=this.getCellGeometry(r);null!=f&&(f.x=n.x-f.width/2,f.y=n.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var q=mxEvent.isControlDown(d)&&k||null==l&&null!=f&&f.constructor==mxStackLayout? +null:this.insertEdge(this.model.getParent(a),null,"",a,r,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var h=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=q.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==q.parent&&(h=d.parent.getIndex(d),d.parent.insert(q,h))}null==l&&null!=r&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(h=a.parent.getIndex(a),a.parent.insert(r,h)); null!=q&&e.push(q);null==l&&null!=r&&e.push(r);null==r&&null!=q&&q.geometry.setTerminalPoint(n,!1);null!=q&&this.fireEvent(new mxEventObject("cellsInserted","cells",[q]))}finally{this.model.endUpdate()}return e}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)}; -Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var h=0;hmxUtils.indexOf(e,a[h].nodeName)&&0b.name?1:0});for(h=0;hmxUtils.indexOf(e,a[k].nodeName)&&0b.name?1:0});for(k=0;k'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Editor.createSvgImage(14,26,''):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26); +HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Editor.createSvgImage(26,14,''):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Editor.createSvgImage(14,26,''):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26); +HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Editor.createSvgImage(26,26,''):new mxImage(IMAGE_PATH+"/round-drop.png",26,26); HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3Rh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1CAWiUTusbu7y9rttlZv5fP5WDQavYfIMba4uEipfhF8XtqJoZXx/uH+sC/4vPg7OljZZQbsCmLtYzc3N6zRaJhotVrmfx0xDINtbm6athYUeXpHdbBNaqZUKpWxWXV7e2vex+xaWVnhc3NzjrPUXgexyCt0m67LBV7uJMITjqRE4o8tZeg8FPpFitgapYxiOC0poFgsji1jKNo6BZZckrAGUtJsNk1vqAihCBcKhTE7hNWhqw2qFnGy5UFOUYJVIJ1OjzSE+BCEilon0URavRmBqnbbQ00AXbm+vnZc9O1tj72OnQoc2+cwygRkb2+P1et17ZoEm3g87lRmjgWZ00kbXkNuse6/Bu2wlegIxfb2tuvWGroO4bO2c4bbzUh60mxDXm1sbJhhxkQYnhS4h2fUZoRAWnf7lv8N27f8P7Xhnekjgpk+VKGOoQbsiY+hhhtF3YO7twIJ+ULvUGv+GQ2fQEvWxI/THNx5/p/BaspPAQYAqStgiSQwCDoAAAAASUVORK5CYII=":IMAGE_PATH+ "/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0; HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE, @@ -2255,13 +2249,13 @@ this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redire this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a}; HoverIcons.prototype.visitNodes=function(a){for(var b=0;bm||Math.abs(t.y- -n.y)>m)&&(Math.abs(t.x-l.x)>m||Math.abs(t.y-l.y)>m)){l=t.x-w.x;n=t.y-w.y;t={distSq:l*l+n*n,x:t.x,y:t.y};for(l=0;lt.distSq){x.splice(l,0,t);t=null;break}null==t||0!=x.length&&x[x.length-1].x===t.x&&x[x.length-1].y===t.y||x.push(t)}}}for(v=0;vf*f&&0f*f&&(n=new mxPoint(l.x-t.x,l.y-t.y),v=new mxPoint(l.x+t.x,l.y+t.y),q.push(n),this.addPoints(a,q,b,d,!1,null,k),q=0>Math.round(t.x)|| -0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,k=!1,"sharp"==e?(a.lineTo(n.x-t.y*q,n.y+t.x*q),a.lineTo(v.x-t.y*q,v.y+t.x*q),a.lineTo(v.x,v.y)):"arc"==e?(q*=1.3,a.curveTo(n.x-t.y*q,n.y+t.x*q,v.x-t.y*q,v.y+t.x*q,v.x,v.y)):(a.moveTo(v.x,v.y),k=!0),q=[v],n=!0))}else t=null;n||(q.push(l),w=l)}this.addPoints(a,q,b,d,!1,null,k);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==a||"1"!=c.style.snapToPoint&& -"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),g=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=e)var w=Math.cos(-e),x=Math.sin(-e),f=mxUtils.getRotatedPoint(f,w,x,k);w=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);w+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| -0);f=this.getPerimeterPoint(c,f,0==e&&g,w);0!=e&&(w=Math.cos(e),x=Math.sin(e),f=mxUtils.getRotatedPoint(f,w,x,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;for(var f=0;fm||Math.abs(t.y- +n.y)>m)&&(Math.abs(t.x-l.x)>m||Math.abs(t.y-l.y)>m)){l=t.x-w.x;n=t.y-w.y;t={distSq:l*l+n*n,x:t.x,y:t.y};for(l=0;lt.distSq){x.splice(l,0,t);t=null;break}null==t||0!=x.length&&x[x.length-1].x===t.x&&x[x.length-1].y===t.y||x.push(t)}}}for(v=0;vf*f&&0f*f&&(n=new mxPoint(l.x-t.x,l.y-t.y),v=new mxPoint(l.x+t.x,l.y+t.y),q.push(n),this.addPoints(a,q,b,d,!1,null,h),q=0>Math.round(t.x)|| +0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,h=!1,"sharp"==e?(a.lineTo(n.x-t.y*q,n.y+t.x*q),a.lineTo(v.x-t.y*q,v.y+t.x*q),a.lineTo(v.x,v.y)):"arc"==e?(q*=1.3,a.curveTo(n.x-t.y*q,n.y+t.x*q,v.x-t.y*q,v.y+t.x*q,v.x,v.y)):(a.moveTo(v.x,v.y),h=!0),q=[v],n=!0))}else t=null;n||(q.push(l),w=l)}this.addPoints(a,q,b,d,!1,null,h);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==a||"1"!=c.style.snapToPoint&& +"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),g=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),h=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=e)var w=Math.cos(-e),x=Math.sin(-e),f=mxUtils.getRotatedPoint(f,w,x,h);w=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);w+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| +0);f=this.getPerimeterPoint(c,f,0==e&&g,w);0!=e&&(w=Math.cos(e),x=Math.sin(e),f=mxUtils.getRotatedPoint(f,w,x,h));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;for(var f=0;f=l.getStatus()&&eval.call(window,l.getText())}catch(n){null!=window.console&&console.log("error in getStencil:",h,n)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; +mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.prototype.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d=l.getStatus()&&eval.call(window,l.getText())}catch(n){null!=window.console&&console.log("error in getStencil:",k,n)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0=d.getStatus()&&(h=d.getXml(),mxStencilRegistry.packages[a]=h,l=!0,null!=h&&null!=h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,b,l))}));return}n=mxUtils.load(a);h=n.getXml();mxStencilRegistry.packages[a]=h;l=!0}catch(r){null!=window.console&&console.log("error in loadStencilSet:", -a,r)}null!=h&&null!=h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,b,l)}};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b=d.getStatus()&&(k=d.getXml(),mxStencilRegistry.packages[a]=k,l=!0,null!=k&&null!=k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l))}));return}n=mxUtils.load(a);k=n.getXml();mxStencilRegistry.packages[a]=k;l=!0}catch(r){null!=window.console&&console.log("error in loadStencilSet:", +a,r)}null!=k&&null!=k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;bg||d>g)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b= -b.parentNode;null!=b?this.clear():(null==this.currentState||c.getState()!=this.currentState&&null!=c.getState()||!e.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)}},mouseUp:function(a,d){for(var f=d.getSource(),k=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-e.container.scrollLeft)g||d>g)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b= +b.parentNode;null!=b?this.clear():(null==this.currentState||c.getState()!=this.currentState&&null!=c.getState()||!h.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)}},mouseUp:function(a,d){for(var f=d.getSource(),e=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-h.container.scrollLeft)c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c; if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){c=null!=c?c:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title", a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);60"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,e=(mxUtils.getValue(a.style, +mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){e=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0"):e,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,h=(mxUtils.getValue(a.style, mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle= -e?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=""; -this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var u=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a, +h?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=e&&(this.textarea.innerHTML=e,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));e=this.graph.sanitizeHtml(c?e.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):e,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=""; +this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=e&&(this.textarea.innerHTML=e);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var u=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a, c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE))); this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight").replace(/\n/g,"
"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var c=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer= function(){try{this.graph.container.focus()}catch(N){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell], !1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var g=mxGraphHandler.prototype.moveCells; -mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,e){mxEvent.isAltDown(e)&&(f=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width- +mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,h){mxEvent.isAltDown(h)&&(f=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width- this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0e||Math.abs(g)>e)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,b),this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()|| -(this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", -null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& -(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var k=(new Date).getTime(),w=0,x=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){x.apply(this,arguments);b!=this.currentTerminalState?(k=(new Date).getTime(), -w=0):w=(new Date).getTime()-k;this.currentTerminalState=b};var t=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect= -!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox= -function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return v.apply(this,arguments)};var G=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell), -d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):G.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell); -(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Editor.createSvgImage(16,16,''):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Editor.createSvgImage(18,18,''): +new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Editor.createSvgImage(18,18,''):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS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HAqFfr24uMDGxgZ2d3cRiUQAAHa7HU6nE319fTg5Ofmlq6vrGwB/AngaCoWK6rbsNptNA1AJoA7Aux6Pp3NoaMhjsVg+QNmIRqO/u1yubwFEASRKUAEA7rASqABUAKgC8KAUb5XWCOAfAFcA/gJwDSB7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=": +IMAGE_PATH+"/handle-rotate.png",19,21);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Editor.createSvgImage(5,5,''));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage= +HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget, +Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src, +(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxVertexHandler.prototype.rotationHandleVSpacing= +-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())}; +if(Graph.touchStyle){if(mxClient.IS_TOUCH||0h||Math.abs(g)>h)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,b), +this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height= +Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this, +arguments)};var h=(new Date).getTime(),w=0,x=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){x.apply(this,arguments);b!=this.currentTerminalState?(h=(new Date).getTime(),w=0):w=(new Date).getTime()-h;this.currentTerminalState=b};var t=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b), +f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE? +HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return v.apply(this, +arguments)};var G=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):G.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown; +mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells|| +this.graph.getSelectionCount()a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),g=Math.sqrt(d*d+f*f);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var e=Math.round(g/10),k=this.defaultVariation;5>e&&(e=5,k/=3);for(var la=b(a-this.lastX)*d/e,b=b(c- -this.lastY)*f/e,d=d/g,f=f/g,g=0;ga?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),g=Math.sqrt(d*d+f*f);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var h=Math.round(g/10),e=this.defaultVariation;5>h&&(h=5,e/=3);for(var la=b(a-this.lastX)*d/h,b=b(c- +this.lastY)*f/h,d=d/g,f=f/g,g=0;ge+p?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,k=a.y,p=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=p*Math.max(0, -Math.min(1,f)),k=[new mxPoint(e+f,k),new mxPoint(e+p-f,k),new mxPoint(e+p,k+m),new mxPoint(e,k+m),new mxPoint(e+f,k)]):c==mxConstants.DIRECTION_WEST?(f=p*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+p,k),new mxPoint(e+p-f,k+m),new mxPoint(e+f,k+m),new mxPoint(e,k)]):c==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k+f),new mxPoint(e+p,k),new mxPoint(e+p,k+m),new mxPoint(e,k+m-f),new mxPoint(e,k+f)]):(f=m*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+ -p,k+f),new mxPoint(e+p,k+m-f),new mxPoint(e,k+m),new mxPoint(e,k)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.xe+p?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f=t.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,p=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION, -mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+k-f,e),new mxPoint(g+k,a),new mxPoint(g+k-f,e+p),new mxPoint(g,e+p),new mxPoint(g+f,a),new mxPoint(g,e)]):c==mxConstants.DIRECTION_WEST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k,e),new mxPoint(g+k-f,a),new mxPoint(g+k,e+p),new mxPoint(g+f,e+p),new mxPoint(g,a),new mxPoint(g+f,e)]):c==mxConstants.DIRECTION_NORTH?(f=p*Math.max(0, -Math.min(1,f)),e=[new mxPoint(g,e+f),new mxPoint(m,e),new mxPoint(g+k,e+f),new mxPoint(g+k,e+p),new mxPoint(m,e+p-f),new mxPoint(g,e+p),new mxPoint(g,e+f)]):(f=p*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(m,e+f),new mxPoint(g+k,e),new mxPoint(g+k,e+p-f),new mxPoint(m,e+p),new mxPoint(g,e+p-f),new mxPoint(g,e)]);m=new mxPoint(m,a);d&&(b.xg+k?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(e,m,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2= -function(a,c,b,d){var f=y.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,p=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=p*Math.max(0,Math.min(1,f)),e=[new mxPoint(m,e),new mxPoint(g+k,e+f),new mxPoint(g+k,e+p-f),new mxPoint(m,e+p),new mxPoint(g,e+p-f),new mxPoint(g,e+f),new mxPoint(m, -e)]):(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k-f,e),new mxPoint(g+k,a),new mxPoint(g+k-f,e+p),new mxPoint(g+f,e+p),new mxPoint(g,a),new mxPoint(g+f,e)]);m=new mxPoint(m,a);d&&(b.xg+k?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(e,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(J,mxShape);J.prototype.size=10;J.prototype.paintBackground=function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)); -a.translate(c,b);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=J;mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.inset=2;S.prototype.paintBackground=function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,g+e);a.lineTo(d/2,f);a.end();a.stroke(); -a.begin();a.moveTo((d-g)/2-e,g/2);a.quadTo((d-g)/2-e,g+e,d/2,g+e);a.quadTo((d+g)/2+e,g+e,(d+g)/2+e,g/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=S;mxUtils.extend(K,mxCylinder);K.prototype.jettyWidth=32;K.prototype.jettyHeight=12;K.prototype.redrawPath=function(a,c,b,d,f,g){var e=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=e/2;var e=b+e/2,k=.3*f-c/2,p=.7*f-c/2;g?(a.moveTo(b, -k),a.lineTo(e,k),a.lineTo(e,k+c),a.lineTo(b,k+c),a.moveTo(b,p),a.lineTo(e,p),a.lineTo(e,p+c),a.lineTo(b,p+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(b,p),a.lineTo(b,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(b,k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=K;mxUtils.extend(M,mxDoubleEllipse);M.prototype.outerStroke=!0;M.prototype.paintVertexShape=function(a,c,b,d,f){var g=Math.min(4,Math.min(d/5,f/5)); +mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",x.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var g=f.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));var h=a.x,e=a.y, +p=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(g=m*Math.max(0,Math.min(1,g)),e=[new mxPoint(h,e),new mxPoint(h+p,e+g),new mxPoint(h+p,e+m),new mxPoint(h,e+m-g),new mxPoint(h,e)]):(g=p*Math.max(0,Math.min(1,g)),e=[new mxPoint(h+g,e),new mxPoint(h+p,e),new mxPoint(h+p-g,e+m),new mxPoint(h,e+m),new mxPoint(h+g,e)]);m=a.getCenterX();a=a.getCenterY(); +a=new mxPoint(m,a);d&&(b.xh+p?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(e,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var h=a.x,e=a.y,p=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=p*Math.max(0, +Math.min(1,f)),e=[new mxPoint(h+f,e),new mxPoint(h+p-f,e),new mxPoint(h+p,e+m),new mxPoint(h,e+m),new mxPoint(h+f,e)]):c==mxConstants.DIRECTION_WEST?(f=p*Math.max(0,Math.min(1,f)),e=[new mxPoint(h,e),new mxPoint(h+p,e),new mxPoint(h+p-f,e+m),new mxPoint(h+f,e+m),new mxPoint(h,e)]):c==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),e=[new mxPoint(h,e+f),new mxPoint(h+p,e),new mxPoint(h+p,e+m),new mxPoint(h,e+m-f),new mxPoint(h,e+f)]):(f=m*Math.max(0,Math.min(1,f)),e=[new mxPoint(h,e),new mxPoint(h+ +p,e+f),new mxPoint(h+p,e+m-f),new mxPoint(h,e+m),new mxPoint(h,e)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.xh+p?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(e,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f=t.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,h=a.y,e=a.width,p=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION, +mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=e*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(g+e-f,h),new mxPoint(g+e,a),new mxPoint(g+e-f,h+p),new mxPoint(g,h+p),new mxPoint(g+f,a),new mxPoint(g,h)]):c==mxConstants.DIRECTION_WEST?(f=e*Math.max(0,Math.min(1,f)),h=[new mxPoint(g+f,h),new mxPoint(g+e,h),new mxPoint(g+e-f,a),new mxPoint(g+e,h+p),new mxPoint(g+f,h+p),new mxPoint(g,a),new mxPoint(g+f,h)]):c==mxConstants.DIRECTION_NORTH?(f=p*Math.max(0, +Math.min(1,f)),h=[new mxPoint(g,h+f),new mxPoint(m,h),new mxPoint(g+e,h+f),new mxPoint(g+e,h+p),new mxPoint(m,h+p-f),new mxPoint(g,h+p),new mxPoint(g,h+f)]):(f=p*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(m,h+f),new mxPoint(g+e,h),new mxPoint(g+e,h+p-f),new mxPoint(m,h+p),new mxPoint(g,h+p-f),new mxPoint(g,h)]);m=new mxPoint(m,a);d&&(b.xg+e?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(h,m,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2= +function(a,c,b,d){var f=y.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,h=a.y,e=a.width,p=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=p*Math.max(0,Math.min(1,f)),h=[new mxPoint(m,h),new mxPoint(g+e,h+f),new mxPoint(g+e,h+p-f),new mxPoint(m,h+p),new mxPoint(g,h+p-f),new mxPoint(g,h+f),new mxPoint(m, +h)]):(f=e*Math.max(0,Math.min(1,f)),h=[new mxPoint(g+f,h),new mxPoint(g+e-f,h),new mxPoint(g+e,a),new mxPoint(g+e-f,h+p),new mxPoint(g+f,h+p),new mxPoint(g,a),new mxPoint(g+f,h)]);m=new mxPoint(m,a);d&&(b.xg+e?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(h,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(J,mxShape);J.prototype.size=10;J.prototype.paintBackground=function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)); +a.translate(c,b);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=J;mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.inset=2;S.prototype.paintBackground=function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,g+h);a.lineTo(d/2,f);a.end();a.stroke(); +a.begin();a.moveTo((d-g)/2-h,g/2);a.quadTo((d-g)/2-h,g+h,d/2,g+h);a.quadTo((d+g)/2+h,g+h,(d+g)/2+h,g/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=S;mxUtils.extend(K,mxCylinder);K.prototype.jettyWidth=32;K.prototype.jettyHeight=12;K.prototype.redrawPath=function(a,c,b,d,f,g){var h=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=h/2;var h=b+h/2,e=.3*f-c/2,p=.7*f-c/2;g?(a.moveTo(b, +e),a.lineTo(h,e),a.lineTo(h,e+c),a.lineTo(b,e+c),a.moveTo(b,p),a.lineTo(h,p),a.lineTo(h,p+c),a.lineTo(b,p+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(b,p),a.lineTo(b,e+c),a.lineTo(0,e+c),a.lineTo(0,e),a.lineTo(b,e),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=K;mxUtils.extend(M,mxDoubleEllipse);M.prototype.outerStroke=!0;M.prototype.paintVertexShape=function(a,c,b,d,f){var g=Math.min(4,Math.min(d/5,f/5)); 0/g,"\n"));var f=document.createElement("div");f.innerHTML=c;c=mxUtils.extractTextWithWhitespace(f.childNodes);d.cellLabelChanged(a.cell,c)}else c=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"
")),d.cellLabelChanged(a.cell,d.sanitizeHtml(c));d.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}}); this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=d.getView().getState(d.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0this.maxAutosaveRevisionDelay}; DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border= "1px solid #000000");f.appendChild(c)}f.innerHTML="";for(var b=0;b'),c.writeln(a.editor.fontCss),c.writeln(""))};if("undefined"!==typeof MathJax){var x=b.renderPage;b.renderPage=function(a,c,b,d,f,g){var e=x.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}b.open(null,null,f,!0)}else{p=c.background;if(null== -p||""==p||p==mxConstants.NONE)p="#ffffff";b.backgroundColor=p;b.autoOrigin=q;b.appendGraph(c,m,e,k,f,!0)}return b}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value="100 %");var d=.75*d,g=w.value,e=l.value,k=!q.checked,m=null;k&&(k=g==p&&e==p);if(!k&&null!=a.pages&&a.pages.length){var t=0,k=a.pages.length-1;q.checked||(t=parseInt(g)-1,k=parseInt(e)-1);for(var h=t;h<=k;h++){var x=a.pages[h],g=x==a.currentPage?f:null;if(null==g){var g=a.createTemporaryGraph(f.getStylesheet()),e=!0,t=!1,A=null,n=null; +var q=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,g,e,p,m,k){if(null!=b&&null==mxMarker.markers[b]){var h=this.getPackageForType(b);null!=h&&mxStencilRegistry.getStencil(h)}return q.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){l.value=Math.max(1,Math.min(h,Math.max(parseInt(l.value),parseInt(w.value))));w.value=Math.max(1,Math.min(h,Math.min(parseInt(l.value),parseInt(w.value))))}function d(c){function b(c,b,f){var g=c.getGraphBounds(),e=0,h=0, +p=T.get(),m=1/c.pageScale,q=K.checked;if(q)var m=parseInt(O.value),t=parseInt(X.value),m=Math.min(p.height*t/(g.height/c.view.scale),p.width*m/(g.width/c.view.scale));else m=parseInt(u.value)/(100*c.pageScale),isNaN(m)&&(d=1/c.pageScale,u.value="100 %");p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*d);p.height=Math.ceil(p.height*d);m*=d;!q&&c.pageVisible?(g=c.getPageLayout(),e-=g.x*p.width,h-=g.y*p.height):q=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,p,0,e,h,q);b.pageSelector= +!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('"))};if("undefined"!==typeof MathJax){var x=b.renderPage;b.renderPage=function(a,c,b,d,f,g){var e=x.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}b.open(null,null,f,!0)}else{p=c.background;if(null== +p||""==p||p==mxConstants.NONE)p="#ffffff";b.backgroundColor=p;b.autoOrigin=q;b.appendGraph(c,m,e,h,f,!0)}return b}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value="100 %");var d=.75*d,g=w.value,e=l.value,h=!q.checked,m=null;h&&(h=g==p&&e==p);if(!h&&null!=a.pages&&a.pages.length){var t=0,h=a.pages.length-1;q.checked||(t=parseInt(g)-1,h=parseInt(e)-1);for(var k=t;k<=h;k++){var x=a.pages[k],g=x==a.currentPage?f:null;if(null==g){var g=a.createTemporaryGraph(f.getStylesheet()),e=!0,t=!1,A=null,n=null; null==x.viewState&&null==x.mapping&&null==x.root&&a.updatePageRoot(x);null!=x.viewState?(e=x.viewState.pageVisible,t=x.viewState.mathEnabled,A=x.viewState.background,n=x.viewState.backgroundImage):null!=x.mapping&&null!=x.mapping.diagramMap&&(t="0"!=x.mapping.diagramMap.get("mathEnabled"),A=x.mapping.diagramMap.get("background"),n=x.mapping.diagramMap.get("backgroundImage"),n=null!=n&&0'),k.writeln("MathJax.Hub.Config({"),k.writeln('messageStyle: "none",'),k.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'), -k.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),k.writeln("TeX: {"),k.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),k.writeln("},"),k.writeln("tex2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("},"),k.writeln("asciimath2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("}"),k.writeln("});"),c&&(k.writeln("MathJax.Hub.Queue(function () {"),k.writeln("window.print();"),k.writeln("});")),k.writeln("\x3c/script>"), -k.writeln('