diff --git a/ChangeLog b/ChangeLog index d094866b..eddcbb60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +14-JUN-2018: 8.8.0 + +- Fixes label link detection cases in Firefox + 13-JUN-2018: 8.7.10 - Fixes possible NPE in Electron diff --git a/VERSION b/VERSION index f5d7adff..cfc27b4f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.7.10 \ No newline at end of file +8.8.0 \ No newline at end of file diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index 65c5400e..575e58e2 100644 --- a/src/main/webapp/cache.manifest +++ b/src/main/webapp/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 06/13/2018 03:46 PM +# 06/14/2018 12:58 PM app.html index.html?offline=1 @@ -12,6 +12,7 @@ js/app.min.js js/shapes.min.js js/stencils.min.js js/extensions.min.js +js/diagramly/ElectronApp.js styles/grapheditor.css styles/atlas.css styles/dark.css diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 3c95b9c6..7e5c289c 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -2081,7 +2081,7 @@ EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipb !1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var e=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){e.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20; EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width, this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),k=a.view.translate,h=a.view.scale,l=mxRectangle.fromRectangle(f); -l.x=l.x/h-k.x;l.y=l.y/h-k.y;l.width/=h;l.height/=h;var k=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):h;c=(p-b*l.width)/2/b;var r=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),r=Math.max(r,0));if(g||f.width/g,"\n"));var f=document.createElement("div");f.innerHTML=e;e=mxUtils.extractTextWithWhitespace(f.childNodes);b.cellLabelChanged(a.cell,e)}else e=mxUtils.htmlEntities(b.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,"
")),b.cellLabelChanged(a.cell,b.sanitizeHtml(e)); -b.setCellStyles("html",d);c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=b.getView().getState(b.getSelectionCell()),c="wrap";b.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);b.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",function(){var a="0",d=b.getView().getState(b.getSelectionCell()); +!0);b.getModel().beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{b.getModel().endUpdate()}b.setSelectionCell(d);b.scrollCellToVisible(b.getSelectionCell())}})}).isEnabled=f;this.addAction("link...",mxUtils.bind(this,function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var b=a.getSelectedElement(),d=a.getParentByName(b,"A",a.cellEditor.textarea),e="";if(null==d)for(var f=b.getElementsByTagName("a"),k=0;k/g,"\n"));var f=document.createElement("div");f.innerHTML=e;e=mxUtils.extractTextWithWhitespace(f.childNodes);b.cellLabelChanged(a.cell,e)}else e=mxUtils.htmlEntities(b.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,"
")),b.cellLabelChanged(a.cell, +b.sanitizeHtml(e));b.setCellStyles("html",d);c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=b.getView().getState(b.getSelectionCell()),c="wrap";b.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);b.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",function(){var a="0",d=b.getView().getState(b.getSelectionCell()); null!=d&&(a=d.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(c,a,mxResources.get("apply"),function(a){null!=a&&0'; +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,d){d.ui=a.ui;return c};a.afterDecode=function(a,c,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.8.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml=''; 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.svgBrokenImage=Graph.createSvgImage(10,10,'');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;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;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(u){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport= @@ -7379,26 +7379,26 @@ atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e "%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.addListener("customLinkClicked",function(b,c){a.handleCustomLink(c.getProperty("href"))}); this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var c=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var d=0;dthis.resampleThreshold?this.confirmImageResize(function(a){l=a;n()},mxEvent.isControlDown(a)): -n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k, +360,null!=a.pages&&1this.resampleThreshold?this.confirmImageResize(function(a){l= +a;n()},mxEvent.isControlDown(a)):n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k, f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0document.documentMode)&&(v=80);e+=v;c+=v;var d=e,f=c,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),r=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),u=Math.max(1,Math.round((g-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,g-64);0m.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=u+14+"px",l.style.left=r+e+38-v+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click", -mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){g=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=g+"px";r=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));u=Math.max(1,Math.round((g-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c= -Math.min(f,g-64);var q=this.getPosition(r,u,e,c);r=q.x;u=q.y;m.style.left=r+"px";m.style.top=u+"px";m.style.width=e+"px";m.style.height=c+"px";!t&&b.clientHeight>m.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=u+14+"px",this.dialogImg.style.left=r+e+38-v+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=n;this.container=m;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white"; +function Dialog(a,b,e,c,k,l,p,r){var v=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(v=80);e+=v;c+=v;var d=e,f=c,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),t=Math.max(1,Math.round((g-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,g-64);0n.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=t+14+"px",l.style.left=m+e+38-v+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click", +mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){g=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=g+"px";m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));t=Math.max(1,Math.round((g-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c= +Math.min(f,g-64);var q=this.getPosition(m,t,e,c);m=q.x;t=q.y;n.style.left=m+"px";n.style.top=t+"px";n.style.width=e+"px";n.style.height=c+"px";!r&&b.clientHeight>n.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=t+14+"px",this.dialogImg.style.left=m+e+38-v+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=n;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white"; Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; @@ -2000,30 +2000,30 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+ "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; var PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var c=t.checked||d.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,r=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,u=1/e.pageScale;if(c){var p=t.checked?1:parseInt(f.value);isNaN(p)||(u=mxUtils.getScaleForPageCount(p,e,r))}e.getGraphBounds();var k=p=0,r=mxRectangle.fromRectangle(r);r.width=Math.ceil(r.width*b);r.height=Math.ceil(r.height*b);u*=b;!c&&e.pageVisible?(b=e.getPageLayout(),p-=b.x*r.width,k-=b.y*r.height): -c=!0;c=PrintDialog.createPrintPreview(e,u,r,0,p,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var n=document.createElement("tbody");c=document.createElement("tr");var t=document.createElement("input");t.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(t);var v=document.createElement("span");mxUtils.write(v," "+mxResources.get("fitPage")); -k.appendChild(v);mxEvent.addListener(v,"click",function(a){t.checked=!t.checked;d.checked=!t.checked;mxEvent.consume(a)});mxEvent.addListener(t,"change",function(){d.checked=!t.checked});c.appendChild(k);n.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("posterPrint")+":");k.appendChild(v);mxEvent.addListener(v, -"click",function(a){d.checked=!d.checked;t.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);n.appendChild(c);mxEvent.addListener(d,"change", -function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");t.checked=!d.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);c.appendChild(k);n.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2; -k.style.paddingTop="20px";k.setAttribute("align","right");v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst&&k.appendChild(v);if(PrintDialog.previewEnabled){var r=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});r.className="geBtn";k.appendChild(r)}r=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});r.className="geBtn gePrimaryBtn";k.appendChild(r);a.editor.cancelFirst|| -k.appendChild(v);c.appendChild(k);n.appendChild(c);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,c,k,l,n){b=new mxPrintPreview(a,b,e,c,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 t=b.writeHead;b.writeHead=function(a){t.apply(this,arguments);a.writeln('")};return b}; +PrintDialog.prototype.create=function(a){function b(a){var c=r.checked||d.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,m=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,t=1/e.pageScale;if(c){var u=r.checked?1:parseInt(f.value);isNaN(u)||(t=mxUtils.getScaleForPageCount(u,e,m))}e.getGraphBounds();var k=u=0,m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*b);m.height=Math.ceil(m.height*b);t*=b;!c&&e.pageVisible?(b=e.getPageLayout(),u-=b.x*m.width,k-=b.y*m.height): +c=!0;c=PrintDialog.createPrintPreview(e,t,m,0,u,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");c=document.createElement("tr");var r=document.createElement("input");r.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(r);var v=document.createElement("span");mxUtils.write(v," "+mxResources.get("fitPage")); +k.appendChild(v);mxEvent.addListener(v,"click",function(a){r.checked=!r.checked;d.checked=!r.checked;mxEvent.consume(a)});mxEvent.addListener(r,"change",function(){d.checked=!r.checked});c.appendChild(k);p.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("posterPrint")+":");k.appendChild(v);mxEvent.addListener(v, +"click",function(a){d.checked=!d.checked;r.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);p.appendChild(c);mxEvent.addListener(d,"change", +function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");r.checked=!d.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);c.appendChild(k);p.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2; +k.style.paddingTop="20px";k.setAttribute("align","right");v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst&&k.appendChild(v);if(PrintDialog.previewEnabled){var m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});m.className="geBtn";k.appendChild(m)}m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});m.className="geBtn gePrimaryBtn";k.appendChild(m);a.editor.cancelFirst|| +k.appendChild(v);c.appendChild(k);p.appendChild(c);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}; +PrintDialog.createPrintPreview=function(a,b,e,c,k,l,p){b=new mxPrintPreview(a,b,e,c,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var 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?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function e(){null==u?(r.removeAttribute("title"),r.style.fontSize="",r.innerHTML=mxResources.get("change")+"..."):(r.setAttribute("title",u.src),r.style.fontSize="11px",r.innerHTML=u.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,n=document.createElement("table");n.style.width= -"100%";n.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var v=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);t.appendChild(k);k=document.createElement("tr");l=document.createElement("td"); +var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function e(){null==t?(m.removeAttribute("title"),m.style.fontSize="",m.innerHTML=mxResources.get("change")+"..."):(m.setAttribute("title",t.src),m.style.fontSize="11px",m.innerHTML=t.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,p=document.createElement("table");p.style.width= +"100%";p.style.height="100%";var r=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var v=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);r.appendChild(k);k=document.createElement("tr");l=document.createElement("td"); mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var f=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(d)}); -l.appendChild(d);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=c.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(l);t.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+ -":");k.appendChild(l);l=document.createElement("td");var r=document.createElement("a");r.style.textDecoration="underline";r.style.cursor="pointer";r.style.color="#a0a0a0";var u=c.backgroundImage;mxEvent.addListener(r,"click",function(d){a.showBackgroundImageDialog(function(a){u=a;e()});mxEvent.consume(d)});e();l.appendChild(r);k.appendChild(l);t.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==g.value&&c.setGridSize(parseInt(g.value));var d=new ChangePageSetup(a,f,u,v.get());d.ignoreColor=c.background==f;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=u?u.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&& -d.ignoreColor&&d.ignoreImage||c.model.execute(d)});m.className="geBtn gePrimaryBtn";l.appendChild(m);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);t.appendChild(k);n.appendChild(t);this.container=n}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,d,c){if(c||g!=document.activeElement&&r!=document.activeElement){a=!1;for(d=0;d'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,b){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+c,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+b,f))+"px";d.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,c,d){var b=this.view.scale,g=this.view.translate,e=this.pageFormat,u=b*this.pageScale,h=this.view.getBackgroundPageBounds();c=h.width;d=h.height;var m= -new mxRectangle(b*g.x,b*g.y,e.width*u,e.height*u),q=(a=a&&Math.min(m.width,m.height)>this.minPageBreakDist)?Math.ceil(d/m.height)-1:0,w=a?Math.ceil(c/m.width)-1:0,p=h.x+c,k=h.y+d;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(d/n.height)-1:0,w=a?Math.ceil(c/n.width)-1:0,u=h.x+c,k=h.y+d;null==this.horizontalPageBreaks&&0document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);mxClient.IS_SVG&&null!=c.view.getDrawPane()&&(b=c.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons(); -mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==r)this.toolbar.createTextToolbar();else{for(var h=0;hmxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==m)this.toolbar.createTextToolbar();else{for(var h=0;hmxUtils.indexOf(p,y[a])&&p.push(y[a]);var E=function(a,d){var b=c.getModel(); -b.beginUpdate();try{if(d)for(var f=b.isEdge(h),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;emxUtils.indexOf(y,A))||(v=mxUtils.setStyle(v,A,J))}b.setStyle(h,v)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){E(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){E(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT, -function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));E(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0mxUtils.indexOf(u,y[a])&&u.push(y[a]);var C=function(a,d){var b=c.getModel(); +b.beginUpdate();try{if(d)for(var f=b.isEdge(h),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;emxUtils.indexOf(y,z))||(v=mxUtils.setStyle(v,z,H))}b.setStyle(h,v)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){C(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){C(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT, +function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));C(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.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 d=mxUtils.getOffset(a.container),c=0,f=0;null!=D&&(c=a.container.offsetWidth/2-D.x+d.x,f=a.container.offsetHeight/2-D.y+d.y);d=this.view.scale; +this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var E=null;a.lazyZoom=function(d){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);d?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= +(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var d=mxUtils.getOffset(a.container),c=0,f=0;null!=E&&(c=a.container.offsetWidth/2-E.x+d.x,f=a.container.offsetHeight/2-E.y+d.y);d=this.view.scale; this.zoom(this.cumulativeZoomFactor);this.view.scale!=d&&(null!=b&&e.chromelessResize(!1,null,c*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==c&&0==f||(a.container.scrollLeft-=c*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b){if((null==this.dialogs||0==this.dialogs.length)&& -a.isZoomWheelEvent(d))for(var c=mxEvent.getSource(d);null!=c;){if(c==a.container){D=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d));a.lazyZoom(b);mxEvent.consume(d);break}c=c.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; +a.isZoomWheelEvent(d))for(var c=mxEvent.getSource(d);null!=c;){if(c==a.container){E=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d));a.lazyZoom(b);mxEvent.consume(d);break}c=c.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a}; EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&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 b=document.createElement("div");b.className=a;return b}; -EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=n){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,t+(b?g.x-n.x:n.y-g.y)-e));mxEvent.consume(a);t!=f()&&(v=!0,d=null)}}function l(a){k(a);n=t=null}var n=null,t=null,v=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){n=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));t=f();v=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!v){var b=null!=d?d-e:0;d=f();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,n){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,n);this.dialogs.push(this.dialog)}; +EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=p){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,r+(b?g.x-p.x:p.y-g.y)-e));mxEvent.consume(a);r!=f()&&(v=!0,d=null)}}function l(a){k(a);p=r=null}var p=null,r=null,v=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));r=f();v=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!v){var b=null!=d?d-e:0;d=f();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,p){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,p);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(c),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(c.getModel().endUpdate(),null!=e&&e())}}}; -EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var k=c.saveSelection(),l=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=l&&0f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this); -this.getRubberband=function(){return g};var r=(new Date).getTime(),u=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(r=(new Date).getTime(),u=0):u=(new Date).getTime()-r};var m=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3=a&&u.y+u.height<=q&&u.y>=d&&u.x+u.width<=h&&e.push(m);this.getAllCells(a,d,b,c,m,e)}}}return e};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:A.apply(this, +this.getRubberband=function(){return g};var m=(new Date).getTime(),t=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(m=(new Date).getTime(),t=0):t=(new Date).getTime()-m};var n=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3=a&&t.y+t.height<=m&&t.y>=d&&t.x+t.width<=h&&g.push(n);this.getAllCells(a,d,b,c,n,g)}}}return g};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:z.apply(this, arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var G=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();G=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),g.start(b.x,b.y)):null!=G?this.addSelectionCells(G):1'+e+""));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null; Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400); Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1; -Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,n=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),t=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0m?"a":"p",tt:12>m?"am":"pm",T:12>m?"A":"P",TT:12>m?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var n=k.substring(1,k.length-1);if(0>n.indexOf("{"))for(var t=a;null==l&&null!=t;)null!=t.value&&"object"==typeof t.value&&(l=t.hasAttribute(n)?null!=t.getAttribute(n)?t.getAttribute(n):"":null),t=this.model.getParent(t);null==l&&(l=this.getGlobalVariable(n))}e.push(b.substring(c, +!0);e.appendChild(k);var r=c.value||mxResources.get("background")||"Background";e.setAttribute("title",r);mxUtils.write(e,r);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a}; +Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var r=a;null==l&&null!=r;)null!=r.value&&"object"==typeof r.value&&(l=r.hasAttribute(p)?null!=r.getAttribute(p)?r.getAttribute(p):"":null),r=this.model.getParent(r);null==l&&(l=this.getGlobalVariable(p))}e.push(b.substring(c, match.index)+(null!=l?l:k));c=match.index+k.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; -Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!1;var 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 t=this.view.scale,v=this.view.translate,d=v.x*t,v=v.y*t;this.model.isVertex(e.cell)&&(d=e.x,v=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(c)&&!k?null:this.getCellAt(d+n.x*t,v+n.y*t);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),t=this.view.getState(l),null!=e&&null!=t&&mxUtils.intersects(e,t)&&(l= -null));if(k=!mxEvent.isShiftDown(c)||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{t=l;if(null==t&&k){for(var d=a,f=this.getCellGeometry(a);null!= -f&&f.relative;)d=this.getModel().getParent(d),f=this.getCellGeometry(d);var g=this.view.getState(d),r=null!=g?g.style:this.getCellStyle(d);if(mxUtils.getValue(r,"part",!1)){var u=this.model.getParent(d);this.model.isVertex(u)&&(d=u)}t=this.duplicateCells([d],!1)[0];f=this.getCellGeometry(t);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 h=mxEvent.isControlDown(c)&&k||null==l&&null!=f&&f.constructor==mxStackLayout? -null:this.insertEdge(this.model.getParent(a),null,"",a,t,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var m=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=h.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==h.parent&&(m=c.parent.getIndex(c),this.model.add(c.parent,h,m))}null==l&&null!=t&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(m=a.parent.getIndex(a),this.model.add(a.parent, -t,m));null!=h&&e.push(h);null==l&&null!=t&&e.push(t);null==t&&null!=h&&h.geometry.setTerminalPoint(n,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e}; +Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a)); +var r=this.view.scale,v=this.view.translate,d=v.x*r,v=v.y*r;this.model.isVertex(e.cell)&&(d=e.x,v=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(d+p.x*r,v+p.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(c)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{r=l;if(null==r&&k){for(var d=a,f=this.getCellGeometry(a);null!= +f&&f.relative;)d=this.getModel().getParent(d),f=this.getCellGeometry(d);var g=this.view.getState(d),m=null!=g?g.style:this.getCellStyle(d);if(mxUtils.getValue(m,"part",!1)){var t=this.model.getParent(d);this.model.isVertex(t)&&(d=t)}r=this.duplicateCells([d],!1)[0];f=this.getCellGeometry(r);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(c)&&k||null==l&&null!=f&&f.constructor==mxStackLayout? +null:this.insertEdge(this.model.getParent(a),null,"",a,r,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var n=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=h.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==h.parent&&(n=c.parent.getIndex(c),this.model.add(c.parent,h,n))}null==l&&null!=r&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(n=a.parent.getIndex(a),this.model.add(a.parent, +r,n));null!=h&&e.push(h);null==l&&null!=r&&e.push(r);null==r&&null!=h&&h.geometry.setTerminalPoint(p,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,c;for(c in this.model.cells)if(e=this.model.cells[c],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0u||Math.abs(p.y-n.y)>u)&&(Math.abs(p.x-l.x)>u||Math.abs(p.y-l.y)>u)){l=p.x-q.x;n=p.y-q.y;p={distSq:l*l+n*n,x:p.x,y:p.y};for(l=0;lp.distSq){w.splice(l,0,p);p=null;break}null==p||0!=w.length&&w[w.length-1].x===p.x&&w[w.length-1].y===p.y||w.push(p)}}}for(t=0;tf*f&&0f*f&&(l=new mxPoint(A.x-p.x,A.y-p.y),t=new mxPoint(A.x+p.x,A.y+p.y),h.push(l),this.addPoints(a,h,b,c,!1, -null,m),h=0>Math.round(p.x)||0==Math.round(p.x)&&0>=Math.round(p.y)?1:-1,m=!1,"sharp"==e?(a.lineTo(l.x-p.y*h,l.y+p.x*h),a.lineTo(t.x-p.y*h,t.y+p.x*h),a.lineTo(t.x,t.y)):"arc"==e?(h*=1.3,a.curveTo(l.x-p.y*h,l.y+p.x*h,t.x-p.y*h,t.y+p.x*h,t.x,t.y)):(a.moveTo(t.x,t.y),m=!0),h=[t],l=!0))}else p=null;l||(h.push(A),q=A)}this.addPoints(a,h,b,c,!1,null,m);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null== -a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=g)var q=Math.cos(-g),w=Math.sin(-g),f=mxUtils.getRotatedPoint(f,q,w,m);q=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);q+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| -0);f=this.getPerimeterPoint(d,f,0==g&&e,q);0!=g&&(q=Math.cos(g),w=Math.sin(g),f=mxUtils.getRotatedPoint(f,q,w,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;if(null!=a)for(var f=0;ft||Math.abs(u.y-p.y)>t)&&(Math.abs(u.x-l.x)>t||Math.abs(u.y-l.y)>t)){l=u.x-q.x;p=u.y-q.y;u={distSq:l*l+p*p,x:u.x,y:u.y};for(l=0;lu.distSq){w.splice(l,0,u);u=null;break}null==u||0!=w.length&&w[w.length-1].x===u.x&&w[w.length-1].y===u.y||w.push(u)}}}for(r=0;rf*f&&0f*f&&(l=new mxPoint(z.x-u.x,z.y-u.y),r=new mxPoint(z.x+u.x,z.y+u.y),h.push(l),this.addPoints(a,h,b,c,!1, +null,n),h=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,n=!1,"sharp"==e?(a.lineTo(l.x-u.y*h,l.y+u.x*h),a.lineTo(r.x-u.y*h,r.y+u.x*h),a.lineTo(r.x,r.y)):"arc"==e?(h*=1.3,a.curveTo(l.x-u.y*h,l.y+u.x*h,r.x-u.y*h,r.y+u.x*h,r.x,r.y)):(a.moveTo(r.x,r.y),n=!0),h=[r],l=!0))}else u=null;l||(h.push(z),q=z)}this.addPoints(a,h,b,c,!1,null,n);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null== +a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=g)var q=Math.cos(-g),w=Math.sin(-g),f=mxUtils.getRotatedPoint(f,q,w,n);q=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);q+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]|| +0);f=this.getPerimeterPoint(d,f,0==g&&e,q);0!=g&&(q=Math.cos(g),w=Math.sin(g),f=mxUtils.getRotatedPoint(f,q,w,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;if(null!=a)for(var f=0;f=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}; +mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;bd&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint= @@ -2356,11 +2356,11 @@ d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMou return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&& (b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style, mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT; this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b), this.isSpaceEvent(d)?(c=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width=this.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)),d.consume()}};var h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);h.apply(this, -arguments)};var m=(new Date).getTime(),q=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){w.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),q=0):q=(new Date).getTime()-m;this.currentTerminalState=b};var p=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,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b), +arguments)};var n=(new Date).getTime(),q=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){w.apply(this,arguments);b!=this.currentTerminalState?(n=(new Date).getTime(),q=0):q=(new Date).getTime()-n;this.currentTerminalState=b};var u=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,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b), f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE? -HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var D=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return D.apply(this, -arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):A.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown; +HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var E=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return E.apply(this, +arguments)};var z=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):z.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown; mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&G.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},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var g=Math.round(e/10),la=this.defaultVariation;5>g&&(g=5,la/=3);for(var h=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;eg+q?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f= -mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,q=a.width,p=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=q*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+q-f,h),new mxPoint(e+q,h+p),new mxPoint(e,h+p),new mxPoint(e+f,h)]):d==mxConstants.DIRECTION_WEST?(f=q*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+q,h),new mxPoint(e+q-f,h+p),new mxPoint(e+f,h+p),new mxPoint(e, -h)]):d==mxConstants.DIRECTION_NORTH?(f=p*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+q,h),new mxPoint(e+q,h+p),new mxPoint(e,h+p-f),new mxPoint(e,h+f)]):(f=p*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+q,h+f),new mxPoint(e+q,h+p-f),new mxPoint(e,h+p),new mxPoint(e,h)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(b.xe+q?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter); -mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?p.prototype.fixedSize:p.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,q=a.width,m=a.height,r=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(q,e)):q*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+q- -f,h),new mxPoint(g+q,a),new mxPoint(g+q-f,h+m),new mxPoint(g,h+m),new mxPoint(g+f,a),new mxPoint(g,h)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(q,e)):q*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+q,h),new mxPoint(g+q-f,a),new mxPoint(g+q,h+m),new mxPoint(g+f,h+m),new mxPoint(g,a),new mxPoint(g+f,h)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(r,h),new mxPoint(g+q,h+f),new mxPoint(g+q, -h+m),new mxPoint(r,h+m-f),new mxPoint(g,h+m),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(r,h+f),new mxPoint(g+q,h),new mxPoint(g+q,h+m-f),new mxPoint(r,h+m),new mxPoint(g,h+m-f),new mxPoint(g,h)]);r=new mxPoint(r,a);c&&(b.xg+q?r.y=b.y:r.x=b.x);return mxUtils.getPerimeterPoint(h,r,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=y.prototype.size;null!= -d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,h=a.width,q=a.height,p=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=q*Math.max(0,Math.min(1,f)),g=[new mxPoint(p,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+q-f),new mxPoint(p,g+q),new mxPoint(e,g+q-f),new mxPoint(e,g+f),new mxPoint(p,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+ -f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+q),new mxPoint(e+f,g+q),new mxPoint(e,a),new mxPoint(e+f,g)]);p=new mxPoint(p,a);c&&(b.xe+h?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(g,p,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(I,mxShape);I.prototype.size=10;I.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke(); -a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",I);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.inset=2;R.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/ +d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,q=a.width,m=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+ +q,h+e),new mxPoint(g+q,h+m),new mxPoint(g,h+m-e),new mxPoint(g,h)]):(e=q*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+q,h),new mxPoint(g+q-e,h+m),new mxPoint(g,h+m),new mxPoint(g+e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);c&&(b.xg+q?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f= +mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,q=a.width,m=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=q*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+q-f,h),new mxPoint(e+q,h+m),new mxPoint(e,h+m),new mxPoint(e+f,h)]):d==mxConstants.DIRECTION_WEST?(f=q*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+q,h),new mxPoint(e+q-f,h+m),new mxPoint(e+f,h+m),new mxPoint(e, +h)]):d==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+q,h),new mxPoint(e+q,h+m),new mxPoint(e,h+m-f),new mxPoint(e,h+f)]):(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+q,h+f),new mxPoint(e+q,h+m-f),new mxPoint(e,h+m),new mxPoint(e,h)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);c&&(b.xe+q?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter); +mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?u.prototype.fixedSize:u.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,q=a.width,m=a.height,n=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(q,e)):q*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+q- +f,h),new mxPoint(g+q,a),new mxPoint(g+q-f,h+m),new mxPoint(g,h+m),new mxPoint(g+f,a),new mxPoint(g,h)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(q,e)):q*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+q,h),new mxPoint(g+q-f,a),new mxPoint(g+q,h+m),new mxPoint(g+f,h+m),new mxPoint(g,a),new mxPoint(g+f,h)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(n,h),new mxPoint(g+q,h+f),new mxPoint(g+q, +h+m),new mxPoint(n,h+m-f),new mxPoint(g,h+m),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(n,h+f),new mxPoint(g+q,h),new mxPoint(g+q,h+m-f),new mxPoint(n,h+m),new mxPoint(g,h+m-f),new mxPoint(g,h)]);n=new mxPoint(n,a);c&&(b.xg+q?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(h,n,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=y.prototype.size;null!= +d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,h=a.width,q=a.height,m=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=q*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+q-f),new mxPoint(m,g+q),new mxPoint(e,g+q-f),new mxPoint(e,g+f),new mxPoint(m,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+ +f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+q),new mxPoint(e+f,g+q),new mxPoint(e,a),new mxPoint(e+f,g)]);m=new mxPoint(m,a);c&&(b.xe+h?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(g,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(J,mxShape);J.prototype.size=10;J.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke(); +a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",J);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.inset=2;R.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/ 2,e+g);a.quadTo((c+e)/2+g,e+g,(c+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,h=.3*f-d/2,q=.7*f-d/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+d),a.lineTo(b,h+d),a.moveTo(b,q), a.lineTo(g,q),a.lineTo(g,q+d),a.lineTo(b,q+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,q+d),a.lineTo(0,q+d),a.lineTo(0,q),a.lineTo(b,q),a.lineTo(b,h+d),a.lineTo(0,h+d),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(aa,mxDoubleEllipse);aa.prototype.outerStroke=!0;aa.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0/g,"\n"));var f=document.createElement("div");f.innerHTML=d;d=mxUtils.extractTextWithWhitespace(f.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"
")),c.cellLabelChanged(a.cell,c.sanitizeHtml(d)); -c.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=c.getView().getState(c.getSelectionCell()),b="wrap";c.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);c.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=c.getView().getState(c.getSelectionCell()); +!0);c.getModel().beginUpdate();try{d=c.addCell(d),c.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{c.getModel().endUpdate()}c.setSelectionCell(d);c.scrollCellToVisible(c.getSelectionCell())}})}).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=a.getSelectedElement(),d=a.getParentByName(c,"A",a.cellEditor.textarea),f="";if(null==d)for(var e=c.getElementsByTagName("a"),m=0;m/g,"\n"));var f=document.createElement("div");f.innerHTML=d;d=mxUtils.extractTextWithWhitespace(f.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"
")),c.cellLabelChanged(a.cell, +c.sanitizeHtml(d));c.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=c.getView().getState(c.getSelectionCell()),b="wrap";c.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);c.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",e=c.getView().getState(c.getSelectionCell()); null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0'),d.writeln(a.editor.fontCss), -d.writeln(""))};if("undefined"!==typeof MathJax){var k=b.renderPage;b.renderPage=function(a,d,b,c,f,e){var g=k.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{m=d.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=u;b.appendGraph(d,r,g,h,f,!0)}return b}var c=parseInt(T.value)/100;isNaN(c)&&(c=1,T.value="100 %");var c=.75*c,e=k.value,g=w.value,h=!u.checked,r=null; -h&&(h=e==m&&g==m);if(!h&&null!=a.pages&&a.pages.length){var q=0,h=a.pages.length-1;u.checked||(q=parseInt(e)-1,h=parseInt(g)-1);for(var p=q;p<=h;p++){var l=a.pages[p],e=l==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,q=!1,y=null,n=null;null==l.viewState&&null==l.mapping&&null==l.root&&a.updatePageRoot(l);null!=l.viewState?(g=l.viewState.pageVisible,q=l.viewState.mathEnabled,y=l.viewState.background,n=l.viewState.backgroundImage):null!=l.mapping&&null!=l.mapping.diagramMap&& -(q="0"!=l.mapping.diagramMap.get("mathEnabled"),y=l.mapping.diagramMap.get("background"),n=l.mapping.diagramMap.get("backgroundImage"),n=null!=n&&0'),h.writeln("MathJax.Hub.Config({"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln('"HTML-CSS": {'),h.writeln("imageFont: null"),h.writeln("},"),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'), -h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"),h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),d&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('