6.3.0 release

Former-commit-id: 4ba5d56940
This commit is contained in:
Gaudenz Alder 2017-03-11 15:01:55 +01:00
parent d2a546326d
commit ab43eee501
14 changed files with 520 additions and 519 deletions

View file

@ -1,3 +1,9 @@
11-MAR-2017: 6.3.0
- Fixes slashes in branch names for GitHub client
- Fixes order for add selected cells to library
- Fixes order, missing shapes for export selected cells
09-MAR-2017: 6.2.9
- Fixes label offset for export of selected edges

View file

@ -1 +1 @@
6.2.9
6.3.0

View file

@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 03/09/2017 05:50 PM
# 03/11/2017 02:54 PM
app.html
index.html?offline=1

72
war/js/app.min.js vendored
View file

@ -2005,9 +2005,9 @@ a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.f
this.graph.pageBreaksVisible;var c=a.getAttribute("pageWidth"),f=a.getAttribute("pageHeight");null!=c&&null!=f&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(c),parseFloat(f)));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
Editor.prototype.setGraphXml=function(a){if(null!=a){var c=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),c.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var f=c.document.createElement("mxGraphModel");f.appendChild(a);c.decode(f,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),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(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.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,b){c.undoableEditHappened(b.getProperty("edit"))};var f=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),c=a.getModel(),f=[],l=0;l<e.length;l++)(c.isVertex(e[l])||c.isEdge(e[l]))&&null!=a.view.getState(e[l])&&
f.push(e[l]);a.setSelectionCells(f)};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(a,c){this.data=a;this.filename=c;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.data&&(this.cancel(!1),this.consumer(this.data,this.filename))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
@ -2488,13 +2488,13 @@ f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-c.getG
g.click=function(a){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var d=this.getModel(),c=this.gridSize,e=[];d.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var k=d.getParent(a[g]),l=this.moveCells([f[g]],c,c,!1,k)[0];e.push(l);if(b)d.add(k,f[g]);else{var m=k.getIndex(a[g]);d.add(k,f[g],m+1)}}}finally{d.endUpdate()}return e};
Graph.prototype.insertImage=function(a,b,d){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<c.length;f++)e.push(c[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",d);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==d[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var d=[],c=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);
if(null!=g){var k=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;d.push(g)}}if(2<d.length){d.sort(function(b,d){return a?b.x-d.x:b.y-d.y});g=this.view.translate;k=this.view.scale;e=e/k-(a?g.x:g.y);c=c/k-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var l=(c-e)/(d.length-1),c=e,f=1;f<d.length-1;f++){var m=this.getCellGeometry(d[f].cell),c=c+l;null!=m&&(m=m.clone(),a?m.x=Math.round(c-m.width/2):m.y=Math.round(c-m.height/2),this.getModel().setGeometry(d[f].cell,
m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),d=new mxDictionary,c=0;c<a.length;c++)d.put(a[c],!0);for(c=0;c<b.length;c++){var e=this.view.getState(a[c]);if(null!=e){var f=this.getCellGeometry(b[c]);null==f||!f.relative||this.model.isEdge(a[c])||d.get(this.model.getParent(a[c]))||(f.relative=!1,f.x=e.x/e.view.scale-
e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}for(var e=new mxCodec,f=new mxGraphModel,g=f.getChildAt(f.getRoot(),0),c=0;c<a.length;c++)d.get(this.model.getParent(a[c]))||f.add(g,b[c]);return e.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,d,c,e,f,g){b=null!=b?b:1;d=null!=d?d:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=
g?g:!0;var k=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();c=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=c.style?c.style.backgroundColor=a:c.setAttribute("style","background-color:"+a));null==m.createElementNS?(c.setAttribute("xmlns",mxConstants.NS_SVG),c.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/l;c.setAttribute("width",Math.ceil(k.width*a)+2*d+"px");c.setAttribute("height",Math.ceil(k.height*a)+2*d+"px");c.setAttribute("version","1.1");var n=c;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),c.appendChild(n));m.appendChild(c);m=this.createSvgCanvas(n);m.foOffset=e?-.5:0;m.textOffset=e?-.5:0;m.imageOffset=e?-.5:
0;m.translate(Math.floor((d/b-k.x)/l),Math.floor((d/b-k.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,d,c,e,f,g,k,l,m,n,t,q){var u=this.state;if(null!=this.foAltText&&(0==c||0!=u.fontSize&&f.length<5*c/u.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(c/2));v.setAttribute("y",Math.round((e+u.fontSize)/2));v.setAttribute("fill",u.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(u.fontSize)+"px");
v.setAttribute("font-family",u.fontFamily);(u.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight","bold");(u.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(u.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");mxUtils.write(v,f);return v}return p.apply(this,arguments)};d=this.backgroundImage;null!=d&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*
if(null!=g){var k=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;d.push(g)}}if(2<d.length){d.sort(function(b,d){return a?b.x-d.x:b.y-d.y});g=this.view.translate;k=this.view.scale;e=e/k-(a?g.x:g.y);c=c/k-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var l=(c-e)/(d.length-1),c=e,f=1;f<d.length-1;f++){var m=this.view.getState(this.model.getParent(d[f].cell)),n=this.getCellGeometry(d[f].cell),c=c+l;null!=n&&null!=m&&(n=n.clone(),a?n.x=Math.round(c-n.width/2)-m.origin.x:
n.y=Math.round(c-n.height/2)-m.origin.y,this.getModel().setGeometry(d[f].cell,n))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),d=new mxDictionary,c=0;c<a.length;c++)d.put(a[c],!0);for(c=0;c<b.length;c++){var e=this.view.getState(a[c]);if(null!=e){var f=this.getCellGeometry(b[c]);null==f||!f.relative||this.model.isEdge(a[c])||
d.get(this.model.getParent(a[c]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}d=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(c=0;c<a.length;c++)e.add(f,b[c]);return d.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,d,c,e,f,g){b=null!=b?b:1;d=null!=d?d:0;e=
null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var k=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();c=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=c.style?c.style.backgroundColor=a:c.setAttribute("style","background-color:"+a));null==m.createElementNS?(c.setAttribute("xmlns",mxConstants.NS_SVG),c.setAttribute("xmlns:xlink",
mxConstants.NS_XLINK)):c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/l;c.setAttribute("width",Math.ceil(k.width*a)+2*d+"px");c.setAttribute("height",Math.ceil(k.height*a)+2*d+"px");c.setAttribute("version","1.1");var n=c;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),c.appendChild(n));m.appendChild(c);m=this.createSvgCanvas(n);m.foOffset=e?-.5:0;m.textOffset=e?
-.5:0;m.imageOffset=e?-.5:0;m.translate(Math.floor((d/b-k.x)/l),Math.floor((d/b-k.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,d,c,e,f,g,k,l,m,n,t,q){var u=this.state;if(null!=this.foAltText&&(0==c||0!=u.fontSize&&f.length<5*c/u.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(c/2));v.setAttribute("y",Math.round((e+u.fontSize)/2));v.setAttribute("fill",u.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(u.fontSize)+
"px");v.setAttribute("font-family",u.fontFamily);(u.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight","bold");(u.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(u.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");mxUtils.write(v,f);return v}return p.apply(this,arguments)};d=this.backgroundImage;null!=d&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*
e,b.y*e,d.width*e,d.height*e),mxUtils.intersects(k,e)&&m.image(b.x,b.y,d.width,d.height,d.src,!0));m.scale(a);m.textEnabled=g;g=this.createSvgImageExport();var t=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&t.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),m);return c};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=
window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,d){for(;null!=a&&a.nodeName!=b;){if(a==d)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var d=document.createRange();d.selectNode(a);b.removeAllRanges();b.addRange(d)}}else(b=
document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),d=b.createRange(),d.setEndPoint("StartToStart",a),d.select())};Graph.prototype.insertRow=function(a,b){for(var d=a.tBodies[0],c=0<d.rows.length?d.rows[0].cells.length:1,d=d.insertRow(b),e=0;e<c;e++)mxUtils.br(d.insertCell(-1));return d.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var d=a.tHead;if(null!=d)for(var c=0;c<d.rows.length;c++){var e=document.createElement("th");
@ -7298,7 +7298,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=
[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=
[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return u.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.2.9";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return u.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.3.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;EditorUi.prototype.pdfPageExport=!0;(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<c.length}catch(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=
a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
@ -7343,13 +7343,13 @@ a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttrib
mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var y=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=y?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=m.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",
D.style.marginRight="2px",D.style.marginTop="-2px",l.insertBefore(D,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),g.style.paddingRight=18*l.childNodes.length+"px")})):null==y&&(y=m.cloneNode(!1),y.setAttribute("src",IMAGE_PATH+"/download.png"),y.setAttribute("title",mxResources.get("save")),l.insertBefore(y,l.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this,
function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);y.parentNode.removeChild(y);y=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(A.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",
!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),
c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;c.y-=A.view.translate.y;F(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",
A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=
!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,
"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,
0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,n),t)];t[0].vertex=!0;F(t,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(c.documentElement));
function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);y.parentNode.removeChild(y);y=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(mxUtils.sortCells(A.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,
c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
A.getSelectionCells(),c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;c.y-=A.view.translate.y;F(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",
k.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),
A.isMouseDown=!1,A.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,n),t)];t[0].vertex=!0;F(t,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(c.documentElement));
f(q,k);b=b.concat(q);z(a);this.spinner.stop();p=!0}catch(G){}else if("mxfile"==c.documentElement.nodeName)try{q=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),t=this.stringToCells(this.editor.graph.decompress(q)),F(t,new mxRectangle(0,0,m,n),a),p=!0}catch(G){}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),
mxEvent.addListener(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);
m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var D=null;mxEvent.addListener(m,
@ -7383,11 +7383,11 @@ a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substri
null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,v,x,y){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=e);"auto"!==
d&&(l.target=d);v||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),l.toolbar=c.join(" "));x&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+(f?"max-width:100%;":
"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";y(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=
function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value",
"url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),
l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");
B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var z=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(e,mxResources.get("allPages"),g,!g),E=this.addCheckbox(e,mxResources.get("layers"),!0),D=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom=
"16px";mxEvent.addListener(D,"change",function(){D.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,A.checked,B.value,n.getTarget(),n.getColor(),z.checked,F.checked,E.checked,D.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value",
"url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value","copy");k.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(l);mxUtils.br(k);k.appendChild(g);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));k.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),
l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(k);var n=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");
B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var z=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(e,mxResources.get("allPages"),k,!k),E=this.addCheckbox(e,mxResources.get("layers"),!0),D=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom=
"16px";mxEvent.addListener(D,"change",function(){D.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,A.checked,B.value,n.getTarget(),n.getColor(),z.checked,F.checked,E.checked,D.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");
m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft=
"12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
@ -7769,7 +7769,7 @@ OneDriveClient.prototype.saveFile=function(a,c,f){this.writeFile(this.baseUrl+"/
OneDriveClient.prototype.writeFile=function(a,c,f,d,b,e){if(null!=a&&null!=c){var g=mxUtils.bind(this,function(l){var m=!0,n=window.setTimeout(mxUtils.bind(this,function(){m=!1;e({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout),p=new mxXmlRequest(a+"?access_token="+this.token,c,f);p.setRequestHeaders=function(a,b){a.setRequestHeader("Content-Type",d||" ")};p.send(mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(200<=a.getStatus()&&299>=a.getStatus()?b(JSON.parse(a.getText())):401===a.getStatus()?
(this.clearPersistentToken(),this.setUser(null),this.token=null,l?e({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){k(!0)},e)})}):this.authenticate(function(){g(!0)},e)):e(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&e(this.parseRequestText(a))}))}),k=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){k(!0)},e,a):g(a)});null==this.token?this.authenticate(function(){k(!0)},e):k(!1)}else e({message:mxResources.get("unknownError")})};
OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(f){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(a)};OneDriveClient.prototype.pickFolder=function(a){WL.fileDialog({mode:"save"}).then(function(c){a(c)},function(c){a(null)})};
OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});WL.fileDialog({mode:"open",select:"multi"}).then(function(c){if(null!=c&&null!=c.data&&null!=c.data.files)for(var f=0;f<c.data.files.length;f++){var d=c.data.files[f].id,d=d.substring(d.lastIndexOf(".")+1);a(d)}},function(a){})};OneDriveClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;WL.logout()};GitHubFile=function(a,c,f){DrawioFile.call(this,a,c);this.meta=f};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?encodeURIComponent(this.meta.ref)+(null!=this.meta.path?"/"+this.meta.path:""):""):""))};
OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});WL.fileDialog({mode:"open",select:"multi"}).then(function(c){if(null!=c&&null!=c.data&&null!=c.data.files)for(var f=0;f<c.data.files.length;f++){var d=c.data.files[f].id,d=d.substring(d.lastIndexOf(".")+1);a(d)}},function(a){})};OneDriveClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;WL.logout()};GitHubFile=function(a,c,f){DrawioFile.call(this,a,c);this.meta=f};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):""))};
GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(c){a(200<=c.getStatus()&&299>=c.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1};
GitHubFile.prototype.save=function(a,c,f){this.doSave(this.getTitle(),c,f)};GitHubFile.prototype.saveAs=function(a,c,f){this.doSave(a,c,f)};GitHubFile.prototype.doSave=function(a,c,f){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,c,f)};
GitHubFile.prototype.saveFile=function(a,c,f,d){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var b=this.isModified,e=this.isModified(),g=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return e}});g();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=b;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url;
@ -7783,26 +7783,26 @@ k.close()}}))});l()}else null!=k&&k.close()}):c({message:mxResources.get("servic
GitHubClient.prototype.executeRequest=function(a,c,f){var d=mxUtils.bind(this,function(e){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT,retry:b})}),this.ui.timeout),l=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+l)};a.send(mxUtils.bind(this,function(){window.clearTimeout(k);if(g)if(200<=a.getStatus()&&299>=a.getStatus())c(a);else if(401===a.getStatus())e?f({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
function(){this.authenticate(function(){b(!0)},f)})}):this.authenticate(function(){d(!0)},f);else if(403===a.getStatus()){var l=!1;try{var n=JSON.parse(a.getText());null!=n&&null!=n.errors&&0<n.errors.length&&(l="too_large"==n.errors[0].code)}catch(p){}f({message:mxResources.get(l?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?f({message:mxResources.get("fileNotFound")}):409===a.getStatus()?f({status:409}):f({message:mxResources.get("error")+" "+a.getStatus()})}),f)}),b=mxUtils.bind(this,
function(a){null==this.user?this.updateUser(function(){b(!0)},f,a):d(a)});null==this.token?this.authenticate(function(){b(!0)},f):b(!1)};GitHubClient.prototype.getLibrary=function(a,c,f){this.getFile(a,c,f,!0)};
GitHubClient.prototype.getFile=function(a,c,f,d){d=null!=d?d:!1;var b=a.split("/"),e=b[0],g=b[1],k=b[2];a=b.slice(3,b.length).join("/");if(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||/\.png$/i.test(a))if(null!=this.token){var l=this.baseUrl+"/repos/"+e+"/"+g+"/contents/"+a+"?ref="+encodeURIComponent(k)+"&token="+this.token,b=a.split("/");this.ui.convertFile(l,0<b.length?b[b.length-1]:a,null,this.extension,c,f)}else f({message:mxResources.get("accessDenied")});else a=new mxXmlRequest(this.baseUrl+"/repos/"+
e+"/"+g+"/contents/"+a+"?ref="+encodeURIComponent(k),null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(e,g,k,JSON.parse(a.getText()),d))}catch(n){f(n)}}),f)};
GitHubClient.prototype.getFile=function(a,c,f,d){d=null!=d?d:!1;var b=a.split("/"),e=b[0],g=b[1],k=b[2];a=b.slice(3,b.length).join("/");if(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||/\.png$/i.test(a))if(null!=this.token){var l=this.baseUrl+"/repos/"+e+"/"+g+"/contents/"+a+"?ref="+decodeURIComponent(k)+"&token="+this.token,b=a.split("/");this.ui.convertFile(l,0<b.length?b[b.length-1]:a,null,this.extension,c,f)}else f({message:mxResources.get("accessDenied")});else a=new mxXmlRequest(this.baseUrl+"/repos/"+
e+"/"+g+"/contents/"+a+"?ref="+decodeURIComponent(k),null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(e,g,k,JSON.parse(a.getText()),d))}catch(n){f(n)}}),f)};
GitHubClient.prototype.createGitHubFile=function(a,c,f,d,b){a={org:a,repo:c,ref:f,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};c=d.content;"base64"===d.encoding&&(c=/\.jpe?g$/i.test(d.name)?"data:image/jpeg;base64,"+c:/\.gif$/i.test(d.name)?"data:image/gif;base64,"+c:Base64.decode(c));return b?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};GitHubClient.prototype.insertLibrary=function(a,c,f,d,b){this.insertFile(a,c,f,d,!0,b,!1)};
GitHubClient.prototype.insertFile=function(a,c,f,d,b,e,g){b=null!=b?b:!1;e=e.split("/");var k=e[0],l=e[1],m=e[2],n=e.slice(3,e.length).join("/");0<n.length&&(n+="/");n+=a;this.checkExists(k+"/"+l+"/"+m+"/"+n,!0,mxUtils.bind(this,function(e,q){e?b?(g||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(k,l,m,n,a,c,q,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());f(this.createGitHubFile(k,l,m,c.content,b))}catch(x){d(x)}}),d)}),d)):f(new GitHubFile(this.ui,
c,{org:k,repo:l,ref:m,name:a,path:n,sha:q,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,f,d){var b=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){b();f(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){d()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
GitHubClient.prototype.writeFile=function(a,c,f,d,b,e,g,k,l){e.length>=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(b={path:d,message:b,content:e},null!=g&&(b.sha=g),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d+"?ref="+encodeURIComponent(f),JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){k(a)}),l))};
GitHubClient.prototype.writeFile=function(a,c,f,d,b,e,g,k,l){e.length>=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(f={path:d,branch:decodeURIComponent(f),message:b,content:e},null!=g&&(f.sha=g),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d,JSON.stringify(f),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){k(a)}),l))};
GitHubClient.prototype.checkExists=function(a,c,f){this.getFile(a,mxUtils.bind(this,function(d){if(c&&null!=d.meta){var b=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){b();f(!0,d.meta.sha)},function(){b();f(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){f(!1)})}),mxUtils.bind(this,function(a){f(!0)}))};
GitHubClient.prototype.saveFile=function(a,c,f){var d=a.meta.org,b=a.meta.repo,e=a.meta.ref,g=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(k){var l=Base64.encode(a.getData()),m=mxUtils.bind(this,function(n){this.writeFile(d,b,e,g,k,l,n,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),
mxResources.get("fileChangedOverwrite"),mxResources.get("cancel"),mxUtils.bind(this,function(){f()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(d+"/"+b+"/"+e+"/"+g,mxUtils.bind(this,function(a){m(a.meta.sha)}),mxUtils.bind(this,function(){m(null)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):f(a)}))});m(a.meta.sha)}),mxUtils.bind(this,function(){f()}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};
GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
GitHubClient.prototype.showGitHubDialog=function(a,c){var f=null,d=null,b=null,e=null,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,mxResources.get(a?"selectFile":"selectFolder"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height="194px";
g.appendChild(l);var m=new CustomDialog(this.ui,g,mxUtils.bind(this,function(){c(f+"/"+d+"/"+b+"/"+e)}));this.ui.showDialog(m.container,340,270,!0,!0);a&&m.okButton.parentNode.removeChild(m.okButton);var n=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(n(f+"/"+d,mxUtils.bind(this,
function(){e=null;v()})));a||(mxUtils.write(c," / "),c.appendChild(n(b,mxUtils.bind(this,function(){e=null;t()}))));if(null!=e&&0<e.length){var g=e.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(n(g[a],mxUtils.bind(this,function(){e=g.slice(0,a+1).join("/");u()})))})(a)}l.appendChild(c)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),u=mxUtils.bind(this,function(){var g=
new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+d+"/contents/"+e+"?ref="+encodeURIComponent(b),null,"GET");m.okButton.removeAttribute("disabled");l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));this.executeRequest(g,mxUtils.bind(this,function(g){p();this.ui.spinner.stop();var k=JSON.parse(g.getText());l.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,v();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");u()}})));mxUtils.br(l);null==k||0==k.length?mxUtils.write(l,
mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var m=0;m<k.length;m++)mxUtils.bind(this,function(k){g==("dir"==k.type)&&(l.appendChild(n(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(e=k.path,u()):a&&"file"==k.type&&(this.ui.hideDialog(),c(f+"/"+d+"/"+b+"/"+k.path))}))),mxUtils.br(l))})(k[m])}),g(!0),a&&g(!1))}),q)}),t=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+d+"/branches?per_page=100&page="+
a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();p(!0);c=JSON.parse(c.getText());l.appendChild(n("../ [Up]",mxUtils.bind(this,function(){e=null;v()})));mxUtils.br(l);if(null==c||0==c.length)mxUtils.write(l,mxResources.get("noFiles"));else{for(var d=0;d<c.length;d++)mxUtils.bind(this,function(a){l.appendChild(n(a.name,mxUtils.bind(this,function(){b=a.name;e="";u()})));
mxUtils.br(l)})(c[d]);if(100==c.length){var f=mxUtils.bind(this,function(){l.scrollTop==l.scrollHeight-l.offsetHeight&&(mxEvent.removeListener(l,"scroll",f),t(a+1))});mxEvent.addListener(l,"scroll",f)}}}),q)}),v=mxUtils.bind(this,function(g){null==g&&(l.innerHTML="",g=1);var k=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+g,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(k){this.ui.spinner.stop();
k=JSON.parse(k.getText());if(null==k||0==k.length)mxUtils.write(l,mxResources.get("noFiles"));else{l.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(g){null!=g&&(this.ui.spinner.spin(l,mxResources.get("loading")),this.getFile(g,mxUtils.bind(this,function(g){this.ui.spinner.stop();f=g.meta.org;d=g.meta.repo;b=g.meta.ref;null!=g.meta.path&&a?(this.ui.hideDialog(),c(f+"/"+d+
"/"+b+"/"+g.meta.path)):(e="",u())}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}),mxResources.get("enterValue"));this.ui.showDialog(g.container,300,80,!0,!1);g.init()})));mxUtils.br(l);mxUtils.br(l);for(var m=0;m<k.length;m++)mxUtils.bind(this,function(a){l.appendChild(n(a.full_name,mxUtils.bind(this,function(){f=a.owner.login;d=a.name;b=a.default_branch;e="";u()})));mxUtils.br(l)})(k[m])}if(100==k.length){var p=mxUtils.bind(this,
function(){l.scrollTop==l.scrollHeight-l.offsetHeight&&(mxEvent.removeListener(l,"scroll",p),v(g+1))});mxEvent.addListener(l,"scroll",p)}}),q)});v()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};function ChatWindow(a,c,f,d,b,e,g,k){this.editorUi=a;this.doc=k.doc;this.rtModel=k.rt;this.chatHistory=k.chatHistory;this.chatMap=k.chatMap;this.configCollabInfo();f=document.createElement("div");f.id="mainDiv";k=document.createElement("div");k.style.padding="3px";f.appendChild(k);var l=document.createElement("div");l.style.paddingLeft="3px";l.style.paddingRight="15px";a.editor.graph.isEnabled()&&f.appendChild(l);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
g.appendChild(l);var m=new CustomDialog(this.ui,g,mxUtils.bind(this,function(){c(f+"/"+d+"/"+encodeURIComponent(b)+"/"+e)}));this.ui.showDialog(m.container,340,270,!0,!0);a&&m.okButton.parentNode.removeChild(m.okButton);var n=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(n(f+
"/"+d,mxUtils.bind(this,function(){e=null;v()})));a||(mxUtils.write(c," / "),c.appendChild(n(decodeURIComponent(b),mxUtils.bind(this,function(){e=null;t()}))));if(null!=e&&0<e.length){var g=e.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(n(g[a],mxUtils.bind(this,function(){e=g.slice(0,a+1).join("/");u()})))})(a)}l.appendChild(c)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),
u=mxUtils.bind(this,function(){var g=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+d+"/contents/"+e+"?ref="+b,null,"GET");m.okButton.removeAttribute("disabled");l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));this.executeRequest(g,mxUtils.bind(this,function(g){p();this.ui.spinner.stop();var k=JSON.parse(g.getText());l.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==e)e=null,v();else{var a=e.split("/");e=a.slice(0,a.length-1).join("/");u()}})));mxUtils.br(l);null==k||
0==k.length?mxUtils.write(l,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var m=0;m<k.length;m++)mxUtils.bind(this,function(k){g==("dir"==k.type)&&(l.appendChild(n(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(e=k.path,u()):a&&"file"==k.type&&(this.ui.hideDialog(),c(f+"/"+d+"/"+encodeURIComponent(b)+"/"+k.path))}))),mxUtils.br(l))})(k[m])}),g(!0),a&&g(!1))}),q)}),t=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+
"/repos/"+f+"/"+d+"/branches?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();p(!0);c=JSON.parse(c.getText());l.appendChild(n("../ [Up]",mxUtils.bind(this,function(){e=null;v()})));mxUtils.br(l);if(null==c||0==c.length)mxUtils.write(l,mxResources.get("noFiles"));else{for(var d=0;d<c.length;d++)mxUtils.bind(this,function(a){l.appendChild(n(a.name,
mxUtils.bind(this,function(){b=a.name;e="";u()})));mxUtils.br(l)})(c[d]);if(100==c.length){var f=mxUtils.bind(this,function(){l.scrollTop==l.scrollHeight-l.offsetHeight&&(mxEvent.removeListener(l,"scroll",f),t(a+1))});mxEvent.addListener(l,"scroll",f)}}}),q)}),v=mxUtils.bind(this,function(a){null==a&&(l.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(l,mxResources.get("loading"));
this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(l,mxResources.get("noFiles"));else{l.appendChild(n(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 c=a.split("/");if(1<c.length&&this.ui.spinner.spin(l,mxResources.get("loading"))){a=c[0];var g=c[1],c=encodeURIComponent(c.slice(2,
c.length).join("/"));this.getFile(a+"/"+g+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();f=a.meta.org;d=a.meta.repo;b=decodeURIComponent(a.meta.ref);e="";u()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})}))}}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()})));mxUtils.br(l);mxUtils.br(l);for(var g=0;g<c.length;g++)mxUtils.bind(this,function(a){l.appendChild(n(a.full_name,mxUtils.bind(this,
function(){f=a.owner.login;d=a.name;b=a.default_branch;e="";u()})));mxUtils.br(l)})(c[g])}if(100==c.length){var k=mxUtils.bind(this,function(){l.scrollTop==l.scrollHeight-l.offsetHeight&&(mxEvent.removeListener(l,"scroll",k),v(a+1))});mxEvent.addListener(l,"scroll",k)}}),q)});v()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};function ChatWindow(a,c,f,d,b,e,g,k){this.editorUi=a;this.doc=k.doc;this.rtModel=k.rt;this.chatHistory=k.chatHistory;this.chatMap=k.chatMap;this.configCollabInfo();f=document.createElement("div");f.id="mainDiv";k=document.createElement("div");k.style.padding="3px";f.appendChild(k);var l=document.createElement("div");l.style.paddingLeft="3px";l.style.paddingRight="15px";a.editor.graph.isEnabled()&&f.appendChild(l);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";k.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
"right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));l.appendChild(this.chatLineArea);l.appendChild(this.sendBtn);this.window=new mxWindow(c,f,d,b,e,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.handleResize();this.window.addListener(mxEvent.RESIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.MAXIMIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,this.handleResize));if(null!=this.chatHistory){for(a=Math.max(0,this.chatHistory.length-this.chatHistoryShow);a<this.chatHistory.length;a++)this.updateChatArea(this.chatHistory.get(a));this.chatHistory.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED,mxUtils.bind(this,

View file

@ -43,15 +43,15 @@ this.l&&a.push("?",this.l);null!==this.o&&a.push("#",this.o);return a.join("")};
function(){return null!==this.k};f.prototype.V=function(){return this.h&&decodeURIComponent(this.h)};f.prototype.ca=function(a){if(a){a=Number(a);if(a!==(a&65535))throw Error("Bad port number "+a);this.h=""+a}else this.h=null};f.prototype.$=function(){return null!==this.h};f.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};f.prototype.G=function(a){a?(a=""+a,this.g=!this.k||/^\//.test(a)?a:"/"+a):this.g=null};f.prototype.O=function(a){this.l=a?a:null};f.prototype.aa=function(){return null!==
this.l};f.prototype.ba=function(a){if("object"===typeof a&&!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1,d;for(d in a){var e=a[d];"string"===typeof e&&(b[++c]=d,b[++c]=e)}a=b}for(var b=[],c="",f=0;f<a.length;)d=a[f++],e=a[f++],b.push(c,encodeURIComponent(d.toString())),c="&",e&&b.push("=",encodeURIComponent(e.toString()));this.l=b.join("")};f.prototype.fa=function(a){this.o=a?a:null};f.prototype.Z=function(){return null!==this.o};
var m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,n=/[#\/\?@]/g,p=/[\#\?]/g;f.parse=a;f.create=function(a,d,e,k,g,l,m){a=new f(b(a,n),b(d,n),"string"==typeof e?encodeURIComponent(e):null,0<k?k.toString():null,b(g,p),null,"string"==typeof m?encodeURIComponent(m):null);l&&("string"===typeof l?a.O(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,c)):a.ba(l));return a};f.N=e;f.ma=d;f.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},
N:function(b,c){return b?e(a(b),a(c)).toString():""+c}};return f}();"undefined"!==typeof window&&(window.URI=f);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(z,c)+'")':'url("about:blank")'}function c(a){return A[a]}function d(a,b){return a?f.ha.N(a,b):b}function p(a,b,c){if(!c)return null;var d=(""+a).match(v);return!d||d[1]&&!F.test(d[1])?null:c(a,b)}function x(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
"")}var z=/[\n\f\r\"\'()*<>]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function G(f,k,g,l,m){f=x(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y<k.length;++y){var v=k[y].toLowerCase(),z=v.charCodeAt(0),A,F,E,I,H,N;if(32===z)v="";else if(34===z)v=16===r?g?a(p(d(l,e(k[y].substring(1,v.length-1))),f,g)):"":
q&8&&!(r&r-1)?v:"";else if("inherit"!==v){if(H=n.cssLitGroup){var J;if(!(J=n.cssLitMap)){J={};for(var R=H.length;0<=--R;)for(var S=H[R],ga=S.length;0<=--ga;)J[S[ga]]=c;J=n.cssLitMap=J}H=J}else H=c;if(N=H,N[x(v)]!==c)if(35===z&&/^#(?:[0-9a-f]{3}){1,2}$/.test(v))v=q&2?v:"";else if(48<=z&&57>=z)v=q&1?v:"";else if(A=v.charCodeAt(1),F=v.charCodeAt(2),E=48<=A&&57>=A,I=48<=F&&57>=F,43===z&&(E||46===A&&I))v=q&1?(E?"":"0")+v.substring(1):"";else if(45===z&&(E||46===A&&I))v=q&4?(E?"-":"-0")+v.substring(1):
q&1?"0":"";else if(46===z&&E)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[y].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;J=y;v=1;R=J+1;for(z=H.length;R<z&&v;)S=H[R++],v+=")"===S?-1:/^[^"']*\($/.test(S);if(!v)for(v=H[J].toLowerCase(),z=x(v),H=H.splice(J,R-J,""),J=n.cssFns,R=0,S=J.length;R<S;++R)if(J[R].substring(0,z.length)==z){H[0]=H[H.length-1]="";G(J[R],H,g,l);v=v+H.join(" ")+")";break a}v=""}else v=t&&/^-?[a-z_][\w\-]*$/.test(v)&&!/__$/.test(v)?
N:function(b,c){return b?e(a(b),a(c)).toString():""+c}};return f}();"undefined"!==typeof window&&(window.URI=f);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(z,c)+'")':'url("about:blank")'}function c(a){return A[a]}function d(a,b){return a?f.ha.N(a,b):b}function p(a,b,c){if(!c)return null;var d=(""+a).match(v);return!d||d[1]&&!E.test(d[1])?null:c(a,b)}function x(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
"")}var z=/[\n\f\r\"\'()*<>]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,E=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function G(f,k,g,l,m){f=x(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y<k.length;++y){var v=k[y].toLowerCase(),z=v.charCodeAt(0),A,E,F,I,H,M;if(32===z)v="";else if(34===z)v=16===r?g?a(p(d(l,e(k[y].substring(1,v.length-1))),f,g)):"":
q&8&&!(r&r-1)?v:"";else if("inherit"!==v){if(H=n.cssLitGroup){var J;if(!(J=n.cssLitMap)){J={};for(var R=H.length;0<=--R;)for(var S=H[R],ga=S.length;0<=--ga;)J[S[ga]]=c;J=n.cssLitMap=J}H=J}else H=c;if(M=H,M[x(v)]!==c)if(35===z&&/^#(?:[0-9a-f]{3}){1,2}$/.test(v))v=q&2?v:"";else if(48<=z&&57>=z)v=q&1?v:"";else if(A=v.charCodeAt(1),E=v.charCodeAt(2),F=48<=A&&57>=A,I=48<=E&&57>=E,43===z&&(F||46===A&&I))v=q&1?(F?"":"0")+v.substring(1):"";else if(45===z&&(F||46===A&&I))v=q&4?(F?"-":"-0")+v.substring(1):
q&1?"0":"";else if(46===z&&F)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[y].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;J=y;v=1;R=J+1;for(z=H.length;R<z&&v;)S=H[R++],v+=")"===S?-1:/^[^"']*\($/.test(S);if(!v)for(v=H[J].toLowerCase(),z=x(v),H=H.splice(J,R-J,""),J=n.cssFns,R=0,S=J.length;R<S;++R)if(J[R].substring(0,z.length)==z){H[0]=H[H.length-1]="";G(J[R],H,g,l);v=v+H.join(" ")+")";break a}v=""}else v=t&&/^-?[a-z_][\w\-]*$/.test(v)&&!/__$/.test(v)?
m&&512===t?k[y]+m:1024===t&&b[v]&&"number"===typeof b[v].oa?v:"":/^\w+$/.test(v)&&64===r&&q&8?u+1===C?(k[u]=k[u].substring(0,k[u].length-1)+" "+v+'"',""):(u=C,'"'+v+'"'):""}v&&(k[C++]=v)}1===C&&'url("about:blank")'===k[0]&&(C=0);k.length=C}else k.length=0}}();var H=/^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$/,
E={};E[">"]=E["+"]=E["~"]=E;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c<d&&((r=a[c],"*"===r)?(++c,g=r):/^[a-zA-Z]/.test(r)&&(l=k(r.toLowerCase(),[]))&&("tagName"in l&&(r=l.tagName),++c,g=r));for(p=m=l="";t&&c<d;++c)if(r=a[c],"#"===r.charAt(0))/^#_|__$|[^\w#:\-]/.test(r)?t=!1:l+=r+f;else if("."===r)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(r=a[c])&&!/^_|__$/.test(r)?l+="."+r:t=!1;else if(c+1<d&&"["===a[c]){++c;var G=a[c++].toLowerCase();r=q.m[g+"::"+G];r!==+r&&(r=q.m["*::"+
F={};F[">"]=F["+"]=F["~"]=F;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c<d&&((r=a[c],"*"===r)?(++c,g=r):/^[a-zA-Z]/.test(r)&&(l=k(r.toLowerCase(),[]))&&("tagName"in l&&(r=l.tagName),++c,g=r));for(p=m=l="";t&&c<d;++c)if(r=a[c],"#"===r.charAt(0))/^#_|__$|[^\w#:\-]/.test(r)?t=!1:l+=r+f;else if("."===r)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(r=a[c])&&!/^_|__$/.test(r)?l+="."+r:t=!1;else if(c+1<d&&"["===a[c]){++c;var G=a[c++].toLowerCase();r=q.m[g+"::"+G];r!==+r&&(r=q.m["*::"+
G]);var u;b.ia?(u=b.ia(g,G),"string"!==typeof u&&(t=!1,u=G),t&&r!==+r&&(r=q.d.NONE)):(u=G,r!==+r&&(t=!1));var y=G="",D=!1;/^[~^$*|]?=$/.test(a[c])&&(G=a[c++],y=a[c++],/^[0-9A-Za-z:_\-]+$/.test(y)?y='"'+y+'"':"]"===y&&(y='""',--c),/^"([^\"\\]|\\.)*"$/.test(y)||(t=!1),(D="i"===a[c])&&++c);"]"!==a[c]&&(++c,t=!1);switch(r){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==G&&"~="!==G&&"$="!==G||'""'==y||D?"|="===G||""===G||(t=!1):y='"'+y.substring(1,
y.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==G&&(t=!1);break;default:t=!1}t&&(m+="["+u.replace(/[^\w-]/g,"\\$&")+G+y+(D?" i]":"]"))}else if(c<d&&":"===a[c])if(r=a[++c],H.test(r))p+=":"+r;else break;else break;c!==d&&(t=!1);t&&(c=(g+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+e)&&n.push(c);return t}" "===a[d]&&++d;l-1!==d&&" "===a[l]&&--l;for(var n=[],p=d,r=!0,t=d;r&&t<l;++t){var G=a[t];if(E[G]===E||" "===G)m(p,t,G)?p=t+1:r=!1}m(p,l,"")||(r=!1);return r?(n.length&&(p=n.join(""),null!==
e&&(p="."+e+" "+p),g.push(p)),!0):!c||c(a.slice(d,l))}var e=b.na,f=b.L,k=b.Aa,g=[],l=0,m,n=0,p;for(m=0;m<a.length;++m)(p=a[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==a[m]&&(n||E[a[m-1]]===E||E[a[m+1]]===E))||(a[l++]=a[m]);a.length=l;l=a.length;for(m=n=0;m<l;++m)if(","===a[m]){if(!d(n,m))return null;n=m+1}return d(n,l)?g:null};(function(){var a=/^\w/,b=/^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*))*$/i;
y.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==G&&(t=!1);break;default:t=!1}t&&(m+="["+u.replace(/[^\w-]/g,"\\$&")+G+y+(D?" i]":"]"))}else if(c<d&&":"===a[c])if(r=a[++c],H.test(r))p+=":"+r;else break;else break;c!==d&&(t=!1);t&&(c=(g+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+e)&&n.push(c);return t}" "===a[d]&&++d;l-1!==d&&" "===a[l]&&--l;for(var n=[],p=d,r=!0,t=d;r&&t<l;++t){var G=a[t];if(F[G]===F||" "===G)m(p,t,G)?p=t+1:r=!1}m(p,l,"")||(r=!1);return r?(n.length&&(p=n.join(""),null!==
e&&(p="."+e+" "+p),g.push(p)),!0):!c||c(a.slice(d,l))}var e=b.na,f=b.L,k=b.Aa,g=[],l=0,m,n=0,p;for(m=0;m<a.length;++m)(p=a[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==a[m]&&(n||F[a[m-1]]===F||F[a[m+1]]===F))||(a[l++]=a[m]);a.length=l;l=a.length;for(m=n=0;m<l;++m)if(","===a[m]){if(!d(n,m))return null;n=m+1}return d(n,l)?g:null};(function(){var a=/^\w/,b=/^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*))*$/i;
m=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}c.length=e;c=c.join(" ");return c.length?b.test(c)?a.test(c)?c:"not all , "+c:"not all":""}})();(function(){function a(a){var b=/^\s*[']([^']*)[']\s*$/,c=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,d=/^\s*url\s*[(][']([^']*)['][)]\s*$/,e=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(a))||(f=b.exec(a))||(f=c.exec(a))||(f=d.exec(a))||(f=e.exec(a))?f[1]:null}function b(c,e,f,l,q,r,t){function u(){C=
x.length&&null===x[x.length-1]}var G=void 0,y=t||[0],x=[],C=!1;n(e,{startStylesheet:function(){G=[]},endStylesheet:function(){},startAtrule:function(e,k){if(C)e=null;else if("@media"===e)G.push("@media"," ",m(k));else if("@keyframes"===e||"@-webkit-keyframes"===e){var g=k[0];1!==k.length||/__$|[^\w\-]/.test(g)?e=null:(G.push(e," ",g+f.L),e="@keyframes")}else if("@import"===e&&0<k.length)if(e=null,"function"===typeof r){var n=m(k.slice(1));if("not all"!==n){++y[0];var t=[];G.push(t);var u=p(d(c,a(k[0])),
function(a){var c=b(u,a.qa,f,l,q,r,y);--y[0];a=n?{toString:function(){return"@media "+n+" {"+c.result+"}"}}:c.result;t[0]=a;r(a,!!y[0])},q)}}else window.console&&window.console.log("@import "+k.join(" ")+" elided");C=!e;x.push(e)},endAtrule:function(){x.pop();C||G.push(";");u()},startBlock:function(){C||G.push("{")},endBlock:function(){C||(G.push("}"),C=!0)},startRuleset:function(a){if(!C){var b=void 0;"@keyframes"===x[x.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
@ -80,20 +80,20 @@ li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement
s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};q.ELEMENT_DOM_INTERFACES=q.Q;q.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};q.ueffects=q.P;q.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(a){function b(a,b){var c;if(V.hasOwnProperty(b))c=V[b];else{var d=b.match(X);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(D))?String.fromCharCode(parseInt(d[1],
16)):aa&&W.test(b)?(aa.innerHTML="&"+b+";",d=aa.textContent,V[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(L,"&amp;").replace(T,"&lt;").replace(ba,"&gt;").replace(ca,"&#34;")}function e(a){return a.replace(O,"&amp;$1").replace(T,"&lt;").replace(ba,"&gt;")}function k(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
d=a+"";if(Y)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d<q;){var r=c[d++],t=c[d];switch(r){case "&":M.test(t)?(b.e&&b.e("&"+t,f,Q,g(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,Q,g(b,c,d,e,f));break;case "</":if(k=/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===
t.length&&">"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,Q,g(b,c,d,e,f));else{var u=c,G=d,y=b,x=f,D=Q,C=e,S=n(u,G);S?(y.t&&y.t(S.name,x,D,g(y,u,G,C,x)),d=S.next):d=u.length}else b.e&&b.e("&lt;/",f,Q,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,Q,g(b,c,d,e,f));var ka=a.f[p];ka&Z&&(d=m(c,{name:p,next:d,c:ka},b,f,Q,e))}else{var u=c,G=b,y=f,x=Q,D=e,z=n(u,d);z?(G.w&&G.w(z.name,z.R,y,x,g(G,u,z.next,D,
y)),d=z.c&Z?m(u,z,G,y,x,D):z.next):d=u.length}else b.e&&b.e("&lt;",f,Q,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l<q&&(">"!==c[l]||!/--$/.test(c[l-1]));l++);if(l<q){if(b.A){var v=c.slice(d,l).join("");b.A(v.substr(0,v.length-2),f,Q,g(b,c,l+1,e,f))}d=l+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,Q,g(b,c,d,e,f));break;case "<!":if(/^\w/.test(t)){if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,Q,g(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,Q,g(b,c,d,e,f));break;case "<?":if(!e.r){for(l=
d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,Q,g(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,Q,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,Q,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==Q)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;S.hasOwnProperty(c.name)||(S[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=S[c.name],p=c.next,q=c.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(c.c&a.c.CDATA)d.z&&d.z(m,f,k,g(d,b,
q,l,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(m),f,k,g(d,b,q,l,f));else throw Error("bug");return q}function n(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var k=b[d].substr(e[0].length),g=d+1,l=b.length;g<l&&">"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=P.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g<l;g++){if(n){if(">"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n=
e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(K,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
16)):Q&&W.test(b)?(Q.innerHTML="&"+b+";",d=Q.textContent,V[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(K,"&amp;").replace(T,"&lt;").replace(aa,"&gt;").replace(ba,"&#34;")}function e(a){return a.replace(N,"&amp;$1").replace(T,"&lt;").replace(aa,"&gt;")}function k(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
d=a+"";if(Y)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d<q;){var r=c[d++],t=c[d];switch(r){case "&":L.test(t)?(b.e&&b.e("&"+t,f,P,g(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,P,g(b,c,d,e,f));break;case "</":if(k=/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===
t.length&&">"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,P,g(b,c,d,e,f));else{var u=c,G=d,y=b,x=f,D=P,C=e,S=n(u,G);S?(y.t&&y.t(S.name,x,D,g(y,u,G,C,x)),d=S.next):d=u.length}else b.e&&b.e("&lt;/",f,P,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,P,g(b,c,d,e,f));var ka=a.f[p];ka&Z&&(d=m(c,{name:p,next:d,c:ka},b,f,P,e))}else{var u=c,G=b,y=f,x=P,D=e,z=n(u,d);z?(G.w&&G.w(z.name,z.R,y,x,g(G,u,z.next,D,
y)),d=z.c&Z?m(u,z,G,y,x,D):z.next):d=u.length}else b.e&&b.e("&lt;",f,P,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l<q&&(">"!==c[l]||!/--$/.test(c[l-1]));l++);if(l<q){if(b.A){var v=c.slice(d,l).join("");b.A(v.substr(0,v.length-2),f,P,g(b,c,l+1,e,f))}d=l+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,P,g(b,c,d,e,f));break;case "<!":if(/^\w/.test(t)){if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,P,g(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,P,g(b,c,d,e,f));break;case "<?":if(!e.r){for(l=
d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,P,g(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,P,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,P,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==P)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;S.hasOwnProperty(c.name)||(S[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=S[c.name],p=c.next,q=c.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(c.c&a.c.CDATA)d.z&&d.z(m,f,k,g(d,b,
q,l,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(m),f,k,g(d,b,q,l,f));else throw Error("bug");return q}function n(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var k=b[d].substr(e[0].length),g=d+1,l=b.length;g<l&&">"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=O.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g<l;g++){if(n){if(">"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n=
e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(ca,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
if("attribs"in m)k=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=a.f[n]):(n=c,m=l);if(l&a.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===c&&(p.v!==n||c!==n)&&g.push("</",p.v,">")}l&a.c.EMPTY||e.push({D:c,v:n});g.push("<",n);c=0;for(p=k.length;c<p;c+=2){var q=k[c],r=k[c+1];null!==r&&void 0!==r&&g.push(" ",q,'="',d(r),'"')}g.push(">");l&a.c.EMPTY&&!(m&a.c.EMPTY)&&g.push("</",n,">")}else f=!(l&a.c.EMPTY)}}},endTag:function(b,c){if(f)f=!1;else if(a.f.hasOwnProperty(b)){var d=
a.f[b];if(!(d&(a.c.EMPTY|a.c.FOLDABLE))){if(d&a.c.OPTIONAL_ENDTAG)for(d=e.length;0<=--d;){var k=e[d].D;if(k===b)break;if(!(a.f[k]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(k=e.length;--k>d;){var g=e[k].v;a.f[g]&a.c.OPTIONAL_ENDTAG||c.push("</",g,">")}d<e.length&&(b=e[d].v);e.length=d;c.push("</",b,">")}}}},pcdata:c,rcdata:c,cdata:c,endDoc:function(a){for(;e.length;e.length--)a.push("</",e[e.length-1].v,">")}})}function q(a,b,c,d,e){if(!e)return null;try{var k=
f.parse(""+a);if(k&&(!k.K()||ga.test(k.W()))){var g=e(k,b,c,d);return g?g.toString():null}}catch(ia){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function G(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function I(b,c,d,e,f){for(var k=0;k<c.length;k+=2){var g=c[k],l=c[k+1],m=l,n=null,p;if((p=
b+"::"+g,a.m.hasOwnProperty(p))||(p="*::"+g,a.m.hasOwnProperty(p)))n=a.m[p];if(null!==n)switch(n){case a.d.NONE:break;case a.d.SCRIPT:l=null;f&&r(f,b,g,m,l);break;case a.d.STYLE:if("undefined"===typeof U){l=null;f&&r(f,b,g,m,l);break}var t=[];U(l,{declaration:function(b,c){var e=b.toLowerCase();R(e,c,d?function(b){return q(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&t.push(e+": "+c.join(" "))}});l=0<t.length?t.join(" ; "):null;f&&r(f,b,g,m,l);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:l=
e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,G(a.J,b,g),G(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function N(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:I(e,f,b,c,d)}}}function J(a,b){var c=[];p(b)(a,
c);return c.join("")}var U,R;"undefined"!==typeof window&&(U=window.parseCssDeclarations,R=window.sanitizeCssProperty);var V={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},X=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,aa="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,K=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,M=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,L=/&/g,O=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T=
/[<]/g,ba=/>/g,ca=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,Q={},S={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=N;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return J(a,N(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=J;ea.Ba=ea.unescapeEntities=c;return ea}(q);
e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,G(a.J,b,g),G(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function M(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:I(e,f,b,c,d)}}}function J(a,b){var c=[];p(b)(a,
c);return c.join("")}var U,R;"undefined"!==typeof window&&(U=window.parseCssDeclarations,R=window.sanitizeCssProperty);var V={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},X=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,Q="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,ca=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,L=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,K=/&/g,N=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T=
/[<]/g,aa=/>/g,ba=/\"/g,O=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,P={},S={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=M;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return J(a,M(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=J;ea.Ba=ea.unescapeEntities=c;return ea}(q);
c=a.sanitize;"undefined"!==typeof window&&(window.html=a,window.html_sanitize=c)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function b(c,d,e){function f(k,m){if(!d[k]){if(!c[k]){var l="function"==typeof require&&require;if(!m&&l)return l(k,!0);if(g)return g(k,!0);l=Error("Cannot find module '"+k+"'");throw l.code="MODULE_NOT_FOUND",l;}l=d[k]={exports:{}};
@ -115,76 +115,76 @@ d?(c[g++]=192|d>>>6,c[g++]=128|63&d):65536>d?(c[g++]=224|d>>>12,c[g++]=128|d>>>6
2===g?31:3===g?15:7;1<g&&d<m;)k=k<<6|63&b[d++],g--;1<g?n[f++]=65533:65536>k?n[f++]=k:(k-=65536,n[f++]=55296|k>>10&1023,n[f++]=56320|1023&k)}return e(n,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+l[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){var e=65535&b|0;b=b>>>16&65535|0;for(var f;0!==d;){f=2E3<d?2E3:d;d-=f;do e=e+c[k++]|0,b=b+e|0;while(--f);e%=65521;b%=65521}return e|b<<
16|0}},{}],6:[function(b,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(b,c,d){var e=function(){for(var b,c=[],d=0;256>d;d++){b=d;for(var e=
0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(v.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=0))}
function k(b,c){F._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+O,t=n[k+g-1],G=n[k+g];b.prev_length>=b.good_match&&(f>>=
2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===G&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<r;);if(e=O-(r-k),k=r-O,e>g){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];G=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window,
b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=E(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+
b.insert>=L)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+L-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<L)););}while(b.lookahead<T&&0!==b.strm.avail_in)}function q(b,c){for(var d,e;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=L&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
L-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d)),b.match_length>=L)if(e=F._tr_tally(b,b.strstart-b.match_start,b.match_length-L),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=L){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+L-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=F._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<L-1?b.strstart:L-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:Q):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Y}function r(b,c){for(var d,e,f;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return P;if(0===
b.lookahead)break}if(d=0,b.lookahead>=L&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+L-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=L-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d),5>=b.match_length&&(b.strategy===U||b.match_length===L&&4096<b.strstart-b.match_start)&&(b.match_length=L-1)),b.prev_length>=L&&b.match_length<=b.prev_length){f=
b.strstart+b.lookahead-L;e=F._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-L);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+L-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=L-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=F._tr_tally(b,0,b.window[b.strstart-1]),e&&k(b,!1),
b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(F._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<L-1?b.strstart:L-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:Q):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Y}function t(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function u(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
function k(b,c){E._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+N,t=n[k+g-1],G=n[k+g];b.prev_length>=b.good_match&&(f>>=
2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===G&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<r;);if(e=N-(r-k),k=r-N,e>g){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];G=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window,
b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=F(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+
b.insert>=K)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}while(b.lookahead<T&&0!==b.strm.avail_in)}function q(b,c){for(var d,e;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return O;if(0===b.lookahead)break}if(d=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d)),b.match_length>=K)if(e=E._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=E._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return O}return b.insert=b.strstart<K-1?b.strstart:K-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:P):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?O:Y}function r(b,c){for(var d,e,f;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return O;if(0===
b.lookahead)break}if(d=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d),5>=b.match_length&&(b.strategy===U||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=K&&b.match_length<=b.prev_length){f=
b.strstart+b.lookahead-K;e=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=K-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return O}else if(b.match_available){if(e=E._tr_tally(b,0,b.window[b.strstart-1]),e&&k(b,!1),
b.strstart++,b.lookahead--,0===b.strm.avail_out)return O}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(E._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:P):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?O:Y}function t(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function u(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=X;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=
this.ins_h=0;this.dyn_ltree=new v.Buf16(2*da);this.dyn_dtree=new v.Buf16(2*(2*aa+1));this.bl_tree=new v.Buf16(2*(2*K+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new v.Buf16(M+1);this.heap=new v.Buf16(2*W+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*W+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function y(b){var c;
return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ba:ca,b.adler=2===c.wrap?0:1,c.last_flush=B,F._tr_init(c),I):e(b,N)}function x(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
b.prev_length=L-1,b.match_available=0,b.ins_h=0);return c}function z(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===J&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>D||d!==X||8>f||15<f||0>c||9<c||0>g||g>R)return e(b,N);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+L-1)/L),m.window=new v.Buf8(2*m.w_size),m.head=new v.Buf16(m.hash_size),
m.prev=new v.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new v.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,x(b)}var A,v=b("../utils/common"),F=b("./trees"),H=b("./adler32"),E=b("./crc32"),C=b("./messages"),B=0,G=4,I=0,N=-2,J=-1,U=1,R=4,V=2,X=8,D=9,W=286,aa=30,K=19,da=2*W+1,M=15,L=3,O=258,T=O+L+1,ba=42,ca=113,P=1,Y=2,Z=3,Q=4;A=[new t(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===B)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:Q):(b.strstart>b.block_start&&k(b,!1),P)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32,
32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return z(b,c,X,15,8,0)};d.deflateInit2=z;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,I):N};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==G)return e(b,
0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ba)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
8&255)),n.gzhead.hcrc&&(b.adler=E(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ca)):(q=X+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ca,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-
q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=
1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ca)):n.status=ca),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)-
(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==B&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===B){t=P;break a}break}if(n.match_length=0,u=F._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=P;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:Q):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
P:Y)}else if(3===n.strategy)a:{var D,y;for(u=n.window;;){if(n.lookahead<=O){if(p(n),n.lookahead<=O&&c===B){t=P;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=L&&0<n.strstart&&(y=n.strstart-1,D=u[y],D===u[++y]&&D===u[++y]&&D===u[++y])){for(d=n.strstart+O;D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&y<d;);n.match_length=O-(d-y);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=L?(t=F._tr_tally(n,1,n.match_length-
L),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=F._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=P;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:Q):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?P:Y)}else t=A[n.level].func(n,c);if(t!==Z&&t!==Q||(n.status=666),t===P||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Y&&(1===c?F._tr_align(n):5!==c&&(F._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0===
n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==G?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?I:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==ba&&69!==c&&73!==c&&91!==
c&&103!==c&&c!==ca&&666!==c?e(b,N):(b.state=null,c===ca?e(b,-3):I)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==ba||d.lookahead))return N;1===g&&(b.adler=H(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>=
L;){e=d.strstart;k=d.lookahead-(L-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+L-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=L-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=L-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,I};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,m,n,p,q,r,t,u,y,x,z,A,v,F,H,E,C,B,G,I,N,J;d=b.state;e=b.next_in;N=b.input;f=e+(b.avail_in-5);m=b.next_out;J=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);q=d.dmax;r=d.wsize;t=d.whave;u=d.wnext;y=d.window;x=d.hold;z=d.bits;A=d.lencode;v=d.distcode;F=(1<<d.lenbits)-
1;H=(1<<d.distbits)-1;a:do b:for(15>z&&(x+=N[e++]<<z,z+=8,x+=N[e++]<<z,z+=8),E=A[x&F];;){if(C=E>>>24,x>>>=C,z-=C,C=E>>>16&255,0===C)J[m++]=65535&E;else{if(!(16&C)){if(0===(64&C)){E=A[(65535&E)+(x&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}B=65535&E;(C&=15)&&(z<C&&(x+=N[e++]<<z,z+=8),B+=x&(1<<C)-1,x>>>=C,z-=C);15>z&&(x+=N[e++]<<z,z+=8,x+=N[e++]<<z,z+=8);E=v[x&H];c:for(;;){if(C=E>>>24,x>>>=C,z-=C,C=E>>>16&255,!(16&C)){if(0===(64&C)){E=v[(65535&
E)+(x&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&E,C&=15,z<C&&(x+=N[e++]<<z,z+=8,z<C&&(x+=N[e++]<<z,z+=8)),G+=x&(1<<C)-1,G>q){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,z-=C,C=m-n,G>C){if(C=G-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,I=y,0===u){if(E+=r-C,C<B){B-=C;do J[m++]=y[E++];while(--C);E=m-G;I=J}}else if(u<C){if(E+=r+u-C,C-=u,C<B){B-=C;do J[m++]=y[E++];while(--C);if(E=0,u<B){C=u;B-=C;do J[m++]=y[E++];
while(--C);E=m-G;I=J}}}else if(E+=u-C,C<B){B-=C;do J[m++]=y[E++];while(--C);E=m-G;I=J}for(;2<B;)J[m++]=I[E++],J[m++]=I[E++],J[m++]=I[E++],B-=3;B&&(J[m++]=I[E++],1<B&&(J[m++]=I[E++]))}else{E=m-G;do J[m++]=J[E++],J[m++]=J[E++],J[m++]=J[E++],B-=3;while(2<B);B&&(J[m++]=J[E++],1<B&&(J[m++]=J[E++]))}break}}break}while(e<f&&m<p);B=z>>3;e-=B;z-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=x&(1<<z)-1;d.bits=z}},{}],11:[function(b,c,d){function e(b){return(b>>>
this.ins_h=0;this.dyn_ltree=new v.Buf16(2*da);this.dyn_dtree=new v.Buf16(2*(2*Q+1));this.bl_tree=new v.Buf16(2*(2*ca+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new v.Buf16(L+1);this.heap=new v.Buf16(2*W+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*W+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function y(b){var c;
return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?aa:ba,b.adler=2===c.wrap?0:1,c.last_flush=B,E._tr_init(c),I):e(b,M)}function x(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
b.prev_length=K-1,b.match_available=0,b.ins_h=0);return c}function z(b,c,d,f,k,g){if(!b)return M;var l=1;if(c===J&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>D||d!==X||8>f||15<f||0>c||9<c||0>g||g>R)return e(b,M);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+K-1)/K),m.window=new v.Buf8(2*m.w_size),m.head=new v.Buf16(m.hash_size),
m.prev=new v.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new v.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,x(b)}var A,v=b("../utils/common"),E=b("./trees"),H=b("./adler32"),F=b("./crc32"),C=b("./messages"),B=0,G=4,I=0,M=-2,J=-1,U=1,R=4,V=2,X=8,D=9,W=286,Q=30,ca=19,da=2*W+1,L=15,K=3,N=258,T=N+K+1,aa=42,ba=113,O=1,Y=2,Z=3,P=4;A=[new t(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===B)return O;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return O}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:P):(b.strstart>b.block_start&&k(b,!1),O)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32,
32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return z(b,c,X,15,8,0)};d.deflateInit2=z;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?M:(b.state.gzhead=c,I):M};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5<c||0>c)return b?e(b,M):M;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==G)return e(b,
0===b.avail_out?-5:M);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===aa)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
8&255)),n.gzhead.hcrc&&(b.adler=F(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(q=X+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ba,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-
q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=
1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)-
(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==B&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===B){t=O;break a}break}if(n.match_length=0,u=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=O;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:P):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
O:Y)}else if(3===n.strategy)a:{var D,y;for(u=n.window;;){if(n.lookahead<=N){if(p(n),n.lookahead<=N&&c===B){t=O;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=K&&0<n.strstart&&(y=n.strstart-1,D=u[y],D===u[++y]&&D===u[++y]&&D===u[++y])){for(d=n.strstart+N;D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&y<d;);n.match_length=N-(d-y);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=K?(t=E._tr_tally(n,1,n.match_length-
K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=O;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:P):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?O:Y)}else t=A[n.level].func(n,c);if(t!==Z&&t!==P||(n.status=666),t===O||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Y&&(1===c?E._tr_align(n):5!==c&&(E._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0===
n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==G?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?I:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==aa&&69!==c&&73!==c&&91!==
c&&103!==c&&c!==ba&&666!==c?e(b,M):(b.state=null,c===ba?e(b,-3):I)):M};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==aa||d.lookahead))return M;1===g&&(b.adler=H(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>=
K;){e=d.strstart;k=d.lookahead-(K-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+K-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=K-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=K-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,I};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,m,n,p,q,r,t,u,y,x,z,A,v,E,H,F,C,B,G,I,M,J;d=b.state;e=b.next_in;M=b.input;f=e+(b.avail_in-5);m=b.next_out;J=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);q=d.dmax;r=d.wsize;t=d.whave;u=d.wnext;y=d.window;x=d.hold;z=d.bits;A=d.lencode;v=d.distcode;E=(1<<d.lenbits)-
1;H=(1<<d.distbits)-1;a:do b:for(15>z&&(x+=M[e++]<<z,z+=8,x+=M[e++]<<z,z+=8),F=A[x&E];;){if(C=F>>>24,x>>>=C,z-=C,C=F>>>16&255,0===C)J[m++]=65535&F;else{if(!(16&C)){if(0===(64&C)){F=A[(65535&F)+(x&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}B=65535&F;(C&=15)&&(z<C&&(x+=M[e++]<<z,z+=8),B+=x&(1<<C)-1,x>>>=C,z-=C);15>z&&(x+=M[e++]<<z,z+=8,x+=M[e++]<<z,z+=8);F=v[x&H];c:for(;;){if(C=F>>>24,x>>>=C,z-=C,C=F>>>16&255,!(16&C)){if(0===(64&C)){F=v[(65535&
F)+(x&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&F,C&=15,z<C&&(x+=M[e++]<<z,z+=8,z<C&&(x+=M[e++]<<z,z+=8)),G+=x&(1<<C)-1,G>q){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,z-=C,C=m-n,G>C){if(C=G-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(F=0,I=y,0===u){if(F+=r-C,C<B){B-=C;do J[m++]=y[F++];while(--C);F=m-G;I=J}}else if(u<C){if(F+=r+u-C,C-=u,C<B){B-=C;do J[m++]=y[F++];while(--C);if(F=0,u<B){C=u;B-=C;do J[m++]=y[F++];
while(--C);F=m-G;I=J}}}else if(F+=u-C,C<B){B-=C;do J[m++]=y[F++];while(--C);F=m-G;I=J}for(;2<B;)J[m++]=I[F++],J[m++]=I[F++],J[m++]=I[F++],B-=3;B&&(J[m++]=I[F++],1<B&&(J[m++]=I[F++]))}else{F=m-G;do J[m++]=J[F++],J[m++]=J[F++],J[m++]=J[F++],B-=3;while(2<B);B&&(J[m++]=J[F++],1<B&&(J[m++]=J[F++]))}break}}break}while(e<f&&m<p);B=z>>3;e-=B;z-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=x&(1<<z)-1;d.bits=z}},{}],11:[function(b,c,d){function e(b){return(b>>>
24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.distdyn=this.lendyn=null;this.was=
this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=v,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(F),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,z):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=v,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(E),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,z):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
c)?A:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):A}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==z&&(b.state=null),d):A}function n(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new r.Buf8(b.wsize)),e>=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext=
e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,q,r=b("../utils/common"),t=b("./adler32"),u=b("./crc32"),y=b("./inffast"),x=b("./inftrees"),z=0,A=-2,v=1,F=852,H=592,E=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,C,B,D,W,F,K,H,M,L,O,T,ba,ca,P,Y,Z,Q=0,S=new r.Buf8(4),ga=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
!b.output||!b.input&&0!==b.avail_in)return A;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;W=m;F=C;Y=z;a:for(;;)switch(d.mode){case v:if(0===d.wrap){d.mode=13;break}for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(2&d.wrap&&35615===B){d.check=0;S[0]=255&B;S[1]=B>>>8&255;d.check=u(d.check,S,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check";
d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,P=(15&B)+8,0===d.wbits)d.wbits=P;else if(P>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<P;b.adler=d.check=1;d.mode=512&B?10:12;D=B=0;break;case 2:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.flags=B,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";d.mode=30;break}d.head&&(d.head.text=B>>8&1);512&d.flags&&
e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,q,r=b("../utils/common"),t=b("./adler32"),u=b("./crc32"),y=b("./inffast"),x=b("./inftrees"),z=0,A=-2,v=1,E=852,H=592,F=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,C,B,D,W,Q,E,H,L,K,N,T,aa,ba,O,Y,Z,P=0,S=new r.Buf8(4),ga=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
!b.output||!b.input&&0!==b.avail_in)return A;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;W=m;Q=C;Y=z;a:for(;;)switch(d.mode){case v:if(0===d.wrap){d.mode=13;break}for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(2&d.wrap&&35615===B){d.check=0;S[0]=255&B;S[1]=B>>>8&255;d.check=u(d.check,S,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check";
d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,O=(15&B)+8,0===d.wbits)d.wbits=O;else if(O>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<O;b.adler=d.check=1;d.mode=512&B?10:12;D=B=0;break;case 2:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.flags=B,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";d.mode=30;break}d.head&&(d.head.text=B>>8&1);512&d.flags&&
(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0;d.mode=3;case 3:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.head&&(d.head.time=B);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,S[2]=B>>>16&255,S[3]=B>>>24&255,d.check=u(d.check,S,4,0));D=B=0;d.mode=4;case 4:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.head&&(d.head.xflags=255&B,d.head.os=B>>8);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0;d.mode=5;case 5:if(1024&d.flags){for(;16>D;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}d.length=B;d.head&&(d.head.extra_len=B);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(K=d.length,K>m&&(K=m),K&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,K,P)),512&d.flags&&(d.check=u(d.check,f,K,g)),m-=K,g+=K,d.length-=K),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;K=0;do P=f[g+
K++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&K<m);if(512&d.flags&&(d.check=u(d.check,f,K,g)),m-=K,g+=K,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;K=0;do P=f[g+K++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&K<m);if(512&d.flags&&(d.check=u(d.check,f,K,g)),m-=K,g+=K,P)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>D;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}d.length=B;d.head&&(d.head.extra_len=B);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(E=d.length,E>m&&(E=m),E&&(d.head&&(O=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,E,O)),512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,d.length-=E),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;E=0;do O=f[g+
E++],d.head&&O&&65536>d.length&&(d.head.name+=String.fromCharCode(O));while(O&&E<m);if(512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,O)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;E=0;do O=f[g+E++],d.head&&O&&65536>d.length&&(d.head.comment+=String.fromCharCode(O));while(O&&E<m);if(512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,O)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>D;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}if(B!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}D=B=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}b.adler=d.check=e(B);D=B=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){B>>>=7&D;D-=7&D;d.mode=27;break}for(;3>D;){if(0===
m)break a;m--;B+=f[g++]<<D;D+=8}switch(d.last=1&B,B>>>=1,--D,3&B){case 0:d.mode=14;break;case 1:O=d;if(E){p=new r.Buf32(512);q=new r.Buf32(32);for(M=0;144>M;)O.lens[M++]=8;for(;256>M;)O.lens[M++]=9;for(;280>M;)O.lens[M++]=7;for(;288>M;)O.lens[M++]=8;x(1,O.lens,0,288,p,0,O.work,{bits:9});for(M=0;32>M;)O.lens[M++]=5;x(2,O.lens,0,32,q,0,O.work,{bits:5});E=!1}O.lencode=p;O.lenbits=9;O.distcode=q;O.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if((65535&B)!==(B>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(K=d.length){if(K>m&&(K=m),K>C&&(K=C),0===K)break a;r.arraySet(k,f,g,K,l);m-=K;g+=K;C-=K;l+=K;d.length-=K;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.nlen=(31&B)+257,B>>>=5,D-=5,d.ndist=(31&B)+
m)break a;m--;B+=f[g++]<<D;D+=8}switch(d.last=1&B,B>>>=1,--D,3&B){case 0:d.mode=14;break;case 1:N=d;if(F){p=new r.Buf32(512);q=new r.Buf32(32);for(L=0;144>L;)N.lens[L++]=8;for(;256>L;)N.lens[L++]=9;for(;280>L;)N.lens[L++]=7;for(;288>L;)N.lens[L++]=8;x(1,N.lens,0,288,p,0,N.work,{bits:9});for(L=0;32>L;)N.lens[L++]=5;x(2,N.lens,0,32,q,0,N.work,{bits:5});F=!1}N.lencode=p;N.lenbits=9;N.distcode=q;N.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if((65535&B)!==(B>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(E=d.length){if(E>m&&(E=m),E>C&&(E=C),0===E)break a;r.arraySet(k,f,g,E,l);m-=E;g+=E;C-=E;l+=E;d.length-=E;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.nlen=(31&B)+257,B>>>=5,D-=5,d.ndist=(31&B)+
1,B>>>=5,D-=5,d.ncode=(15&B)+4,B>>>=4,D-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.lens[ga[d.have++]]=7&B;B>>>=3;D-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},Y=x(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
d.nlen+d.ndist;){for(;Q=d.lencode[B&(1<<d.lenbits)-1],L=Q>>>24,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(16>O)B>>>=L,D-=L,d.lens[d.have++]=O;else{if(16===O){for(M=L+2;D<M;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B>>>=L,D-=L,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];K=3+(3&B);B>>>=2;D-=2}else if(17===O){for(M=L+3;D<M;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=L;D-=L;P=0;K=3+(7&B);B>>>=3;D-=3}else{for(M=L+7;D<M;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}B>>>=L;D-=L;P=0;K=11+(127&B);B>>>=7;D-=7}if(d.have+K>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;K--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},Y=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},Y=x(2,d.lens,d.nlen,d.ndist,
d.distcode,0,d.work,Z),d.distbits=Z.bits,Y){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,F);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;Q=d.lencode[B&(1<<d.lenbits)-1],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(M&&0===(240&M)){T=
L;ba=M;for(ca=O;Q=d.lencode[ca+((B&(1<<T+ba)-1)>>T)],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(T+L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=T;D-=T;d.back+=T}if(B>>>=L,D-=L,d.back+=L,d.length=O,0===M){d.mode=26;break}if(32&M){d.back=-1;d.mode=12;break}if(64&M){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&M;d.mode=22;case 22:if(d.extra){for(M=d.extra;D<M;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.length+=B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
23;case 23:for(;Q=d.distcode[B&(1<<d.distbits)-1],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(0===(240&M)){T=L;ba=M;for(ca=O;Q=d.distcode[ca+((B&(1<<T+ba)-1)>>T)],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(T+L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=T;D-=T;d.back+=T}if(B>>>=L,D-=L,d.back+=L,64&M){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&M;d.mode=24;case 24:if(d.extra){for(M=d.extra;D<M;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.offset+=
B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(K=F-C,d.offset>K){if(K=d.offset-K,K>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}K>d.wnext?(K-=d.wnext,H=d.wsize-K):H=d.wnext-K;K>d.length&&(K=d.length);M=d.window}else M=k,H=l-d.offset,K=d.length;K>C&&(K=C);C-=K;d.length-=K;do k[l++]=M[H++];while(--K);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<<D;D+=8}if(F-=C,b.total_out+=F,d.total+=F,F&&(b.adler=d.check=d.flags?u(d.check,k,F,l-F):t(d.check,k,F,l-F)),F=C,(d.flags?B:e(B))!==d.check){b.msg="incorrect data check";d.mode=30;break}D=B=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}D=B=0}d.mode=29;case 29:Y=1;break a;case 30:Y=
-3;break a;case 31:return-4;default:return A}return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,(d.wsize||F!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,F-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,F-=b.avail_out,b.total_in+=W,b.total_out+=F,d.total+=F,d.wrap&&F&&(b.adler=d.check=d.flags?u(d.check,k,F,b.next_out-F):t(d.check,k,F,b.next_out-F)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&0===F||4===
d.nlen+d.ndist;){for(;P=d.lencode[B&(1<<d.lenbits)-1],K=P>>>24,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(16>N)B>>>=K,D-=K,d.lens[d.have++]=N;else{if(16===N){for(L=K+2;D<L;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B>>>=K,D-=K,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}O=d.lens[d.have-1];E=3+(3&B);B>>>=2;D-=2}else if(17===N){for(L=K+3;D<L;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=K;D-=K;O=0;E=3+(7&B);B>>>=3;D-=3}else{for(L=K+7;D<L;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}B>>>=K;D-=K;O=0;E=11+(127&B);B>>>=7;D-=7}if(d.have+E>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;E--;)d.lens[d.have++]=O}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},Y=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},Y=x(2,d.lens,d.nlen,d.ndist,
d.distcode,0,d.work,Z),d.distbits=Z.bits,Y){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,Q);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;P=d.lencode[B&(1<<d.lenbits)-1],K=P>>>24,L=P>>>16&255,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(L&&0===(240&L)){T=
K;aa=L;for(ba=N;P=d.lencode[ba+((B&(1<<T+aa)-1)>>T)],K=P>>>24,L=P>>>16&255,N=65535&P,!(T+K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=T;D-=T;d.back+=T}if(B>>>=K,D-=K,d.back+=K,d.length=N,0===L){d.mode=26;break}if(32&L){d.back=-1;d.mode=12;break}if(64&L){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&L;d.mode=22;case 22:if(d.extra){for(L=d.extra;D<L;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.length+=B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
23;case 23:for(;P=d.distcode[B&(1<<d.distbits)-1],K=P>>>24,L=P>>>16&255,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(0===(240&L)){T=K;aa=L;for(ba=N;P=d.distcode[ba+((B&(1<<T+aa)-1)>>T)],K=P>>>24,L=P>>>16&255,N=65535&P,!(T+K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=T;D-=T;d.back+=T}if(B>>>=K,D-=K,d.back+=K,64&L){b.msg="invalid distance code";d.mode=30;break}d.offset=N;d.extra=15&L;d.mode=24;case 24:if(d.extra){for(L=d.extra;D<L;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.offset+=
B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(E=Q-C,d.offset>E){if(E=d.offset-E,E>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}E>d.wnext?(E-=d.wnext,H=d.wsize-E):H=d.wnext-E;E>d.length&&(E=d.length);L=d.window}else L=k,H=l-d.offset,E=d.length;E>C&&(E=C);C-=E;d.length-=E;do k[l++]=L[H++];while(--E);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<<D;D+=8}if(Q-=C,b.total_out+=Q,d.total+=Q,Q&&(b.adler=d.check=d.flags?u(d.check,k,Q,l-Q):t(d.check,k,Q,l-Q)),Q=C,(d.flags?B:e(B))!==d.check){b.msg="incorrect data check";d.mode=30;break}D=B=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}D=B=0}d.mode=29;case 29:Y=1;break a;case 30:Y=
-3;break a;case 31:return-4;default:return A}return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,(d.wsize||Q!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,Q-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,Q-=b.avail_out,b.total_in+=W,b.total_out+=Q,d.total+=Q,d.wrap&&Q&&(b.adler=d.check=d.flags?u(d.check,k,Q,b.next_out-Q):t(d.check,k,Q,b.next_out-Q)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&0===Q||4===
c)&&Y===z&&(Y=-5),Y)};d.inflateEnd=function(b){if(!b||!b.state)return A;var c=b.state;return c.window&&(c.window=null),b.state=null,z};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?A:(d.head=c,c.done=!1,z)):A};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?A:11===d.mode&&(e=1,e=t(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,z)):A};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,q,r,t,u,y){var m,n,p,v,F,H,E,C,B=y.bits,G,I,N,J,U,R,V=0,X,D=null,W=0,aa=new e.Buf16(16);v=new e.Buf16(16);var K=null,da=0;for(G=0;15>=G;G++)aa[G]=0;for(I=0;I<q;I++)aa[c[d+I]]++;J=B;for(N=15;1<=N&&0===aa[N];N--);if(J>N&&(J=N),0===N)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B<N&&0===aa[B];B++);J<B&&(J=B);for(G=m=1;15>=G;G++)if(m<<=1,m-=aa[G],0>m)return-1;if(0<m&&(0===b||1!==N))return-1;v[1]=0;for(G=1;15>G;G++)v[G+1]=v[G]+
aa[G];for(I=0;I<q;I++)0!==c[d+I]&&(u[v[c[d+I]]++]=I);if(0===b?(D=K=u,F=19):1===b?(D=f,W-=257,K=g,da-=257,F=256):(D=k,K=l,F=-1),X=0,I=0,G=B,v=t,U=J,R=0,p=-1,V=1<<J,q=V-1,1===b&&852<V||2===b&&592<V)return 1;for(var M=0;;){M++;H=G-R;u[I]<F?(E=0,C=u[I]):u[I]>F?(E=K[da+u[I]],C=D[W+u[I]]):(E=96,C=0);m=1<<G-R;B=n=1<<U;do n-=m,r[v+(X>>R)+n]=H<<24|E<<16|C|0;while(0!==n);for(m=1<<G-1;X&m;)m>>=1;if(0!==m?(X&=m-1,X+=m):X=0,I++,0===--aa[G]){if(G===N)break;G=c[d+u[I]]}if(G>J&&(X&q)!==p){0===R&&(R=J);v+=B;U=G-R;
for(m=1<<U;U+R<N&&(m-=aa[U+R],!(0>=m));)U++,m<<=1;if(V+=1<<U,1===b&&852<V||2===b&&592<V)return 1;p=X&q;r[p]=J<<24|U<<16|v-t|0}}return 0!==X&&(r[v+X]=G-R<<24|4194304),y.bits=J,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,q,r,t,u,y){var m,n,p,v,E,H,F,C,B=y.bits,G,I,M,J,U,R,V=0,X,D=null,W=0,Q=new e.Buf16(16);v=new e.Buf16(16);var ca=null,da=0;for(G=0;15>=G;G++)Q[G]=0;for(I=0;I<q;I++)Q[c[d+I]]++;J=B;for(M=15;1<=M&&0===Q[M];M--);if(J>M&&(J=M),0===M)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B<M&&0===Q[B];B++);J<B&&(J=B);for(G=m=1;15>=G;G++)if(m<<=1,m-=Q[G],0>m)return-1;if(0<m&&(0===b||1!==M))return-1;v[1]=0;for(G=1;15>G;G++)v[G+1]=v[G]+Q[G];
for(I=0;I<q;I++)0!==c[d+I]&&(u[v[c[d+I]]++]=I);if(0===b?(D=ca=u,E=19):1===b?(D=f,W-=257,ca=g,da-=257,E=256):(D=k,ca=l,E=-1),X=0,I=0,G=B,v=t,U=J,R=0,p=-1,V=1<<J,q=V-1,1===b&&852<V||2===b&&592<V)return 1;for(var L=0;;){L++;H=G-R;u[I]<E?(F=0,C=u[I]):u[I]>E?(F=ca[da+u[I]],C=D[W+u[I]]):(F=96,C=0);m=1<<G-R;B=n=1<<U;do n-=m,r[v+(X>>R)+n]=H<<24|F<<16|C|0;while(0!==n);for(m=1<<G-1;X&m;)m>>=1;if(0!==m?(X&=m-1,X+=m):X=0,I++,0===--Q[G]){if(G===M)break;G=c[d+u[I]]}if(G>J&&(X&q)!==p){0===R&&(R=J);v+=B;U=G-R;for(m=
1<<U;U+R<M&&(m-=Q[U+R],!(0>=m));)U++,m<<=1;if(V+=1<<U,1===b&&852<V||2===b&&592<V)return 1;p=X&q;r[p]=J<<24|U<<16|v-t|0}}return 0!==X&&(r[v+X]=G-R<<24|4194304),y.bits=J,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>V-d?(b.bi_buf|=c<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=c>>V-b.bi_valid,b.bi_valid+=d-V):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function m(b,c,d){l(b,d[2*c],d[2*c+1])}function n(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;while(0<
--c);return d>>>1}function p(b,c,d){var e,f=Array(R+1),k=0;for(e=1;e<=R;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;c<I;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<J;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*X]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function t(b,c,d,e){var f=2*c,k=2*d;return b[f]<
b[k]||b[f]===b[k]&&e[c]<=e[d]}function u(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&t(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!t(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function y(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=ca[f],m(b,k+G+1,c),g=K[k],0!==g&&(f-=P[k],l(b,f,g)),e--,k=256>e?ba[e]:ba[256+(e>>>7)],m(b,k,d),g=da[k],0!==g&&(e-=Y[k],l(b,
e,g)));while(n<b.last_lit)}m(b,X,c)}function x(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],b.heap[--b.heap_max]=
--c);return d>>>1}function p(b,c,d){var e,f=Array(R+1),k=0;for(e=1;e<=R;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;c<I;c++)b.dyn_ltree[2*c]=0;for(c=0;c<M;c++)b.dyn_dtree[2*c]=0;for(c=0;c<J;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*X]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function t(b,c,d,e){var f=2*c,k=2*d;return b[f]<
b[k]||b[f]===b[k]&&e[c]<=e[d]}function u(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&t(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!t(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function y(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=ba[f],m(b,k+G+1,c),g=ca[k],0!==g&&(f-=O[k],l(b,f,g)),e--,k=256>e?aa[e]:aa[256+(e>>>7)],m(b,k,d),g=da[k],0!==g&&(e-=Y[k],
l(b,e,g)));while(n<b.last_lit)}m(b,X,c)}function x(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],b.heap[--b.heap_max]=
d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,u(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,g=c.dyn_tree,l=c.max_code,r=c.stat_desc.static_tree,t=c.stat_desc.has_stree,D=c.stat_desc.extra_bits,y=c.stat_desc.extra_base,x=c.stat_desc.max_length,B=0;for(e=0;e<=R;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<U;d++)f=b.heap[d],e=g[2*g[2*f+1]+1]+1,e>x&&(e=x,B++),g[2*
f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=y&&(n=D[f-y]),q=g[2*f],b.opt_len+=q*(e+n),t&&(b.static_len+=q*(r[2*f+1]+n)));if(0!==B){do{for(e=x-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[x]--;B-=2}while(0<B);for(e=x;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function z(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,g=c[2*(e+1)+1],++l<m&&
f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*D]++):10>=l?b.bl_tree[2*W]++:b.bl_tree[2*aa]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,D,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,aa,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138,
q=3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return C;return E}function F(b,c,d,e){l(b,(B<<1)+(e?1:0),3);r(b);k(b,d);k(b,~d);H.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var H=b("../utils/common"),E=0,C=1,B=0,G=256,I=G+1+29,N=30,J=19,U=2*I+1,R=15,V=16,X=256,D=16,W=17,aa=18,K=[0,0,0,0,0,
0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],da=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=Array(2*(I+2));e(O);var T=Array(2*N);e(T);var ba=Array(512);e(ba);var ca=Array(256);e(ca);var P=Array(29);e(P);var Y=Array(N);e(Y);var Z,Q,S,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(R+1);for(e=d=0;28>e;e++)for(P[e]=d,c=0;c<1<<K[e];c++)ca[d++]=e;ca[d-1]=e;for(e=d=0;16>e;e++)for(Y[e]=
d,c=0;c<1<<da[e];c++)ba[d++]=e;for(d>>=7;e<N;e++)for(Y[e]=d<<7,c=0;c<1<<da[e]-7;c++)ba[256+d++]=e;for(c=0;c<=R;c++)k[c]=0;for(c=0;143>=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,I+1,k);for(c=0;c<N;c++)T[2*c+1]=5,T[2*c]=n(c,5);Z=new f(O,K,G+1,I,R);Q=new f(T,da,0,N,R);S=new f([],M,0,J,7);ga=!0}b.l_desc=new g(b.dyn_ltree,Z);b.d_desc=new g(b.dyn_dtree,Q);b.bl_desc=new g(b.bl_tree,S);b.bi_buf=0;b.bi_valid=0;q(b)};
d._tr_stored_block=F;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=v(b));x(b,b.l_desc);x(b,b.d_desc);z(b,b.dyn_ltree,b.l_desc.max_code);z(b,b.dyn_dtree,b.d_desc.max_code);x(b,b.bl_desc);for(g=J-1;3<=g&&0===b.bl_tree[2*L[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)F(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,O,T);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+
1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*L[f]+1],3);A(b,b.dyn_ltree,c-1);A(b,b.dyn_dtree,d-1);y(b,b.dyn_ltree,b.dyn_dtree)}q(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ca[d]+G+1)]++,b.dyn_dtree[2*(256>c?ba[c]:ba[256+(c>>>7)])]++),b.last_lit===
b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,X,O);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign;
f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*D]++):10>=l?b.bl_tree[2*W]++:b.bl_tree[2*Q]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,D,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,Q,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138,q=
3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return F;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return C;return F}function E(b,c,d,e){l(b,(B<<1)+(e?1:0),3);r(b);k(b,d);k(b,~d);H.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var H=b("../utils/common"),F=0,C=1,B=0,G=256,I=G+1+29,M=30,J=19,U=2*I+1,R=15,V=16,X=256,D=16,W=17,Q=18,ca=[0,0,0,0,0,0,
0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],da=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=Array(2*(I+2));e(N);var T=Array(2*M);e(T);var aa=Array(512);e(aa);var ba=Array(256);e(ba);var O=Array(29);e(O);var Y=Array(M);e(Y);var Z,P,S,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(R+1);for(e=d=0;28>e;e++)for(O[e]=d,c=0;c<1<<ca[e];c++)ba[d++]=e;ba[d-1]=e;for(e=d=0;16>e;e++)for(Y[e]=
d,c=0;c<1<<da[e];c++)aa[d++]=e;for(d>>=7;e<M;e++)for(Y[e]=d<<7,c=0;c<1<<da[e]-7;c++)aa[256+d++]=e;for(c=0;c<=R;c++)k[c]=0;for(c=0;143>=c;)N[2*c+1]=8,c++,k[8]++;for(;255>=c;)N[2*c+1]=9,c++,k[9]++;for(;279>=c;)N[2*c+1]=7,c++,k[7]++;for(;287>=c;)N[2*c+1]=8,c++,k[8]++;p(N,I+1,k);for(c=0;c<M;c++)T[2*c+1]=5,T[2*c]=n(c,5);Z=new f(N,ca,G+1,I,R);P=new f(T,da,0,M,R);S=new f([],L,0,J,7);ga=!0}b.l_desc=new g(b.dyn_ltree,Z);b.d_desc=new g(b.dyn_dtree,P);b.bl_desc=new g(b.bl_tree,S);b.bi_buf=0;b.bi_valid=0;q(b)};
d._tr_stored_block=E;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=v(b));x(b,b.l_desc);x(b,b.d_desc);z(b,b.dyn_ltree,b.l_desc.max_code);z(b,b.dyn_dtree,b.d_desc.max_code);x(b,b.bl_desc);for(g=J-1;3<=g&&0===b.bl_tree[2*K[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)E(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,N,T);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+
1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*K[f]+1],3);A(b,b.dyn_ltree,c-1);A(b,b.dyn_dtree,d-1);y(b,b.dyn_ltree,b.dyn_dtree)}q(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ba[d]+G+1)]++,b.dyn_dtree[2*(256>c?aa[c]:aa[256+(c>>>7)])]++),b.last_lit===
b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,X,N);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign;
var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
@ -523,9 +523,9 @@ mxConstants.ALIGN_CENTER?l-=c/2:e==mxConstants.ALIGN_RIGHT&&(l-=c);a+=l;f==mxCon
n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==l){var t="vertical-align:top;";n?t+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?t+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(t+="width:"+Math.round(c+1)+"px;",0<d&&(t+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var t=k&&0<c?t+("width:"+
Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):t+"white-space:nowrap;",u=this.createElement("g");1>r.alpha&&u.setAttribute("opacity",r.alpha);var y=this.createElement("foreignObject");y.setAttribute("style","overflow:visible;");y.setAttribute("pointer-events","all");t=this.createDiv(e,f,g,t,m);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(y);this.root.appendChild(u);var x,z;q=x=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
document?(t.style.visibility="hidden",document.body.appendChild(t)):y.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==y&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(F=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<
A.offsetWidth&&(t.style.whiteSpace=F));x=v+x-1;k&&"fill"!=m&&"width"!=m&&(n&&(x=Math.min(x,c)),t.style.width=x+"px");x=A.offsetWidth;z=A.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=x,u.mxCachedFinalOffsetHeight=z);z-=q;t.parentNode!=y&&(y.appendChild(t),t.style.visibility="")}else{A=document.createElement("div");A.style.cssText=t.getAttribute("style");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.position="absolute";A.style.visibility="hidden";z=document.createElement("div");
z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;A.appendChild(z);document.body.appendChild(A);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(x+=2,q+=2);if(k&&0<c){var v=z.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var F=A.style.whiteSpace;z.style.whiteSpace="nowrap";v<z.offsetWidth&&(A.style.whiteSpace=F)}n&&(v=Math.min(v,c));A.style.width=v+"px";
document?(t.style.visibility="hidden",document.body.appendChild(t)):y.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==y&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(E=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<
A.offsetWidth&&(t.style.whiteSpace=E));x=v+x-1;k&&"fill"!=m&&"width"!=m&&(n&&(x=Math.min(x,c)),t.style.width=x+"px");x=A.offsetWidth;z=A.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=x,u.mxCachedFinalOffsetHeight=z);z-=q;t.parentNode!=y&&(y.appendChild(t),t.style.visibility="")}else{A=document.createElement("div");A.style.cssText=t.getAttribute("style");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.position="absolute";A.style.visibility="hidden";z=document.createElement("div");
z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;A.appendChild(z);document.body.appendChild(A);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(x+=2,q+=2);if(k&&0<c){var v=z.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var E=A.style.whiteSpace;z.style.whiteSpace="nowrap";v<z.offsetWidth&&(A.style.whiteSpace=E)}n&&(v=Math.min(v,c));A.style.width=v+"px";
x=z.offsetWidth+x+0;z=z.offsetHeight+q;A.style.display="inline-block";A.style.position="";A.style.visibility="";A.style.width=x+"px";t.setAttribute("style",A.style.cssText)}else x=z.offsetWidth+x,z=z.offsetHeight+q;A.parentNode.removeChild(A);y.appendChild(t)}n&&(z=Math.min(z,d),x=Math.min(x,c));"width"==m?d=z:"fill"!=m&&(c=x,d=z);1>r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;A=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(A+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=p&&(A+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+A);y.setAttribute("width",
Math.round(Math.max(1,c)));y.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(y,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(y.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(y),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
@ -573,9 +573,9 @@ mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p,q){k=this.sta
g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=Math.PI/180*p,e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-E)<x?(l=b-a.getCenterY(),x=Math.abs(b-E),c=!0):Math.abs(b-F)<x?(l=b-a.y,x=Math.abs(b-F),c=!0):Math.abs(b-H)<x&&(l=b-a.y-a.height,x=Math.abs(b-H),c=!0);c&&(r=C,t=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-F)<x?(l=b-a.getCenterY(),x=Math.abs(b-F),c=!0):Math.abs(b-E)<x?(l=b-a.y,x=Math.abs(b-E),c=!0):Math.abs(b-H)<x&&(l=b-a.y-a.height,x=Math.abs(b-H),c=!0);c&&(r=C,t=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||c},e=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-v)<y?(k=b-a.getCenterX(),y=Math.abs(b-v),d=!0):Math.abs(b-z)<y?(k=b-a.x,y=Math.abs(b-z),d=!0):Math.abs(b-A)<y&&(k=b-a.x-a.width,y=Math.abs(b-A),d=!0);d&&(n=c,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||d},f=this.graph.getView().translate,g=this.graph.getView().scale,k=b.x,l=b.y,m=!1,n=null,p=null,q=!1,r=null,t=null,u=this.getGuideTolerance(),y=u,x=u,u=a.clone();u.x+=b.x;u.y+=b.y;var z=u.x,A=u.x+u.width,v=u.getCenterX(),F=u.y,H=u.y+u.height,E=u.getCenterY();for(b=0;b<this.states.length;b++){var C=this.states[b];null!=C&&(this.horizontal&&(e.call(this,C.getCenterX(),C),e.call(this,C.x,
mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||d},f=this.graph.getView().translate,g=this.graph.getView().scale,k=b.x,l=b.y,m=!1,n=null,p=null,q=!1,r=null,t=null,u=this.getGuideTolerance(),y=u,x=u,u=a.clone();u.x+=b.x;u.y+=b.y;var z=u.x,A=u.x+u.width,v=u.getCenterX(),E=u.y,H=u.y+u.height,F=u.getCenterY();for(b=0;b<this.states.length;b++){var C=this.states[b];null!=C&&(this.horizontal&&(e.call(this,C.getCenterX(),C),e.call(this,C.x,
C),e.call(this,C.x+C.width,C)),this.vertical&&(d.call(this,C.getCenterY(),C),d.call(this,C.y,C),d.call(this,C.y+C.height,C)))}c&&(m||(c=a.x-(this.graph.snap(a.x/g-f.x)+f.x)*g,k=this.graph.snap(k/g)*g-c),q||(f=a.y-(this.graph.snap(a.y/g-f.y)+f.y)*g,l=this.graph.snap(l/g)*g-f));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
[new mxPoint(p,minY),new mxPoint(p,maxY)]:[new mxPoint(p,-this.graph.panDy),new mxPoint(p,g.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(n,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";q||null==this.guideY?null!=this.guideY&&(null!=r&&null!=a&&(minX=Math.min(a.x+k-this.graph.panDx,r.x),maxX=Math.max(a.x+a.width+k-this.graph.panDx,r.x+r.width)),this.guideY.points=null!=minX&&null!=maxX?[new mxPoint(minX,t),
new mxPoint(maxX,t)]:[new mxPoint(-this.graph.panDx,t),new mxPoint(g.scrollWidth-3-this.graph.panDx,t)],this.guideY.stroke=this.getGuideColor(r,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden";b=new mxPoint(k,l)}return b};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
@ -658,9 +658,9 @@ function mxArrowConnector(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.f
mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),q=b[b.length-1],r=1;r<b.length-1&&b[r].x==
b[0].x&&b[r].y==b[0].y;)r++;var t=b[r].x-b[0].x,r=b[r].y-b[0].y,u=Math.sqrt(t*t+r*r);if(0!=u){var y=t/u,x,z=y,A=r/u,v,F=A,u=f*A,H=-f*y,E=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();t=y;r=A;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,y,A,n,d,f,m,!0);else{x=b[0].x+u/2+m*y;v=b[0].y+H/2+m*A;var C=b[0].x-u/2+m*y,B=b[0].y-H/2+m*A;g?(a.moveTo(x,v),E.push(function(){a.lineTo(C,B)})):(a.moveTo(C,B),a.lineTo(x,v))}for(var G=v=x=0,u=0;u<b.length-2;u++)if(H=mxUtils.relativeCcw(b[u].x,
b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),x=b[u+2].x-b[u+1].x,v=b[u+2].y-b[u+1].y,G=Math.sqrt(x*x+v*v),0!=G&&(z=x/G,F=v/G,tmp=Math.max(Math.sqrt((y*z+A*F+1)/2),.04),x=y+z,v=A+F,G=Math.sqrt(x*x+v*v),0!=G)){x/=G;v/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),G=0!=H&&p?Math.max(.1,G):Math.max(tmp,.06),I=b[u+1].x+v*f/2/G,N=b[u+1].y-x*f/2/G;v=b[u+1].x-v*f/2/G;x=b[u+1].y+x*f/2/G;0!=H&&p?-1==H?(H=v+F*f,G=x-z*f,a.lineTo(v+A*f,x-y*f),a.quadTo(I,N,H,G),function(b,c){E.push(function(){a.lineTo(b,
c)})}(v,x)):(a.lineTo(I,N),function(b,c){var d=I-A*f,e=N+y*f,k=I-F*f,g=N+z*f;E.push(function(){a.quadTo(b,c,d,e)});E.push(function(){a.lineTo(k,g)})}(v,x)):(a.lineTo(I,N),function(b,c){E.push(function(){a.lineTo(b,c)})}(v,x));y=z;A=F}u=f*F;H=-f*z;if(l&&!g)this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!1);else{a.lineTo(q.x-m*z+u/2,q.y-m*F+H/2);var J=q.x-m*z-u/2,U=q.y-m*F-H/2;g?(a.moveTo(J,U),E.splice(0,0,function(){a.moveTo(J,U)})):a.lineTo(J,U)}for(u=E.length-1;0<=u;u--)E[u]();g?(a.end(),a.stroke()):(a.close(),
b[0].x&&b[r].y==b[0].y;)r++;var t=b[r].x-b[0].x,r=b[r].y-b[0].y,u=Math.sqrt(t*t+r*r);if(0!=u){var y=t/u,x,z=y,A=r/u,v,E=A,u=f*A,H=-f*y,F=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();t=y;r=A;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,y,A,n,d,f,m,!0);else{x=b[0].x+u/2+m*y;v=b[0].y+H/2+m*A;var C=b[0].x-u/2+m*y,B=b[0].y-H/2+m*A;g?(a.moveTo(x,v),F.push(function(){a.lineTo(C,B)})):(a.moveTo(C,B),a.lineTo(x,v))}for(var G=v=x=0,u=0;u<b.length-2;u++)if(H=mxUtils.relativeCcw(b[u].x,
b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),x=b[u+2].x-b[u+1].x,v=b[u+2].y-b[u+1].y,G=Math.sqrt(x*x+v*v),0!=G&&(z=x/G,E=v/G,tmp=Math.max(Math.sqrt((y*z+A*E+1)/2),.04),x=y+z,v=A+E,G=Math.sqrt(x*x+v*v),0!=G)){x/=G;v/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),G=0!=H&&p?Math.max(.1,G):Math.max(tmp,.06),I=b[u+1].x+v*f/2/G,M=b[u+1].y-x*f/2/G;v=b[u+1].x-v*f/2/G;x=b[u+1].y+x*f/2/G;0!=H&&p?-1==H?(H=v+E*f,G=x-z*f,a.lineTo(v+A*f,x-y*f),a.quadTo(I,M,H,G),function(b,c){F.push(function(){a.lineTo(b,
c)})}(v,x)):(a.lineTo(I,M),function(b,c){var d=I-A*f,e=M+y*f,k=I-E*f,g=M+z*f;F.push(function(){a.quadTo(b,c,d,e)});F.push(function(){a.lineTo(k,g)})}(v,x)):(a.lineTo(I,M),function(b,c){F.push(function(){a.lineTo(b,c)})}(v,x));y=z;A=E}u=f*E;H=-f*z;if(l&&!g)this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!1);else{a.lineTo(q.x-m*z+u/2,q.y-m*E+H/2);var J=q.x-m*z-u/2,U=q.y-m*E-H/2;g?(a.moveTo(J,U),F.splice(0,0,function(){a.moveTo(J,U)})):a.lineTo(J,U)}for(u=F.length-1;0<=u;u--)F[u]();g?(a.end(),a.stroke()):(a.close(),
a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,t,r,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,m){g=k/g;var n=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;m?a.moveTo(b-n+p,c-k+f):a.lineTo(b-n+p,c-k+f);a.lineTo(b-n/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+n/g+p,c+k/g+f);a.lineTo(b+n+p,c+k+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
@ -860,7 +860,7 @@ k}else for(c++,e=0;e<this.nestedBestRanks.length;e++)for(f=a.ranks[e],g=0;g<f.le
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),m=[],n=0;n<k.length;n++){var p=k[n].getGeneralPurposeVariable(a-1);m.push(p)}m.sort(function(a,b){return a-b});f[l]=m}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;l=2*f-1;--f;e=[];for(g=0;g<l;++g)e[g]=0;for(g=0;g<d.length;g++)for(l=d[g]+f,++e[l];0<
l;)l%2&&(c+=e[l+1]),l=l-1>>1,++e[l];return c};
mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,q=null,r,t,u=null,y=null,x,z=null,l=0;l<g.length-1;l++){if(0==l){x=k[l];m=x.getNextLayerConnectedCells(f);n=x.getPreviousLayerConnectedCells(f);r=[];t=[];for(var A=0;A<m.length;A++)r[A]=m[A].getGeneralPurposeVariable(f+1);for(A=
0;A<n.length;A++)t[A]=n[A].getGeneralPurposeVariable(f-1)}else m=p,n=q,r=u,t=y,x=z;z=k[l+1];p=z.getNextLayerConnectedCells(f);q=z.getPreviousLayerConnectedCells(f);u=[];y=[];for(A=0;A<p.length;A++)u[A]=p[A].getGeneralPurposeVariable(f+1);for(A=0;A<q.length;A++)y[A]=q[A].getGeneralPurposeVariable(f-1);for(var v=0,F=0,A=0;A<r.length;A++)for(var H=0;H<u.length;H++)r[A]>u[H]&&v++,r[A]<u[H]&&F++;for(A=0;A<t.length;A++)for(H=0;H<y.length;H++)t[A]>y[H]&&v++,t[A]<y[H]&&F++;if(F<v||F==v&&e)p=x.getGeneralPurposeVariable(f),
0;A<n.length;A++)t[A]=n[A].getGeneralPurposeVariable(f-1)}else m=p,n=q,r=u,t=y,x=z;z=k[l+1];p=z.getNextLayerConnectedCells(f);q=z.getPreviousLayerConnectedCells(f);u=[];y=[];for(A=0;A<p.length;A++)u[A]=p[A].getGeneralPurposeVariable(f+1);for(A=0;A<q.length;A++)y[A]=q[A].getGeneralPurposeVariable(f-1);for(var v=0,E=0,A=0;A<r.length;A++)for(var H=0;H<u.length;H++)r[A]>u[H]&&v++,r[A]<u[H]&&E++;for(A=0;A<t.length;A++)for(H=0;H<y.length;H++)t[A]>y[H]&&v++,t[A]<y[H]&&E++;if(E<v||E==v&&e)p=x.getGeneralPurposeVariable(f),
x.setGeneralPurposeVariable(f,z.getGeneralPurposeVariable(f)),z.setGeneralPurposeVariable(f,p),p=m,q=n,u=r,y=t,z=x,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],k=new MedianCellSorter;k.cell=g;var l;l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m;m=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
@ -1021,8 +1021,8 @@ mxPrintPreview.prototype.open=function(a,b,c,d){var e=this.graph.cellRenderer.in
k.writeln(l);mxClient.IS_VML?k.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):("CSS1Compat"===document.compatMode&&k.writeln("<!DOCTYPE html>"),k.writeln("<html>"));k.writeln("<head>");this.writeHead(k,a);k.writeln("</head>");k.writeln('<body class="mxPage">')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-=
q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),y=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*y;var x=mxUtils.bind(this,function(){if(this.pageSelector&&(1<y||1<u)){var a=this.createPageSelector(y,u);k.body.appendChild(a);if(mxClient.IS_IE&&null==k.documentMode||
5==k.documentMode||8==k.documentMode||7==k.documentMode){a.style.position="absolute";var b=function(){a.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),z=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;if(c||b)a.style.pageBreakAfter=
"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),k.body.appendChild(a));(c||b)&&this.addPageBreak(k)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var v=0;v<A.length;v++)z(A[v],!0);for(var F=this.getAppendices(this.pageFormat.width,this.pageFormat.height),v=0;v<y;v++){var H=v*t/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<u;a++){if(null==this.wnd)return null;
var E=a*r/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,C=v*u+a+1,B=new mxRectangle(E,H,r,t),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-E,-H,this.scale,C,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-E,-H)}),C);f.setAttribute("id","mxPage-"+C);z(f,null!=F||v<y-1||a<u-1)}}if(null!=F)for(v=0;v<F.length;v++)z(F[v],v<F.length-1);g&&!d&&(this.closeDocument(),x());this.wnd.focus()}catch(G){null!=f&&null!=f.parentNode&&
"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),k.body.appendChild(a));(c||b)&&this.addPageBreak(k)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var v=0;v<A.length;v++)z(A[v],!0);for(var E=this.getAppendices(this.pageFormat.width,this.pageFormat.height),v=0;v<y;v++){var H=v*t/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<u;a++){if(null==this.wnd)return null;
var F=a*r/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,C=v*u+a+1,B=new mxRectangle(F,H,r,t),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-F,-H,this.scale,C,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-F,-H)}),C);f.setAttribute("id","mxPage-"+C);z(f,null!=E||v<y-1||a<u-1)}}if(null!=E)for(v=0;v<E.length;v++)z(E[v],v<E.length-1);g&&!d&&(this.closeDocument(),x());this.wnd.focus()}catch(G){null!=f&&null!=f.parentNode&&
f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("</body>");a.writeln("</html>");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("</style>")};mxPrintPreview.prototype.writePostfix=function(a){};
@ -1149,17 +1149,17 @@ b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&
d.y)||mxUtils.contains(b,a,d.y)||e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),e.push(new mxPoint(a,f+(Math.min(b.y+b.height,c.y+c.height)-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),
null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,k)||mxUtils.contains(b,d.x,k)||e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,k)))))},
SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,m=!0,n=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var q=g.length-1;if(null!=d&&0<d.length){for(var n=[],r=0;r<d.length;r++){var t=a.view.transformControlPoint(a,d[r]);null!=t&&(t.x=
Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));t=g[q];null!=t&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-t.x)<k&&(d[d.length-1].x=t.x),Math.abs(d[d.length-1].y-t.y)<k&&(d[d.length-1].y=t.y));var n=d[0],u=b,y=g[0],x=!1,z=!1,x=n;null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);for(r=0;2>r;r++){var A=null!=y&&y.x==x.x,v=null!=y&&y.y==x.y,F=null!=u&&x.y>=u.y&&x.y<=u.y+
u.height,u=null!=u&&x.x>=u.x&&x.x<=u.x+u.width,x=v||null==y&&F,z=A||null==y&&u;if(0!=r||!(x&&z||A&&v)){if(null!=y&&!v&&!A&&(F||u)){m=F?!1:!0;break}if(z||x){m=x;1==r&&(m=0==d.length%2?x:z);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);x=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));t=g[q];null!=t&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-t.x)<k&&(d[d.length-1].x=t.x),Math.abs(d[d.length-1].y-t.y)<k&&(d[d.length-1].y=t.y));var n=d[0],u=b,y=g[0],x=!1,z=!1,x=n;null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);for(r=0;2>r;r++){var A=null!=y&&y.x==x.x,v=null!=y&&y.y==x.y,E=null!=u&&x.y>=u.y&&x.y<=u.y+
u.height,u=null!=u&&x.x>=u.x&&x.x<=u.x+u.width,x=v||null==y&&E,z=A||null==y&&u;if(0!=r||!(x&&z||A&&v)){if(null!=y&&!v&&!A&&(E||u)){m=E?!1:!0;break}if(z||x){m=x;1==r&&(m=0==d.length%2?x:z);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);x=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
p.y));m?p.y=n.y:p.x=n.x;for(r=0;r<d.length;r++)m=!m,n=d[r],m?p.y=n.y:p.x=n.x,f(p.clone())}else n=p,m=!0;p=g[q];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[q]&&g[q].y!=n.y||null==g[q]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[q]&&g[q].x!=n.x||null==g[q]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&f(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=b)for(;1<
e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[q]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=t&&null!=e[e.length-1]&&Math.abs(t.x-e[e.length-1].x)<k&&Math.abs(t.y-e[e.length-1].y)<k&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-t.x)<k&&(e[e.length-1].x=t.x),Math.abs(e[e.length-1].y-t.y)<k&&(e[e.length-1].y=t.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,
0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,
2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,
getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,q=null!=b?b.width:0,r=null!=b?b.height:0,t=null!=c?c.x:m.x,u=null!=c?c.y:m.y,y=null!=c?c.width:0,x=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),z=a.view.scale*mxEdgeStyle.getJettySize(a,
b,c,d,!1);null!=b&&c==b&&(f=z=Math.max(f,z));var A=z+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,F=m.y-l.y,v=v*v+F*F<A*A;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,p,q,r),v),n=v.x,p=v.y,
b,c,d,!1);null!=b&&c==b&&(f=z=Math.max(f,z));var A=z+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,E=m.y-l.y,v=v*v+E*E<A*A;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,p,q,r),v),n=v.x,p=v.y,
q=v.width,r=v.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(t,u,y,x),v),t=v.x,u=v.y,y=v.width,x=v.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;r=Math.round(10*r)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;y=Math.round(10*y)/10;x=Math.round(10*x)/10;a=[0,0];n=[[n,p,q,r],[t,u,y,x]];z=[f,z];for(v=0;2>v;v++)mxEdgeStyle.limits[v][1]=
n[v][0]-z[v],mxEdgeStyle.limits[v][2]=n[v][1]-z[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+z[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+z[v];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);F=z-p;z=0;0>v?z=0>F?2:1:0>=F&&(z=3,0==v&&(z=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST),
n[v][0]-z[v],mxEdgeStyle.limits[v][2]=n[v][1]-z[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+z[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+z[v];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);E=z-p;z=0;0>v?z=0>E?2:1:0>=E&&(z=3,0==v&&(z=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST),
b[v][1]=(p.y-n[v][1])/n[v][3],1>=Math.abs(p.y-n[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[v][1]-n[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);v=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-A,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-A,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-A,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-A,0);A=[];
c=[];l=[];c[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=v>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=v>=p?v:p;q=[[0,0],[0,0]];r=!1;for(v=0;2>v;v++)0==a[v]&&(0==(c[v]&d[v])&&(c[v]=mxUtils.reversePortConstraints(c[v])),0==(l[v]&d[v])&&(l[v]=mxUtils.reversePortConstraints(l[v])),q[v][0]=l[v],q[v][1]=c[v]);0<p&&0<m&&(0<(c[0]&d[0])&&0<(l[1]&d[1])?(q[0][0]=
c[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=c[1],r=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=c[1],q[1][1]=l[1],r=!0));0<p&&!r&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=l[1],q[1][1]=c[1],r=!0);0<m&&!r&&(q[0][0]=c[0],q[0][1]=l[0],q[1][0]=c[1],q[1][1]=l[1]);for(v=0;2>v;v++)0==a[v]&&(0==(q[v][0]&d[v])&&(q[v][0]=q[v][1]),A[v]=q[v][0]&d[v],A[v]|=(q[v][1]&d[v])<<8,A[v]|=(q[1-v][v]&d[v])<<16,A[v]|=(q[1-v][1-v]&d[v])<<24,0==(A[v]&15)&&(A[v]<<=8),0==(A[v]&3840)&&(A[v]=A[v]&15|A[v]>>8),0==(A[v]&
@ -2005,9 +2005,9 @@ a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.f
this.graph.pageBreaksVisible;var b=a.getAttribute("pageWidth"),c=a.getAttribute("pageHeight");null!=b&&null!=c&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(b),parseFloat(c)));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
Editor.prototype.setGraphXml=function(a){if(null!=a){var b=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),b.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var c=b.document.createElement("mxGraphModel");c.appendChild(a);b.decode(c,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),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(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.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,c){b.undoableEditHappened(c.getProperty("edit"))};var c=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,c);a.getView().addListener(mxEvent.UNDO,c);c=function(b,c){for(var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes),e=a.getModel(),k=[],l=0;l<d.length;l++)(e.isVertex(d[l])||e.isEdge(d[l]))&&null!=a.view.getState(d[l])&&
k.push(d[l]);a.setSelectionCells(k)};b.addListener(mxEvent.UNDO,c);b.addListener(mxEvent.REDO,c);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(a,b){this.data=a;this.filename=b;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.data&&(this.cancel(!1),this.consumer(this.data,this.filename))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
@ -2038,8 +2038,8 @@ if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=r.toolbar)){var c=b.fon
d.cellEditor.stopEditing=function(a,b){u.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var y=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var x="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
e.push(f));f=d.getModel().getStyle(b.cell);for(var k=null!=f?f.split(";"):[],g=0;g<k.length;g++){var l=k[g],m=l.indexOf("=");0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
"keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),F=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)x.push(F[a][b]);for(a=0;a<z.length;a++)x.push(z[a]);var H=function(a,b){d.getModel().beginUpdate();
try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=x.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var r=p.substring(0,q),t=mxUtils.indexOf(n,r);0<=t&&n.splice(t,1);for(var u=0;u<F.length;u++){var y=F[u];if(0<=mxUtils.indexOf(y,r))for(var v=
"keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),E=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<E.length;a++)for(b=0;b<E[a].length;b++)x.push(E[a][b]);for(a=0;a<z.length;a++)x.push(z[a]);var H=function(a,b){d.getModel().beginUpdate();
try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=x.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var r=p.substring(0,q),t=mxUtils.indexOf(n,r);0<=t&&n.splice(t,1);for(var u=0;u<E.length;u++){var y=E[u];if(0<=mxUtils.indexOf(y,r))for(var v=
0;v<y.length;v++){var A=mxUtils.indexOf(n,y[v]);0<=A&&n.splice(A,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var r=n[f],C=e[r];null==C||"shape"==r&&!c||(!c||0>mxUtils.indexOf(z,r))&&d.setCellStyles(r,C,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){H(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){H(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));H(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&(e=d.getModel().isVertex(c[k])||e,!(f=d.getModel().isEdge(c[k])||f)||!e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(A,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
mxUtils.indexOf(z,c[k]))f||0<=mxUtils.indexOf(v,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(x,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(x,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(v,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
@ -2171,10 +2171,10 @@ function(){var a=this.currentState;t.apply(this,arguments);a!=this.currentState?
arguments)||mxEvent.isShiftDown(a)};var x=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return x.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(z=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,
function(){this.isEnabled()&&(this.container.style.cursor=z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var A=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return A.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};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,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<c||0<d){var k=this.getModel(),g=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var m=k.getChildCount(e),n=0;n<m;n++){var p=k.getChildAt(e,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var r=
mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var F=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:F.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:E.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 H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();H=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)),p.start(c.x,c.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);H=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var F=this.updateMouseEvent;this.updateMouseEvent=function(a){a=F.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);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.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();
@ -2276,7 +2276,7 @@ this.graph.currentEdgeStyle[b];return a};var c=mxConnectionHandler.prototype.cre
b.apply(this,arguments);this.error=null;return c});return a};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",html:"1",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.currentEdgeStyle=Graph.prototype.defaultEdgeStyle;Graph.prototype.currentVertexStyle={};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&
(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,
0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],
f[1]),2<f.length?"0"!=f[2]:!0))}}catch(L){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,
f[1]),2<f.length?"0"!=f[2]:!0))}}catch(K){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,
this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,
arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=
function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),k=b.getTerminal(e,!1);b.setTerminal(e,k,!0);b.setTerminal(e,f,!1);var g=b.getGeometry(e);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();
@ -2300,13 +2300,13 @@ f&&Math.abs(this.scrollTop-k.container.scrollTop)<f&&Math.abs(this.startX-d.getG
k.click=function(a){};k.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),k=0;k<a.length;k++){var g=c.getParent(a[k]),l=this.moveCells([f[k]],d,d,!1,g)[0];e.push(l);if(b)c.add(g,f[k]);else{var m=g.getIndex(a[k]);c.add(g,f[k],m+1)}}}finally{c.endUpdate()}return e};
Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var k=this.view.getState(b[f]);
if(null!=k){var g=a?k.getCenterX():k.getCenterY(),d=null!=d?Math.max(d,g):g,e=null!=e?Math.min(e,g):g;c.push(k)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});k=this.view.translate;g=this.view.scale;e=e/g-(a?k.x:k.y);d=d/g-(a?k.x:k.y);this.getModel().beginUpdate();try{for(var l=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var m=this.getCellGeometry(c[f].cell),d=d+l;null!=m&&(m=m.clone(),a?m.x=Math.round(d-m.width/2):m.y=Math.round(d-m.height/2),this.getModel().setGeometry(c[f].cell,
m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-
e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}for(var e=new mxCodec,f=new mxGraphModel,k=f.getChildAt(f.getRoot(),0),d=0;d<a.length;d++)c.get(this.model.getParent(a[d]))||f.add(k,b[d]);return e.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,k){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;k=null!=
k?k:!0;var g=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();d=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==m.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/l;d.setAttribute("width",Math.ceil(g.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(g.height*a)+2*c+"px");d.setAttribute("version","1.1");var n=d;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(n));m.appendChild(d);m=this.createSvgCanvas(n);m.foOffset=e?-.5:0;m.textOffset=e?-.5:0;m.imageOffset=e?-.5:
0;m.translate(Math.floor((c/b-g.x)/l),Math.floor((c/b-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,k,g,l,m,n,q,r){var t=this.state;if(null!=this.foAltText&&(0==d||0!=t.fontSize&&f.length<5*d/t.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(d/2));u.setAttribute("y",Math.round((e+t.fontSize)/2));u.setAttribute("fill",t.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(t.fontSize)+"px");
u.setAttribute("font-family",t.fontFamily);(t.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(t.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style","italic");(t.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,f);return u}return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*
if(null!=k){var g=a?k.getCenterX():k.getCenterY(),d=null!=d?Math.max(d,g):g,e=null!=e?Math.min(e,g):g;c.push(k)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});k=this.view.translate;g=this.view.scale;e=e/g-(a?k.x:k.y);d=d/g-(a?k.x:k.y);this.getModel().beginUpdate();try{for(var l=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var m=this.view.getState(this.model.getParent(c[f].cell)),n=this.getCellGeometry(c[f].cell),d=d+l;null!=n&&null!=m&&(n=n.clone(),a?n.x=Math.round(d-n.width/2)-m.origin.x:
n.y=Math.round(d-n.height/2)-m.origin.y,this.getModel().setGeometry(c[f].cell,n))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||
c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,k){b=null!=b?b:1;c=null!=c?c:0;e=
null!=e?e:!0;f=null!=f?f:!0;k=null!=k?k:!0;var g=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();d=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==m.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",
mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/l;d.setAttribute("width",Math.ceil(g.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(g.height*a)+2*c+"px");d.setAttribute("version","1.1");var n=d;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(n));m.appendChild(d);m=this.createSvgCanvas(n);m.foOffset=e?-.5:0;m.textOffset=e?
-.5:0;m.imageOffset=e?-.5:0;m.translate(Math.floor((c/b-g.x)/l),Math.floor((c/b-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,k,g,l,m,n,q,r){var t=this.state;if(null!=this.foAltText&&(0==d||0!=t.fontSize&&f.length<5*d/t.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(d/2));u.setAttribute("y",Math.round((e+t.fontSize)/2));u.setAttribute("fill",t.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(t.fontSize)+
"px");u.setAttribute("font-family",t.fontFamily);(t.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(t.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style","italic");(t.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,f);return u}return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*
e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(g,e)&&m.image(b.x,b.y,c.width,c.height,c.src,!0));m.scale(a);m.textEnabled=k;k=this.createSvgImageExport();var q=k.drawCellState;k.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&q.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),m);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=
window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=
document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");
@ -2315,21 +2315,21 @@ c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)last
if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,k){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),
b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.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){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=
function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(K){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||
!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border=
"")};var k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===
a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}k.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0,
g.length-1));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(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=f?"bold":"normal";this.textarea.style.fontStyle=
k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var g=mxUtils.htmlEntities(this.textarea.innerHTML);
mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";
this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=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<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<
this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",
l.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,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(ca){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,
b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":
"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline=
"none",this.textarea.style.border="")};var k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;
d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}k.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||
8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==
g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD,k=(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=
f?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
var g=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+
"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=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<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*
c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow=
"",l.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,"<br/>"));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,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}};
var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(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 p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&
@ -2361,10 +2361,10 @@ this.secondDiv=null)),b.consume()}};var t=mxRubberband.prototype.reset;mxRubberb
c};var z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&z.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=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 v=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 v.apply(this,arguments)};var F=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))):F.apply(this,arguments)};var H=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);
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 v.apply(this,arguments)};var E=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))):E.apply(this,arguments)};var H=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)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
var E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
var F=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){F.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
"none")};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell);this.updateLinkHint(c);null!=c&&(a=!0);a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b){if(null==b||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="4px 10px 6px 10px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter=
@ -2372,16 +2372,16 @@ this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell);this.updat
b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.get("editLink")),b.setAttribute("width","11"),b.setAttribute("height","11"),b.style.marginLeft="10px",b.style.marginBottom="-1px",b.style.cursor="pointer",this.linkHint.appendChild(b),mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)})))}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var G=
mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});
this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell);null!=b&&(this.updateLinkHint(b),this.redrawHandles())};var I=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),b=null!=a?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==a&&(a=this.state);this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var J=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var R=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(R.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+
a.height+6+this.state.view.graph.tolerance)+"px"}};var V=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){V.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var X=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){X.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),
this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function r(){mxActor.call(this)}function t(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function F(){mxShape.call(this)}function H(){mxShape.call(this)}function E(){mxEllipse.call(this)}function C(){mxShape.call(this)}
function B(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function N(){mxShape.call(this)}function J(){mxShape.call(this)}function U(){mxCylinder.call(this)}function R(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this);this.spacing=0}function D(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function K(){mxActor.call(this)}
function da(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function T(){mxActor.call(this)}function ba(){mxActor.call(this)}function ca(){mxActor.call(this)}function P(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function Q(){mxEllipse.call(this)}function S(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function E(){mxShape.call(this)}function H(){mxShape.call(this)}function F(){mxEllipse.call(this)}function C(){mxShape.call(this)}
function B(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function M(){mxShape.call(this)}function J(){mxShape.call(this)}function U(){mxCylinder.call(this)}function R(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this);this.spacing=0}function D(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}
function da(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function N(){mxActor.call(this)}function T(){mxActor.call(this)}function aa(){mxActor.call(this)}function ba(){mxActor.call(this)}function O(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function P(){mxEllipse.call(this)}function S(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
function qa(){mxActor.call(this)}function la(){mxActor.call(this)}function ma(){mxActor.call(this)}function xa(a,b,c,d,e,f,k,g,l,m){k+=l;var n=d.clone();d.x-=e*(2*k+l);d.y-=f*(2*k+l);e*=k+l;f*=k+l;return function(){a.ellipse(n.x-e-k,n.y-f-k,2*k,2*k);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),
a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var ua=Math.tan(mxUtils.toRadians(30)),ia=(.5-ua)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/ua);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ia);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ia)*b);a.lineTo(0,.25*
b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+ua));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-ia)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ia)*b),a.lineTo(.5*b,(1-ia)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ia),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ia)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=
@ -2411,9 +2411,9 @@ arguments)};mxCellRenderer.prototype.defaultShapes.plus=z;var ya=mxRhombus.proto
1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),ya.apply(this,[a,b,c,d,e]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};A.prototype.paintForeground=function(a,b,c,
d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,k;do{k=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=k){var g=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+f+"Height"],
p=this.style["symbol"+f+"Spacing"]||0,q=this.style["symbol"+f+"ArcSpacing"];null!=q&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*q);var q=b,r=c,q=g==mxConstants.ALIGN_CENTER?q+(d-m)/2:g==mxConstants.ALIGN_RIGHT?q+(d-m-p):q+p,r=l==mxConstants.ALIGN_MIDDLE?r+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?r+(e-n-p):r+p;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,q,r,m,n);a.restore()}f++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
mxCellRenderer.prototype.defaultShapes.ext=A;mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=v;mxUtils.extend(F,mxShape);F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,
e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=F;mxUtils.extend(H,mxShape);H.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};H.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/
6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=H;mxUtils.extend(E,mxEllipse);E.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=E;mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);
mxCellRenderer.prototype.defaultShapes.ext=A;mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=v;mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,
e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=E;mxUtils.extend(H,mxShape);H.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};H.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/
6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=H;mxUtils.extend(F,mxEllipse);F.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=F;mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);
a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=C;mxUtils.extend(B,mxShape);B.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};B.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};B.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};
mxCellRenderer.prototype.defaultShapes.umlControl=B;mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};G.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),k=mxUtils.getValue(this.style,
"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=G&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,
@ -2421,25 +2421,25 @@ a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=G;mxU
e){var f=this.corner,k=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+k,c);a.lineTo(b+k,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,k-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=
I;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=G.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};
mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&
(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);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(J,
(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(M,mxShape);M.prototype.size=10;M.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=M;mxUtils.extend(J,
mxShape);J.prototype.size=10;J.prototype.inset=2;J.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+k);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-k,f/2);a.quadTo((d-f)/2-k,f+k,d/2,f+k);a.quadTo((d+f)/2+k,f+k,(d+f)/2+k,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=J;mxUtils.extend(U,
mxCylinder);U.prototype.jettyWidth=32;U.prototype.jettyHeight=12;U.prototype.redrawPath=function(a,b,c,d,e,f){var k=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=k/2;var k=c+k/2,g=.3*e-b/2,l=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(k,g),a.lineTo(k,g+b),a.lineTo(c,g+b),a.moveTo(c,l),a.lineTo(k,l),a.lineTo(k,l+b),a.lineTo(c,l+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,l+b),a.lineTo(0,
l+b),a.lineTo(0,l),a.lineTo(c,l),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=U;mxUtils.extend(R,mxDoubleEllipse);R.prototype.outerStroke=!0;R.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=R;mxUtils.extend(V,
R);V.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=V;mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=4;X.prototype.isOpenEnded=function(){return!0};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};X.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=X;mxUtils.extend(D,mxArrowConnector);D.prototype.defaultWidth=10;D.prototype.defaultArrowWidth=
20;D.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};D.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};D.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=D;mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.redrawPath=
function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=W;mxUtils.extend(aa,mxRectangleShape);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(a,
function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=W;mxUtils.extend(Q,mxRectangleShape);Q.prototype.dx=20;Q.prototype.dy=20;Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.paintForeground=function(a,
b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));k=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+k,
c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=aa;mxUtils.extend(K,mxActor);K.prototype.dx=20;K.prototype.dy=20;K.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=K;mxUtils.extend(da,mxActor);da.prototype.dx=20;da.prototype.dy=20;da.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=da;mxUtils.extend(M,mxActor);M.prototype.arrowWidth=.3;M.prototype.arrowSize=.2;M.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=M;mxUtils.extend(L,mxActor);L.prototype.redrawPath=
function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",M.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",M.prototype.arrowSize))));c=(e-f)/2;var f=c+f,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),
new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=L;mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=O;mxUtils.extend(T,mxActor);T.prototype.redrawPath=
function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=T;mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=ba;mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=ca;mxUtils.extend(P,mxActor);P.prototype.size=.375;P.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=P;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=
Y;mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=Z;mxUtils.extend(Q,mxEllipse);Q.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();
a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=Q;mxUtils.extend(S,mxRhombus);S.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=S;mxUtils.extend(ga,
c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=Q;mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=ca;mxUtils.extend(da,mxActor);da.prototype.dx=20;da.prototype.dy=20;da.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=da;mxUtils.extend(L,mxActor);L.prototype.arrowWidth=.3;L.prototype.arrowSize=.2;L.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=L;mxUtils.extend(K,mxActor);K.prototype.redrawPath=
function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",L.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",L.prototype.arrowSize))));c=(e-f)/2;var f=c+f,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),
new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=K;mxUtils.extend(N,mxActor);N.prototype.size=.1;N.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=N;mxUtils.extend(T,mxActor);T.prototype.redrawPath=
function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=T;mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=aa;mxUtils.extend(ba,mxActor);ba.prototype.size=20;ba.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=ba;mxUtils.extend(O,mxActor);O.prototype.size=.375;O.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=O;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=
Y;mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=Z;mxUtils.extend(P,mxEllipse);P.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();
a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=P;mxUtils.extend(S,mxRhombus);S.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=S;mxUtils.extend(ga,
mxEllipse);ga.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ga;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,
f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=ea;mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),"1"==mxUtils.getValue(this.style,"top","1")&&(a.begin(),
a.moveTo(b,c),a.lineTo(b+d,c),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"right","1")&&(a.begin(),a.moveTo(b+d,c),a.lineTo(b+d,c+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"bottom","1")&&(a.begin(),a.moveTo(b+d,c+e),a.lineTo(b,c+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"left","1")&&(a.begin(),a.moveTo(b,c+e),a.lineTo(b,c),a.end(),a.stroke()))};mxCellRenderer.prototype.defaultShapes.partialRectangle=ka;mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=
@ -2450,7 +2450,7 @@ n/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,k,g,l,m){var
a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*q+e*l,n.y-2*r+f*l);a.moveTo(n.x-q-r+f*l,n.y-r+q-e*l);a.lineTo(n.x+r-q-f*l,n.y-r-q+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,k,g,l,m){b=e*l*1.118;c=f*l*1.118;e*=k+l;f*=k+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);g?a.lineTo(n.x-e-f/2,n.y-f+e/2):a.lineTo(n.x+f/2-e,n.y-f-e/2);a.lineTo(n.x-e,n.y-f);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=
null!=a?a:2;return function(b,c,d,e,f,k,g,l,m,n){f*=g+m;k*=g+m;var p=e.clone();return function(){b.begin();b.moveTo(p.x,p.y);l?b.lineTo(p.x-f-k/a,p.y-k+f/a):b.lineTo(p.x+k/a-f,p.y-k-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var za=function(a,b,c){return na(a,["width"],b,function(b,d,e,f,k){k=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*k/2,f.y+e*b/4-d*k/2)},function(b,d,e,f,k,g){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*
b)/a.view.scale-c})},na=function(a,b,c,d,e){var f=a.absolutePoints,k=f.length-1,g=a.view.translate,l=a.view.scale,m=c?f[0]:f[k],n=c?f[1]:f[k-1],p=n.x-m.x,q=n.y-m.y,r=Math.sqrt(p*p+q*q);return fa(a,b,function(a){a=d.call(this,r,p/r,q/r,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+q*q);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,q/a,m,n,b,c)})},ja=function(a){return function(b){return[fa(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"arrowWidth",M.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",M.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},va=function(a,b,c){return function(d){var e=[fa(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,
"arrowWidth",L.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",L.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},va=function(a,b,c){return function(d){var e=[fa(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,
parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},ra=function(a,b,c){c=null!=c?c:1;return function(d){var e=[fa(d,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},
function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},Aa=function(a){return function(b){var c=[fa(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
!1)&&c.push(ha(b));return c}},oa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return fa(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*d),c.y+(null!=b?b:c.height/8))},function(a,b,c){this.state.style[mxConstants.STYLE_ARCSIZE]=
@ -2470,36 +2470,36 @@ parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFA
!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},process:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[fa(a,["size"],function(a){var b=
Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",la.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",
e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,
mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},internalStorage:function(a){var b=[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),
c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",K.prototype.dx))),
c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",K.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));
mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},internalStorage:function(a){var b=[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),
c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Q.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),
c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));
return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ja(1),doubleArrow:ja(.5),folder:function(a){return[fa(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",
g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[fa(a,["size"],
function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=
Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ra(y.prototype.size,!0),hexagon:ra(x.prototype.size,!0,.5),curlyBracket:ra(q.prototype.size,!1),display:ra(ma.prototype.size,!1),cube:va(1,
a.prototype.size,!1),card:va(.5,k.prototype.size,!0),loopLimit:va(.5,ca.prototype.size,!0),trapezoid:Aa(.5),parallelogram:Aa(1)};Graph.createHandle=fa;Graph.handleFactory=wa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=wa[this.state.style.shape];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ra(y.prototype.size,!0),hexagon:ra(x.prototype.size,!0,.5),curlyBracket:ra(q.prototype.size,!1),display:ra(ma.prototype.size,!1),cube:va(1,
a.prototype.size,!1),card:va(.5,k.prototype.size,!0),loopLimit:va(.5,ba.prototype.size,!0),trapezoid:Aa(.5),parallelogram:Aa(1)};Graph.createHandle=fa;Graph.handleFactory=wa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=wa[this.state.style.shape];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
wa[this.state.style.shape];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sa=new mxPoint(1,0),ta=new mxPoint(1,0),ja=mxUtils.toRadians(-30),sa=mxUtils.getRotatedPoint(sa,Math.cos(ja),Math.sin(ja)),ja=mxUtils.toRadians(-150),ta=mxUtils.getRotatedPoint(ta,Math.cos(ja),Math.sin(ja));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,
d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=sa.x,m=sa.y,n=ta.x,p=ta.y,q="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){a=function(a,b,c){a-=r.x;var d=b-r.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);q?(c&&(r=new mxPoint(r.x+l*b,r.y+m*b),e.push(r)),r=new mxPoint(r.x+n*a,r.y+p*a)):(c&&(r=new mxPoint(r.x+n*a,r.y+p*a),e.push(r)),r=new mxPoint(r.x+l*b,r.y+m*b));e.push(r)};
var r=g;null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Fa.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),
new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;
O.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=
mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;
N.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;P.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=
mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,
1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,
.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];y.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!1),new mxConnectionConstraint(new mxPoint(.2,.5),!1),new mxConnectionConstraint(new mxPoint(.1,.75),!1),new mxConnectionConstraint(new mxPoint(.9,.25),!1),
new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.9,.75),!1)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;
new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.9,.75),!1)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;
mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!1),new mxConnectionConstraint(new mxPoint(.875,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!1),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];n.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;da.prototype.constraints=null;K.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];G.prototype.constraints=null;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,
.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;da.prototype.constraints=null;ca.prototype.constraints=null;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];G.prototype.constraints=null;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,c=b.editor,d=c.graph,e=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())});this.addAction("open...",
function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a),e=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,e);var f=e.getChildren(e.getChildAt(e.getRoot(),0));c.graph.setSelectionCells(c.graph.importCells(f))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
": "+p.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=e;this.addAction("save",function(){b.saveFile(!1)},null,null,"Ctrl+S").isEnabled=e;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,"Ctrl+Shift+S").isEnabled=e;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,
@ -2650,18 +2650,18 @@ d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null
g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,
a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",
mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var x=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var z=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),v=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",
E.style.marginRight="2px",E.style.marginTop="-2px",l.insertBefore(E,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,
function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(z.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=z.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",
!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);v(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),H=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),
c=z.view.getBounds(b),d=z.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=z.view.translate.x;c.y-=z.view.translate.y;F(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",
z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=
!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,
"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,
0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;F(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var r=JSON.parse(mxUtils.getTextContent(c.documentElement));
f(r,k);b=b.concat(r);v(a);this.spinner.stop();p=!0}catch(D){}else if("mxfile"==c.documentElement.nodeName)try{r=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),q=this.stringToCells(this.editor.graph.decompress(r)),F(q,new mxRectangle(0,0,m,n),a),p=!0}catch(D){}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),
k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var z=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),v=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=F&&null!=F.parentNode&&F.parentNode.removeChild(F),F=m.cloneNode(!1),F.setAttribute("src",Editor.spinImage),F.setAttribute("title",mxResources.get("saving")),F.style.cursor="default",
F.style.marginRight="2px",F.style.marginTop="-2px",l.insertBefore(F,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=F&&null!=F.parentNode&&(F.parentNode.removeChild(F),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,
function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=z.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,
c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);v(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),H=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
z.getSelectionCells(),c=z.view.getBounds(b),d=z.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=z.view.translate.x;c.y-=z.view.translate.y;E(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",
k.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),
z.isMouseDown=!1,z.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;E(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var r=JSON.parse(mxUtils.getTextContent(c.documentElement));
f(r,k);b=b.concat(r);v(a);this.spinner.stop();p=!0}catch(D){}else if("mxfile"==c.documentElement.nodeName)try{r=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),q=this.stringToCells(this.editor.graph.decompress(r)),E(q,new mxRectangle(0,0,m,n),a),p=!0}catch(D){}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),
mxEvent.addListener(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",A);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&A(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);
m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var E=null;mxEvent.addListener(m,
m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var F=null;mxEvent.addListener(m,
"click",H)}g.appendChild(l);g.style.paddingRight=18*l.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=740>=screen.height?5:46,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())};
@ -2695,26 +2695,26 @@ d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=pars
function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value",
"url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),
l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),z=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var A=document.createElement("input");
A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(e,mxResources.get("allPages"),g,!g),H=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom=
"16px";mxEvent.addListener(E,"change",function(){E.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,z.checked,A.value,n.getTarget(),n.getColor(),v.checked,F.checked,H.checked,E.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(e,mxResources.get("allPages"),g,!g),H=this.addCheckbox(e,mxResources.get("layers"),!0),F=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom=
"16px";mxEvent.addListener(F,"change",function(){F.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,z.checked,A.value,n.getTarget(),n.getColor(),v.checked,E.checked,H.checked,F.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");
m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft=
"12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",g.appendChild(p),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom=
"10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var v=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var F=null;if(null==l||l.constructor!=window.DriveFile||b)F=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var H=this.addCheckbox(g,mxResources.get("lightbox"),!0),E=this.addCheckbox(g,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=E.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(H,
"change",function(){H.checked?(C.removeAttribute("disabled"),E.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.getTarget(),v.getColor(),null==F?!0:F.checked,H.checked,E.checked,C.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
"10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var v=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var E=null;if(null==l||l.constructor!=window.DriveFile||b)E=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var H=this.addCheckbox(g,mxResources.get("lightbox"),!0),F=this.addCheckbox(g,mxResources.get("showEditButton"),!0);F.style.marginLeft="24px";var C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=F.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(H,
"change",function(){H.checked?(C.removeAttribute("disabled"),F.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.getTarget(),v.getColor(),null==E?!0:E.checked,H.checked,F.checked,C.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
p.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(f);var g=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,
mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";g.appendChild(n);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";g.appendChild(p);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),
k.background==mxConstants.NONE||null==k.background),v=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.setAttribute("type","checkbox");f&&(g.appendChild(F),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?F.setAttribute("disabled","disabled"):(F.setAttribute("checked","checked"),F.defaultChecked=!0);var H=this.addCheckbox(g,mxResources.get("shadow"),
k.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(g.appendChild(E),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var C=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var B=B=this.addCheckbox(g,mxResources.get("allPages"),a,!a);B.style.marginLeft="24px";
B.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!v.checked,H.checked,C.checked,E.checked,p.value,F.checked,!B.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=
k.background==mxConstants.NONE||null==k.background),v=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");f&&(g.appendChild(E),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?E.setAttribute("disabled","disabled"):(E.setAttribute("checked","checked"),E.defaultChecked=!0);var H=this.addCheckbox(g,mxResources.get("shadow"),
k.shadowVisible),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||F.setAttribute("disabled","disabled");b&&(g.appendChild(F),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var C=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var B=B=this.addCheckbox(g,mxResources.get("allPages"),a,!a);B.style.marginLeft="24px";
B.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!v.checked,H.checked,C.checked,F.checked,p.value,E.checked,!B.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=
function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";
c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));
mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var y=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!k.checked,y.checked,g.value,l.checked)}),
null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var l=
this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var v=1<g.model.getChildCount(g.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),v,!v);F.style.marginLeft=A.style.marginLeft;F.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(v&&
F.removeAttribute("disabled"),A.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,A.checked,F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var v=1<g.model.getChildCount(g.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),v,!v);E.style.marginLeft=A.style.marginLeft;E.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(v&&
E.removeAttribute("disabled"),A.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,A.checked,E.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=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");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.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()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
@ -2729,8 +2729,8 @@ e&&e(C)}}),c,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new
c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};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 f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),l=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var m=l.getElementsByTagName("diagram");if(1==m.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){g.model.beginUpdate();try{for(var n=0;n<m.length;n++){var p=this.updatePageRoot(new DiagramPage(m[n])),
A=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,p,p,A))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var v=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,v);var F=v.getChildCount(v.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<F;n++){var H=v.getChildAt(v.getRoot(),n);if(1!=F||g.isCellLocked(g.getDefaultParent()))H=g.importCells([H],0,0,g.model.getRoot(),
null,a)[0],E=g.model.getChildren(H),g.moveCells(E,b,c),f=f.concat(E);else var E=v.getChildren(H),f=f.concat(g.importCells(E,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var C=g.getBoundingBoxFromGeometry(f,!0);null!=C&&g.moveCells(f,b-C.x,c-C.y)}}finally{g.model.endUpdate()}}}}catch(B){throw e||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
A=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,p,p,A))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var v=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,v);var E=v.getChildCount(v.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<E;n++){var H=v.getChildAt(v.getRoot(),n);if(1!=E||g.isCellLocked(g.getDefaultParent()))H=g.importCells([H],0,0,g.model.getRoot(),
null,a)[0],F=g.model.getChildren(H),g.moveCells(F,b,c),f=f.concat(F);else var F=v.getChildren(H),f=f.concat(g.importCells(F,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var C=g.getBoundingBoxFromGeometry(f,!0);null!=C&&g.moveCells(f,b-C.x,c-C.y)}}finally{g.model.endUpdate()}}}}catch(B){throw e||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
b,c,d)}catch(q){}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("/js/diagramly/Extensions.js",e):mxscript("/js/extensions.min.js",e))};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,
26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(x){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
@ -2746,11 +2746,11 @@ b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&6
b,c,d,e,f,g,l,m,k,z)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],r=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=t)t(q);else{var c=[];l.getModel().beginUpdate();try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),G=0;G<n;G++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=
mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],t=z?null:p.getAttribute("content");null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==
t.substring(0,14)?r(f,mxUtils.bind(this,function(){try{if(l.substring(0,n+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var g=a[0],p=parseFloat(g.getAttribute("width")),r=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox","0 0 "+p+" "+r);else if(isNaN(p)||isNaN(r)){var y=t.split(" ");3<y.length&&(p=parseFloat(y[2]),r=parseFloat(y[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var u=Math.min(1,Math.min(d/Math.max(1,
p)),d/Math.max(1,r));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*u)),Math.max(1,Math.round(r*u)),k.name)}}}catch(P){}return null})):r(f,mxUtils.bind(this,function(){return e(t,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var v=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var B=new Image;B.src=a.target.result;r(f,mxUtils.bind(this,function(){return e(v,"text/xml",b+f*m,c+f*m,B.width,B.height,k.name)}));p=!0}}p||(null!=window.chrome&&
p)),d/Math.max(1,r));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*u)),Math.max(1,Math.round(r*u)),k.name)}}}catch(O){}return null})):r(f,mxUtils.bind(this,function(){return e(t,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var v=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var B=new Image;B.src=a.target.result;r(f,mxUtils.bind(this,function(){return e(v,"text/xml",b+f*m,c+f*m,B.width,B.height,k.name)}));p=!0}}p||(null!=window.chrome&&
null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,l,n){r(f,mxUtils.bind(this,function(){if(null!=g&&g.length<y){var p=u&&this.isResampleImage(a.target.result)?
Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),u,d,x)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})},k):"image"==k.type.substring(0,5)?l.readAsDataURL(k):l.readAsText(k)})(G)};EditorUi.prototype.parseFile=
function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=
Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var q=p.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=m;v.height=n;var F=v.toDataURL();q!==F&&(b=q,g=m,k=n)}}}catch(H){}c(b,g,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=
Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var q=p.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=m;v.height=n;var E=v.toDataURL();q!==E&&(b=q,g=m,k=n)}}}catch(H){}c(b,g,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=
EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,
10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var m=g(a);if("IDAT"==f(a,4)){e=a.substring(0,l-8);m=4294967295;m=this.updateCRC(m,b,0,4);m=this.updateCRC(m,d,0,d.length);e+=k(c.length+d.length+1+("zTXt"==b?1:0))+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+k(m^4294967295);e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+m);d=f(a,m);f(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&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&
@ -2797,7 +2797,7 @@ mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this
try{m.init()}catch(B){g.postMessage(JSON.stringify({event:"draft",error:B.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,
function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxResources.get(l.messageKey)):null!=l.message&&this.editor.setStatus(l.message);null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==
l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var r=this.editor.graph;if(null!=this.pages&&this.currentPage!=
this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),t=r.getGlobalVariable,E=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container);
this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),t=r.getGlobalVariable,F=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?F.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(F.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container);
q(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200<=a.getStatus()&&299>=a.getStatus()&&q(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");
if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";
if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
@ -2809,14 +2809,14 @@ b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged"
a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" (Ctrl+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),
mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight=
"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),
null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",k=40,u=40,y=0,x=this.editor.graph;x.getGraphBounds();for(var z=function(){x.setSelectionCells(da);x.scrollCellToVisible(x.getSelectionCell())},A=x.getFreeInsertPoint(),v=A.x,F=A.y,A=F,H=null,E="auto",C=[],B=null,G=null,I=0;I<b.length&&
"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var N=a.indexOf(":");if(0<N){var J=mxUtils.trim(a.substring(1,N)),U=mxUtils.trim(a.substring(N+1));"label"==J?H=x.sanitizeHtml(U):"style"==J?e=U:"width"==J?f=U:"height"==J?g=U:"ignore"==J?G=U.split(","):"connect"==J?C.push(JSON.parse(U)):"link"==J?B=U:"padding"==J?y=parseFloat(U):"edgespacing"==J?k=parseFloat(U):"nodespacing"==
J?u=parseFloat(U):"layout"==J&&(E=U)}}}var R=this.editor.csvToArray(b[I]);null==H&&(H="%"+R[0]+"%");if(null!=C)for(var V=0;V<C.length;V++)null==d[C[V].to]&&(d[C[V].to]={});x.model.beginUpdate();try{for(a=I+1;a<b.length;a++){var X=this.editor.csvToArray(b[a]);if(X.length==R.length){var D=new mxCell(H,new mxGeometry(v,A,0,0),e||"whiteSpace=wrap;html=1;");D.vertex=!0;for(var W=0;W<X.length;W++)x.setAttributeForCell(D,R[W],X[W]);x.setAttributeForCell(D,"placeholders","1");D.style=x.replacePlaceholders(D,
D.style);for(V=0;V<C.length;V++)d[C[V].to][D.getAttribute(C[V].to)]=D;null!=B&&"link"!=B&&(x.setLinkForCell(D,D.getAttribute(B)),x.setAttributeForCell(D,B,null));var aa=this.editor.graph.getPreferredSizeForCell(D);D.geometry.width="auto"==f?aa.width+y:parseFloat(f);D.geometry.height="auto"==g?aa.height+y:parseFloat(g);A+=D.geometry.height+u;c.push(x.addCell(D))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var K=c.slice(),da=c.slice(),V=0;V<C.length;V++){var M=C[V];for(a=
0;a<c.length;a++){var D=c[a],L=D.getAttribute(M.from);if(null!=L){x.setAttributeForCell(D,M.from,null);for(var O=L.split(","),W=0;W<O.length;W++){var T=d[M.to][O[W]];null!=T&&(da.push(x.insertEdge(null,null,M.label||"",M.invert?T:D,M.invert?D:T,M.style||x.createCurrentEdgeStyle())),mxUtils.remove(M.invert?D:T,K))}}}}if(null!=G)for(a=0;a<c.length;a++)for(D=c[a],W=0;W<G.length;W++)x.setAttributeForCell(D,mxUtils.trim(G[W]),null);var ba=new mxParallelEdgeLayout(x);ba.spacing=k;var ca=function(){ba.execute(x.getDefaultParent());
for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==f&&(b.width=Math.round(x.snap(b.width)));"auto"==g&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==E){var P=new mxCircleLayout(x);P.resetEdges=!1;var Y=P.isVertexIgnored;P.isVertexIgnored=function(a){return Y.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){P.execute(x.getDefaultParent());ca()},!0,z);z=null}else if("horizontaltree"==E||"verticaltree"==
E||"auto"==E&&da.length==2*c.length-1&&1==K.length){x.view.validate();var Z=new mxCompactTreeLayout(x,"horizontaltree"==E);Z.levelDistance=u;Z.edgeRouting=!1;this.executeLayout(function(){Z.execute(x.getDefaultParent(),0<K.length?K[0]:null)},!0,z);z=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==K.length){x.view.validate();var Q=new mxHierarchicalLayout(x,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Q.intraCellSpacing=u;this.executeLayout(function(){Q.execute(x.getDefaultParent(),
da);x.moveCells(da,v,F)},!0,z);z=null}else if("organic"==E||"auto"==E&&da.length>c.length){x.view.validate();var S=new mxFastOrganicLayout(x);S.forceConstant=3*u;S.resetEdges=!1;var ga=S.isVertexIgnored;S.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ba=new mxParallelEdgeLayout(x);ba.spacing=k;this.executeLayout(function(){S.execute(x.getDefaultParent());ca()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(ea){this.handleError(ea)}};
null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",k=40,u=40,y=0,x=this.editor.graph;x.getGraphBounds();for(var z=function(){x.setSelectionCells(da);x.scrollCellToVisible(x.getSelectionCell())},A=x.getFreeInsertPoint(),v=A.x,E=A.y,A=E,H=null,F="auto",C=[],B=null,G=null,I=0;I<b.length&&
"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var M=a.indexOf(":");if(0<M){var J=mxUtils.trim(a.substring(1,M)),U=mxUtils.trim(a.substring(M+1));"label"==J?H=x.sanitizeHtml(U):"style"==J?e=U:"width"==J?f=U:"height"==J?g=U:"ignore"==J?G=U.split(","):"connect"==J?C.push(JSON.parse(U)):"link"==J?B=U:"padding"==J?y=parseFloat(U):"edgespacing"==J?k=parseFloat(U):"nodespacing"==
J?u=parseFloat(U):"layout"==J&&(F=U)}}}var R=this.editor.csvToArray(b[I]);null==H&&(H="%"+R[0]+"%");if(null!=C)for(var V=0;V<C.length;V++)null==d[C[V].to]&&(d[C[V].to]={});x.model.beginUpdate();try{for(a=I+1;a<b.length;a++){var X=this.editor.csvToArray(b[a]);if(X.length==R.length){var D=new mxCell(H,new mxGeometry(v,A,0,0),e||"whiteSpace=wrap;html=1;");D.vertex=!0;for(var W=0;W<X.length;W++)x.setAttributeForCell(D,R[W],X[W]);x.setAttributeForCell(D,"placeholders","1");D.style=x.replacePlaceholders(D,
D.style);for(V=0;V<C.length;V++)d[C[V].to][D.getAttribute(C[V].to)]=D;null!=B&&"link"!=B&&(x.setLinkForCell(D,D.getAttribute(B)),x.setAttributeForCell(D,B,null));var Q=this.editor.graph.getPreferredSizeForCell(D);D.geometry.width="auto"==f?Q.width+y:parseFloat(f);D.geometry.height="auto"==g?Q.height+y:parseFloat(g);A+=D.geometry.height+u;c.push(x.addCell(D))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var ca=c.slice(),da=c.slice(),V=0;V<C.length;V++){var L=C[V];for(a=0;a<
c.length;a++){var D=c[a],K=D.getAttribute(L.from);if(null!=K){x.setAttributeForCell(D,L.from,null);for(var N=K.split(","),W=0;W<N.length;W++){var T=d[L.to][N[W]];null!=T&&(da.push(x.insertEdge(null,null,L.label||"",L.invert?T:D,L.invert?D:T,L.style||x.createCurrentEdgeStyle())),mxUtils.remove(L.invert?D:T,ca))}}}}if(null!=G)for(a=0;a<c.length;a++)for(D=c[a],W=0;W<G.length;W++)x.setAttributeForCell(D,mxUtils.trim(G[W]),null);var aa=new mxParallelEdgeLayout(x);aa.spacing=k;var ba=function(){aa.execute(x.getDefaultParent());
for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==f&&(b.width=Math.round(x.snap(b.width)));"auto"==g&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==F){var O=new mxCircleLayout(x);O.resetEdges=!1;var Y=O.isVertexIgnored;O.isVertexIgnored=function(a){return Y.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){O.execute(x.getDefaultParent());ba()},!0,z);z=null}else if("horizontaltree"==F||"verticaltree"==
F||"auto"==F&&da.length==2*c.length-1&&1==ca.length){x.view.validate();var Z=new mxCompactTreeLayout(x,"horizontaltree"==F);Z.levelDistance=u;Z.edgeRouting=!1;this.executeLayout(function(){Z.execute(x.getDefaultParent(),0<ca.length?ca[0]:null)},!0,z);z=null}else if("horizontalflow"==F||"verticalflow"==F||"auto"==F&&1==ca.length){x.view.validate();var P=new mxHierarchicalLayout(x,"horizontalflow"==F?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);P.intraCellSpacing=u;this.executeLayout(function(){P.execute(x.getDefaultParent(),
da);x.moveCells(da,v,E)},!0,z);z=null}else if("organic"==F||"auto"==F&&da.length>c.length){x.view.validate();var S=new mxFastOrganicLayout(x);S.forceConstant=3*u;S.resetEdges=!1;var ga=S.isVertexIgnored;S.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(x);aa.spacing=k;this.executeLayout(function(){S.execute(x.getDefaultParent());ba()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(ea){this.handleError(ea)}};
EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};var f=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=f.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)&&
@ -2905,9 +2905,9 @@ Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,
p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=v.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");A.addListener(mxEvent.CHANGE,function(){v.style.display=1<A.getChildCount(A.root)?"inline-block":"none"});v.style.display=1<A.getChildCount(A.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
(t=this.graphConfig["toolbar-buttons"][t],null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(m=b.ownerDocument.createElement("div"),m.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",m.setAttribute("title",this.graphConfig.title),mxUtils.write(m,
this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var F=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==F&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
p=null),b.style.border=F)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var E=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
p=null),b.style.border=E)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,function(c){null!=b&&(c=mxEvent.getSource(c).getAttribute("href"),null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||b.destroy())},mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(){if("open"==this.graphConfig.lightbox||window.self!==window.top){var a=this.layersEnabled?"&layers=1":"";if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,c=mxUtils.bind(this,function(a){"ready"==a.data&&a.source==b&&(b.postMessage(this.xml,"*"),mxEvent.removeListener(window,"message",c))});mxEvent.addListener(window,"message",c);b=window.open("https://www.draw.io/?client=1&lightbox=1&close=1&edit=_blank"+
a)}else window.drawdata=this.xml,window.open("https://www.draw.io/?client=1&lightbox=1&edit=_blank"+a)}else this.showLocalLightbox()};
@ -2925,6 +2925,6 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,c){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=c;d.send()}};GraphViewer.resizeSensorEnabled=!0;
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(c,d){function e(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function f(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function g(b,c){if(!b.resizedAttached)b.resizedAttached=
new e,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
b.appendChild(b.resizeSensor);"static"==f(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],g=d.childNodes[0],k=b.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,F,H,E=function(){if((F=b.offsetWidth)!=p||(H=b.offsetHeight)!=q)m=!0,p=F,q=H;l()},C=function(a,b,c){a.attachEvent?
a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",E);C(k,"scroll",E)}var k=function(){GraphViewer.resizeSensorEnabled&&d()},l=Object.prototype.toString.call(c),m="[object Array]"===l||"[object NodeList]"===l||"[object HTMLCollection]"===l||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(m)for(var l=0,n=c.length;l<n;l++)g(c[l],k);else g(c,k);this.detach=function(){if(m)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};
b.appendChild(b.resizeSensor);"static"==f(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],g=d.childNodes[0],k=b.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,E,H,F=function(){if((E=b.offsetWidth)!=p||(H=b.offsetHeight)!=q)m=!0,p=E,q=H;l()},C=function(a,b,c){a.attachEvent?
a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",F);C(k,"scroll",F)}var k=function(){GraphViewer.resizeSensorEnabled&&d()},l=Object.prototype.toString.call(c),m="[object Array]"===l||"[object NodeList]"===l||"[object HTMLCollection]"===l||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(m)for(var l=0,n=c.length;l<n;l++)g(c[l],k);else g(c,k);this.detach=function(){if(m)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();

36
war/js/atlas.min.js vendored
View file

@ -2010,9 +2010,9 @@ a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.f
this.graph.pageBreaksVisible;var c=a.getAttribute("pageWidth"),f=a.getAttribute("pageHeight");null!=c&&null!=f&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(c),parseFloat(f)));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
Editor.prototype.setGraphXml=function(a){if(null!=a){var c=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),c.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var f=c.document.createElement("mxGraphModel");f.appendChild(a);c.decode(f,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),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(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.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,b){c.undoableEditHappened(b.getProperty("edit"))};var f=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,b){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),c=a.getModel(),f=[],l=0;l<e.length;l++)(c.isVertex(e[l])||c.isEdge(e[l]))&&null!=a.view.getState(e[l])&&
f.push(e[l]);a.setSelectionCells(f)};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(a,c){this.data=a;this.filename=c;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.data&&(this.cancel(!1),this.consumer(this.data,this.filename))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
@ -2493,13 +2493,13 @@ f&&Math.abs(this.scrollTop-k.container.scrollTop)<f&&Math.abs(this.startX-e.getG
k.click=function(b){};k.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(b){g.clear()})};Graph.prototype.duplicateCells=function(b,a){b=null!=b?b:this.getSelectionCells();a=null!=a?a:!0;b=this.model.getTopmostCells(b);var d=this.getModel(),e=this.gridSize,c=[];d.beginUpdate();try{for(var f=this.cloneCells(b,!1),k=0;k<b.length;k++){var g=d.getParent(b[k]),l=this.moveCells([f[k]],e,e,!1,g)[0];c.push(l);if(a)d.add(g,f[k]);else{var m=g.getIndex(b[k]);d.add(g,f[k],m+1)}}}finally{d.endUpdate()}return c};
Graph.prototype.insertImage=function(b,a,d){if(null!=b){for(var e=this.cellEditor.textarea.getElementsByTagName("img"),c=[],f=0;f<e.length;f++)c.push(e[f]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==c.length+1)for(f=b.length-1;0<=f;f--)if(0==f||b[f]!=c[f-1]){b[f].setAttribute("width",a);b[f].setAttribute("height",d);break}}};Graph.prototype.insertLink=function(b){0==b.length?document.execCommand("unlink",!1):document.execCommand("createlink",
!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var a=mxGraph.prototype.isCellResizable.apply(this,arguments),d=this.view.getState(b),d=null!=d?d.style:this.getCellStyle(b);return a||"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==d[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(b,a){null==a&&(a=this.getSelectionCells());if(null!=a&&1<a.length){for(var d=[],e=null,c=null,f=0;f<a.length;f++)if(this.getModel().isVertex(a[f])){var k=this.view.getState(a[f]);
if(null!=k){var g=b?k.getCenterX():k.getCenterY(),e=null!=e?Math.max(e,g):g,c=null!=c?Math.min(c,g):g;d.push(k)}}if(2<d.length){d.sort(function(a,d){return b?a.x-d.x:a.y-d.y});k=this.view.translate;g=this.view.scale;c=c/g-(b?k.x:k.y);e=e/g-(b?k.x:k.y);this.getModel().beginUpdate();try{for(var l=(e-c)/(d.length-1),e=c,f=1;f<d.length-1;f++){var m=this.getCellGeometry(d[f].cell),e=e+l;null!=m&&(m=m.clone(),b?m.x=Math.round(e-m.width/2):m.y=Math.round(e-m.height/2),this.getModel().setGeometry(d[f].cell,
m))}}finally{this.getModel().endUpdate()}}}return a};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.encodeCells=function(b){for(var a=this.cloneCells(b),d=new mxDictionary,e=0;e<b.length;e++)d.put(b[e],!0);for(e=0;e<a.length;e++){var c=this.view.getState(b[e]);if(null!=c){var f=this.getCellGeometry(a[e]);null==f||!f.relative||this.model.isEdge(b[e])||d.get(this.model.getParent(b[e]))||(f.relative=!1,f.x=c.x/c.view.scale-
c.view.translate.x,f.y=c.y/c.view.scale-c.view.translate.y)}}for(var c=new mxCodec,f=new mxGraphModel,k=f.getChildAt(f.getRoot(),0),e=0;e<b.length;e++)d.get(this.model.getParent(b[e]))||f.add(k,a[e]);return c.encode(f)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,a){return this.getLinkForCell(b.cell)});return b};Graph.prototype.getSvg=function(b,a,d,e,c,f,k){a=null!=a?a:1;d=null!=d?d:0;c=null!=c?c:!0;f=null!=f?f:!0;k=null!=
k?k:!0;var g=f||e?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();e=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=b&&(null!=e.style?e.style.backgroundColor=b:e.setAttribute("style","background-color:"+b));null==m.createElementNS?(e.setAttribute("xmlns",mxConstants.NS_SVG),e.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=a/l;e.setAttribute("width",Math.ceil(g.width*b)+2*d+"px");e.setAttribute("height",Math.ceil(g.height*b)+2*d+"px");e.setAttribute("version","1.1");var n=e;c&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),e.appendChild(n));m.appendChild(e);m=this.createSvgCanvas(n);m.foOffset=c?-.5:0;m.textOffset=c?-.5:0;m.imageOffset=c?-.5:
0;m.translate(Math.floor((d/a-g.x)/l),Math.floor((d/a-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(b,a,d,e,c,f,k,g,l,m,n,t,q){var u=this.state;if(null!=this.foAltText&&(0==e||0!=u.fontSize&&f.length<5*e/u.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(e/2));v.setAttribute("y",Math.round((c+u.fontSize)/2));v.setAttribute("fill",u.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(u.fontSize)+"px");
v.setAttribute("font-family",u.fontFamily);(u.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight","bold");(u.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(u.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");mxUtils.write(v,f);return v}return p.apply(this,arguments)};d=this.backgroundImage;null!=d&&(c=l/a,a=this.view.translate,c=new mxRectangle(a.x*
if(null!=k){var g=b?k.getCenterX():k.getCenterY(),e=null!=e?Math.max(e,g):g,c=null!=c?Math.min(c,g):g;d.push(k)}}if(2<d.length){d.sort(function(a,d){return b?a.x-d.x:a.y-d.y});k=this.view.translate;g=this.view.scale;c=c/g-(b?k.x:k.y);e=e/g-(b?k.x:k.y);this.getModel().beginUpdate();try{for(var l=(e-c)/(d.length-1),e=c,f=1;f<d.length-1;f++){var m=this.view.getState(this.model.getParent(d[f].cell)),n=this.getCellGeometry(d[f].cell),e=e+l;null!=n&&null!=m&&(n=n.clone(),b?n.x=Math.round(e-n.width/2)-m.origin.x:
n.y=Math.round(e-n.height/2)-m.origin.y,this.getModel().setGeometry(d[f].cell,n))}}finally{this.getModel().endUpdate()}}}return a};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.encodeCells=function(b){for(var a=this.cloneCells(b),d=new mxDictionary,e=0;e<b.length;e++)d.put(b[e],!0);for(e=0;e<a.length;e++){var c=this.view.getState(b[e]);if(null!=c){var f=this.getCellGeometry(a[e]);null==f||!f.relative||this.model.isEdge(b[e])||
d.get(this.model.getParent(b[e]))||(f.relative=!1,f.x=c.x/c.view.scale-c.view.translate.x,f.y=c.y/c.view.scale-c.view.translate.y)}}d=new mxCodec;c=new mxGraphModel;f=c.getChildAt(c.getRoot(),0);for(e=0;e<b.length;e++)c.add(f,a[e]);return d.encode(c)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,a){return this.getLinkForCell(b.cell)});return b};Graph.prototype.getSvg=function(b,a,d,e,c,f,k){a=null!=a?a:1;d=null!=d?d:0;c=
null!=c?c:!0;f=null!=f?f:!0;k=null!=k?k:!0;var g=f||e?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();e=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=b&&(null!=e.style?e.style.backgroundColor=b:e.setAttribute("style","background-color:"+b));null==m.createElementNS?(e.setAttribute("xmlns",mxConstants.NS_SVG),e.setAttribute("xmlns:xlink",
mxConstants.NS_XLINK)):e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=a/l;e.setAttribute("width",Math.ceil(g.width*b)+2*d+"px");e.setAttribute("height",Math.ceil(g.height*b)+2*d+"px");e.setAttribute("version","1.1");var n=e;c&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),e.appendChild(n));m.appendChild(e);m=this.createSvgCanvas(n);m.foOffset=c?-.5:0;m.textOffset=c?
-.5:0;m.imageOffset=c?-.5:0;m.translate(Math.floor((d/a-g.x)/l),Math.floor((d/a-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(b,a,d,e,c,f,k,g,l,m,n,t,q){var u=this.state;if(null!=this.foAltText&&(0==e||0!=u.fontSize&&f.length<5*e/u.fontSize)){var v=this.createElement("text");v.setAttribute("x",Math.round(e/2));v.setAttribute("y",Math.round((c+u.fontSize)/2));v.setAttribute("fill",u.fontColor||"black");v.setAttribute("text-anchor","middle");v.setAttribute("font-size",Math.round(u.fontSize)+
"px");v.setAttribute("font-family",u.fontFamily);(u.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&v.setAttribute("font-weight","bold");(u.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&v.setAttribute("font-style","italic");(u.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&v.setAttribute("text-decoration","underline");mxUtils.write(v,f);return v}return p.apply(this,arguments)};d=this.backgroundImage;null!=d&&(c=l/a,a=this.view.translate,c=new mxRectangle(a.x*
c,a.y*c,d.width*c,d.height*c),mxUtils.intersects(g,c)&&m.image(a.x,a.y,d.width,d.height,d.src,!0));m.scale(b);m.textEnabled=k;k=this.createSvgImageExport();var t=k.drawCellState;k.drawCellState=function(b,a){(f||b.view.graph.isCellSelected(b.cell))&&t.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),m);return e};Graph.prototype.createSvgCanvas=function(b){return new mxSvgCanvas2D(b)};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var a=
window.getSelection();a.getRangeAt&&a.rangeCount&&(b=a.getRangeAt(0).commonAncestorContainer)}else document.selection&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getParentByName=function(b,a,d){for(;null!=b&&b.nodeName!=a;){if(b==d)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var a=null;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){var d=document.createRange();d.selectNode(b);a.removeAllRanges();a.addRange(d)}}else(a=
document.selection)&&"Control"!=a.type&&(b=a.createRange(),b.collapse(!0),d=a.createRange(),d.setEndPoint("StartToStart",b),d.select())};Graph.prototype.insertRow=function(b,a){for(var d=b.tBodies[0],e=0<d.rows.length?d.rows[0].cells.length:1,d=d.insertRow(a),c=0;c<e;c++)mxUtils.br(d.insertCell(-1));return d.cells[0]};Graph.prototype.deleteRow=function(b,a){b.tBodies[0].deleteRow(a)};Graph.prototype.insertColumn=function(b,a){var d=b.tHead;if(null!=d)for(var e=0;e<d.rows.length;e++){var c=document.createElement("th");
@ -7311,7 +7311,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=
[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return u.apply(this,arguments)}})();
(function(){EditorUi.VERSION="6.2.9";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
(function(){EditorUi.VERSION="6.3.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;EditorUi.prototype.pdfPageExport=!0;(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<c.length}catch(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=
a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
@ -7356,13 +7356,13 @@ a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttrib
mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var x=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",
E.style.marginRight="2px",E.style.marginTop="-2px",l.insertBefore(E,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,
function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(A.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",
!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),F=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),
c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;c.y-=A.view.translate.y;C(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",
A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=
!0,F(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,
"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,
0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,n),t)];t[0].vertex=!0;C(t,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(c.documentElement));
function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(mxUtils.sortCells(A.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,
c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),F=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
A.getSelectionCells(),c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;c.y-=A.view.translate.y;C(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",
k.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),
A.isMouseDown=!1,A.autoScroll=!0,F(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,n),t)];t[0].vertex=!0;C(t,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(c.documentElement));
f(q,k);b=b.concat(q);z(a);this.spinner.stop();p=!0}catch(G){}else if("mxfile"==c.documentElement.nodeName)try{q=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),t=this.stringToCells(this.editor.graph.decompress(q)),C(t,new mxRectangle(0,0,m,n),a),p=!0}catch(G){}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),
mxEvent.addListener(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);
m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var E=null;mxEvent.addListener(m,

View file

@ -1743,7 +1743,7 @@
var addCells = mxUtils.bind(this, function(cells, bounds, evt, title)
{
cells = graph.cloneCells(graph.model.getTopmostCells(cells));
cells = graph.cloneCells(mxUtils.sortCells(graph.model.getTopmostCells(cells)));
// Translates cells to origin
for (var i = 0; i < cells.length; i++)

View file

@ -350,9 +350,8 @@ GitHubClient.prototype.getFile = function(path, success, error, asLibrary)
// Should never be null
if (this.token != null)
{
var url = this.baseUrl + '/repos/' + org + '/' + repo +
'/contents/' + path + '?ref=' + encodeURIComponent(ref) +
'&token=' + this.token;
var url = this.baseUrl + '/repos/' + org + '/' + repo + '/contents/' +
path + '?ref=' + decodeURIComponent(ref) + '&token=' + this.token;
var tokens = path.split('/');
var name = (tokens.length > 0) ? tokens[tokens.length - 1] : path;
@ -366,7 +365,7 @@ GitHubClient.prototype.getFile = function(path, success, error, asLibrary)
else
{
var req = new mxXmlRequest(this.baseUrl + '/repos/' + org + '/' + repo +
'/contents/' + path + '?ref=' + encodeURIComponent(ref), null, 'GET');
'/contents/' + path + '?ref=' + decodeURIComponent(ref), null, 'GET');
this.executeRequest(req, mxUtils.bind(this, function(req)
{
@ -525,6 +524,7 @@ GitHubClient.prototype.writeFile = function(org, repo, ref, path, message, data,
var entity =
{
path: path,
branch: decodeURIComponent(ref),
message: message,
content: data
};
@ -535,8 +535,7 @@ GitHubClient.prototype.writeFile = function(org, repo, ref, path, message, data,
}
var req = new mxXmlRequest(this.baseUrl + '/repos/' + org + '/' + repo +
'/contents/' + path + '?ref=' + encodeURIComponent(ref),
JSON.stringify(entity), 'PUT');
'/contents/' + path, JSON.stringify(entity), 'PUT');
this.executeRequest(req, mxUtils.bind(this, function(req)
{
@ -705,7 +704,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
var dlg = new CustomDialog(this.ui, content, mxUtils.bind(this, function()
{
fn(org + '/' + repo + '/' + ref + '/' + path);
fn(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + path);
}));
this.ui.showDialog(dlg.container, 340, 270, true, true);
@ -738,7 +737,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
if (!hideRef)
{
mxUtils.write(pathInfo, ' / ');
pathInfo.appendChild(createLink(ref, mxUtils.bind(this, function()
pathInfo.appendChild(createLink(decodeURIComponent(ref), mxUtils.bind(this, function()
{
path = null;
selectRef();
@ -778,7 +777,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
var selectFile = mxUtils.bind(this, function()
{
var req = new mxXmlRequest(this.baseUrl + '/repos/' + org + '/' + repo +
'/contents/' + path + '?ref=' + encodeURIComponent(ref), null, 'GET');
'/contents/' + path + '?ref=' + ref, null, 'GET');
dlg.okButton.removeAttribute('disabled');
div.innerHTML = '';
this.ui.spinner.spin(div, mxResources.get('loading'));
@ -828,7 +827,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
else if (showFiles && file.type == 'file')
{
this.ui.hideDialog();
fn(org + '/' + repo + '/' + ref + '/' + file.path);
fn(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + file.path);
}
})));
mxUtils.br(div);
@ -943,30 +942,29 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
{
if (value != null)
{
this.ui.spinner.spin(div, mxResources.get('loading'));
var tokens = value.split('/');
this.getFile(value, mxUtils.bind(this, function(file)
if (tokens.length > 1 && this.ui.spinner.spin(div, mxResources.get('loading')))
{
this.ui.spinner.stop();
org = file.meta.org;
repo = file.meta.repo;
ref = file.meta.ref;
if (file.meta.path != null && showFiles)
{
this.ui.hideDialog();
fn(org + '/' + repo + '/' + ref + '/' + file.meta.path);
}
else
var tmpOrg = tokens[0];
var tmpRepo = tokens[1];
var tmpRef = encodeURIComponent(tokens.slice(2, tokens.length).join('/'));
this.getFile(tmpOrg + '/' + tmpRepo + '/' + tmpRef, mxUtils.bind(this, function(file)
{
this.ui.spinner.stop();
org = file.meta.org;
repo = file.meta.repo;
ref = decodeURIComponent(file.meta.ref);
path = '';
selectFile();
}
}), mxUtils.bind(this, function(err)
{
this.ui.spinner.stop();
this.ui.handleError({message: mxResources.get('fileNotFound')});
}));
}), mxUtils.bind(this, function(err)
{
this.ui.spinner.stop();
this.ui.handleError({message: mxResources.get('fileNotFound')});
}));
}
}
}), mxResources.get('enterValue'));
this.ui.showDialog(dlg.container, 300, 80, true, false);

View file

@ -24,9 +24,8 @@ GitHubFile.prototype.getHash = function()
((this.meta.repo != null) ?
encodeURIComponent(this.meta.repo) + '/' +
((this.meta.ref != null) ?
encodeURIComponent(this.meta.ref) +
((this.meta.path != null) ? '/' + this.meta.path
: '') : '') : ''));
this.meta.ref + ((this.meta.path != null) ?
'/' + this.meta.path : '') : '') : ''));
};
/**

View file

@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+x.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.2.9",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.3.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@ -1655,13 +1655,13 @@ f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getG
g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1,h)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};
Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);
if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.getCellGeometry(c[f].cell),d=d+k;null!=l&&(l=l.clone(),a?l.x=Math.round(d-l.width/2):l.y=Math.round(d-l.height/2),this.getModel().setGeometry(c[f].cell,
l))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-
e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}for(var e=new mxCodec,f=new mxGraphModel,g=f.getChildAt(f.getRoot(),0),d=0;d<a.length;d++)c.get(this.model.getParent(a[d]))||f.add(g,b[d]);return e.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=
g?g:!0;var h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.ceil(h.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(h.height*a)+2*c+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:
0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,v){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");
r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline");mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*
if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:
m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||
c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:0;e=
null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",
mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.ceil(h.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(h.height*a)+2*c+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?
-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,v){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+
"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline");mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*
e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=
window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=
document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");

View file

@ -492,7 +492,8 @@ Editor.prototype.getGraphXml = function(ignoreSelection)
}
else
{
node = this.graph.encodeCells(this.graph.getSelectionCells());
node = this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(
this.graph.getSelectionCells())));
}
if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0)

View file

@ -4749,10 +4749,10 @@ if (typeof mxVertexHandler != 'undefined')
};
/**
* Function: alignCells
* Function: distributeCells
*
* Aligns the given cells vertically or horizontally according to the given
* alignment using the optional parameter as the coordinate.
* Distribuets the centers of the given cells equally along the available
* horizontal or vertical space.
*
* Parameters:
*
@ -4810,20 +4810,21 @@ if (typeof mxVertexHandler != 'undefined')
for (var i = 1; i < vertices.length - 1; i++)
{
var pstate = this.view.getState(this.model.getParent(vertices[i].cell));
var geo = this.getCellGeometry(vertices[i].cell);
t0 += dt;
if (geo != null)
if (geo != null && pstate != null)
{
geo = geo.clone();
if (horizontal)
{
geo.x = Math.round(t0 - geo.width / 2);
geo.x = Math.round(t0 - geo.width / 2) - pstate.origin.x;
}
else
{
geo.y = Math.round(t0 - geo.height / 2);
geo.y = Math.round(t0 - geo.height / 2) - pstate.origin.y;
}
this.getModel().setGeometry(vertices[i].cell, geo);
@ -4893,11 +4894,7 @@ if (typeof mxVertexHandler != 'undefined')
for (var i = 0; i < cells.length; i++)
{
// Avoids duplicate output of children for included parents
if (!dict.get(this.model.getParent(cells[i])))
{
model.add(parent, clones[i]);
}
model.add(parent, clones[i]);
}
return codec.encode(model);

16
war/js/reader.min.js vendored
View file

@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+x.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.2.9",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.3.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@ -1655,13 +1655,13 @@ f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getG
g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1,h)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};
Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);
if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.getCellGeometry(c[f].cell),d=d+k;null!=l&&(l=l.clone(),a?l.x=Math.round(d-l.width/2):l.y=Math.round(d-l.height/2),this.getModel().setGeometry(c[f].cell,
l))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-
e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}for(var e=new mxCodec,f=new mxGraphModel,g=f.getChildAt(f.getRoot(),0),d=0;d<a.length;d++)c.get(this.model.getParent(a[d]))||f.add(g,b[d]);return e.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=
g?g:!0;var h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.ceil(h.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(h.height*a)+2*c+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:
0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,v){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+"px");
r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline");mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*
if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:
m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||
c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:0;e=
null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",
mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.ceil(h.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(h.height*a)+2*c+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?
-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,p,v){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var r=this.createElement("text");r.setAttribute("x",Math.round(d/2));r.setAttribute("y",Math.round((e+q.fontSize)/2));r.setAttribute("fill",q.fontColor||"black");r.setAttribute("text-anchor","middle");r.setAttribute("font-size",Math.round(q.fontSize)+
"px");r.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&r.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&r.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&r.setAttribute("text-decoration","underline");mxUtils.write(r,f);return r}return n.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*
e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var p=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&p.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=
window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=
document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");

412
war/js/viewer.min.js vendored
View file

@ -44,15 +44,15 @@ this.l&&a.push("?",this.l);null!==this.o&&a.push("#",this.o);return a.join("")};
function(){return null!==this.k};f.prototype.V=function(){return this.h&&decodeURIComponent(this.h)};f.prototype.ca=function(a){if(a){a=Number(a);if(a!==(a&65535))throw Error("Bad port number "+a);this.h=""+a}else this.h=null};f.prototype.$=function(){return null!==this.h};f.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};f.prototype.G=function(a){a?(a=""+a,this.g=!this.k||/^\//.test(a)?a:"/"+a):this.g=null};f.prototype.O=function(a){this.l=a?a:null};f.prototype.aa=function(){return null!==
this.l};f.prototype.ba=function(a){if("object"===typeof a&&!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1,d;for(d in a){var e=a[d];"string"===typeof e&&(b[++c]=d,b[++c]=e)}a=b}for(var b=[],c="",f=0;f<a.length;)d=a[f++],e=a[f++],b.push(c,encodeURIComponent(d.toString())),c="&",e&&b.push("=",encodeURIComponent(e.toString()));this.l=b.join("")};f.prototype.fa=function(a){this.o=a?a:null};f.prototype.Z=function(){return null!==this.o};
var m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,n=/[#\/\?@]/g,p=/[\#\?]/g;f.parse=a;f.create=function(a,d,e,k,g,l,m){a=new f(b(a,n),b(d,n),"string"==typeof e?encodeURIComponent(e):null,0<k?k.toString():null,b(g,p),null,"string"==typeof m?encodeURIComponent(m):null);l&&("string"===typeof l?a.O(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,c)):a.ba(l));return a};f.N=e;f.ma=d;f.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},
N:function(b,c){return b?e(a(b),a(c)).toString():""+c}};return f}();"undefined"!==typeof window&&(window.URI=f);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(z,c)+'")':'url("about:blank")'}function c(a){return A[a]}function d(a,b){return a?f.ha.N(a,b):b}function p(a,b,c){if(!c)return null;var d=(""+a).match(v);return!d||d[1]&&!F.test(d[1])?null:c(a,b)}function x(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
"")}var z=/[\n\f\r\"\'()*<>]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function G(f,k,g,l,m){f=x(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y<k.length;++y){var v=k[y].toLowerCase(),z=v.charCodeAt(0),A,F,E,I,H,N;if(32===z)v="";else if(34===z)v=16===r?g?a(p(d(l,e(k[y].substring(1,v.length-1))),f,g)):"":
q&8&&!(r&r-1)?v:"";else if("inherit"!==v){if(H=n.cssLitGroup){var J;if(!(J=n.cssLitMap)){J={};for(var R=H.length;0<=--R;)for(var S=H[R],ga=S.length;0<=--ga;)J[S[ga]]=c;J=n.cssLitMap=J}H=J}else H=c;if(N=H,N[x(v)]!==c)if(35===z&&/^#(?:[0-9a-f]{3}){1,2}$/.test(v))v=q&2?v:"";else if(48<=z&&57>=z)v=q&1?v:"";else if(A=v.charCodeAt(1),F=v.charCodeAt(2),E=48<=A&&57>=A,I=48<=F&&57>=F,43===z&&(E||46===A&&I))v=q&1?(E?"":"0")+v.substring(1):"";else if(45===z&&(E||46===A&&I))v=q&4?(E?"-":"-0")+v.substring(1):
q&1?"0":"";else if(46===z&&E)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[y].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;J=y;v=1;R=J+1;for(z=H.length;R<z&&v;)S=H[R++],v+=")"===S?-1:/^[^"']*\($/.test(S);if(!v)for(v=H[J].toLowerCase(),z=x(v),H=H.splice(J,R-J,""),J=n.cssFns,R=0,S=J.length;R<S;++R)if(J[R].substring(0,z.length)==z){H[0]=H[H.length-1]="";G(J[R],H,g,l);v=v+H.join(" ")+")";break a}v=""}else v=t&&/^-?[a-z_][\w\-]*$/.test(v)&&!/__$/.test(v)?
N:function(b,c){return b?e(a(b),a(c)).toString():""+c}};return f}();"undefined"!==typeof window&&(window.URI=f);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(z,c)+'")':'url("about:blank")'}function c(a){return A[a]}function d(a,b){return a?f.ha.N(a,b):b}function p(a,b,c){if(!c)return null;var d=(""+a).match(v);return!d||d[1]&&!E.test(d[1])?null:c(a,b)}function x(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
"")}var z=/[\n\f\r\"\'()*<>]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,E=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function G(f,k,g,l,m){f=x(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y<k.length;++y){var v=k[y].toLowerCase(),z=v.charCodeAt(0),A,E,F,I,H,M;if(32===z)v="";else if(34===z)v=16===r?g?a(p(d(l,e(k[y].substring(1,v.length-1))),f,g)):"":
q&8&&!(r&r-1)?v:"";else if("inherit"!==v){if(H=n.cssLitGroup){var J;if(!(J=n.cssLitMap)){J={};for(var R=H.length;0<=--R;)for(var S=H[R],ga=S.length;0<=--ga;)J[S[ga]]=c;J=n.cssLitMap=J}H=J}else H=c;if(M=H,M[x(v)]!==c)if(35===z&&/^#(?:[0-9a-f]{3}){1,2}$/.test(v))v=q&2?v:"";else if(48<=z&&57>=z)v=q&1?v:"";else if(A=v.charCodeAt(1),E=v.charCodeAt(2),F=48<=A&&57>=A,I=48<=E&&57>=E,43===z&&(F||46===A&&I))v=q&1?(F?"":"0")+v.substring(1):"";else if(45===z&&(F||46===A&&I))v=q&4?(F?"-":"-0")+v.substring(1):
q&1?"0":"";else if(46===z&&F)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[y].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;J=y;v=1;R=J+1;for(z=H.length;R<z&&v;)S=H[R++],v+=")"===S?-1:/^[^"']*\($/.test(S);if(!v)for(v=H[J].toLowerCase(),z=x(v),H=H.splice(J,R-J,""),J=n.cssFns,R=0,S=J.length;R<S;++R)if(J[R].substring(0,z.length)==z){H[0]=H[H.length-1]="";G(J[R],H,g,l);v=v+H.join(" ")+")";break a}v=""}else v=t&&/^-?[a-z_][\w\-]*$/.test(v)&&!/__$/.test(v)?
m&&512===t?k[y]+m:1024===t&&b[v]&&"number"===typeof b[v].oa?v:"":/^\w+$/.test(v)&&64===r&&q&8?u+1===C?(k[u]=k[u].substring(0,k[u].length-1)+" "+v+'"',""):(u=C,'"'+v+'"'):""}v&&(k[C++]=v)}1===C&&'url("about:blank")'===k[0]&&(C=0);k.length=C}else k.length=0}}();var H=/^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$/,
E={};E[">"]=E["+"]=E["~"]=E;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c<d&&((r=a[c],"*"===r)?(++c,g=r):/^[a-zA-Z]/.test(r)&&(l=k(r.toLowerCase(),[]))&&("tagName"in l&&(r=l.tagName),++c,g=r));for(p=m=l="";t&&c<d;++c)if(r=a[c],"#"===r.charAt(0))/^#_|__$|[^\w#:\-]/.test(r)?t=!1:l+=r+f;else if("."===r)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(r=a[c])&&!/^_|__$/.test(r)?l+="."+r:t=!1;else if(c+1<d&&"["===a[c]){++c;var G=a[c++].toLowerCase();r=q.m[g+"::"+G];r!==+r&&(r=q.m["*::"+
F={};F[">"]=F["+"]=F["~"]=F;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c<d&&((r=a[c],"*"===r)?(++c,g=r):/^[a-zA-Z]/.test(r)&&(l=k(r.toLowerCase(),[]))&&("tagName"in l&&(r=l.tagName),++c,g=r));for(p=m=l="";t&&c<d;++c)if(r=a[c],"#"===r.charAt(0))/^#_|__$|[^\w#:\-]/.test(r)?t=!1:l+=r+f;else if("."===r)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(r=a[c])&&!/^_|__$/.test(r)?l+="."+r:t=!1;else if(c+1<d&&"["===a[c]){++c;var G=a[c++].toLowerCase();r=q.m[g+"::"+G];r!==+r&&(r=q.m["*::"+
G]);var u;b.ia?(u=b.ia(g,G),"string"!==typeof u&&(t=!1,u=G),t&&r!==+r&&(r=q.d.NONE)):(u=G,r!==+r&&(t=!1));var y=G="",D=!1;/^[~^$*|]?=$/.test(a[c])&&(G=a[c++],y=a[c++],/^[0-9A-Za-z:_\-]+$/.test(y)?y='"'+y+'"':"]"===y&&(y='""',--c),/^"([^\"\\]|\\.)*"$/.test(y)||(t=!1),(D="i"===a[c])&&++c);"]"!==a[c]&&(++c,t=!1);switch(r){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==G&&"~="!==G&&"$="!==G||'""'==y||D?"|="===G||""===G||(t=!1):y='"'+y.substring(1,
y.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==G&&(t=!1);break;default:t=!1}t&&(m+="["+u.replace(/[^\w-]/g,"\\$&")+G+y+(D?" i]":"]"))}else if(c<d&&":"===a[c])if(r=a[++c],H.test(r))p+=":"+r;else break;else break;c!==d&&(t=!1);t&&(c=(g+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+e)&&n.push(c);return t}" "===a[d]&&++d;l-1!==d&&" "===a[l]&&--l;for(var n=[],p=d,r=!0,t=d;r&&t<l;++t){var G=a[t];if(E[G]===E||" "===G)m(p,t,G)?p=t+1:r=!1}m(p,l,"")||(r=!1);return r?(n.length&&(p=n.join(""),null!==
e&&(p="."+e+" "+p),g.push(p)),!0):!c||c(a.slice(d,l))}var e=b.na,f=b.L,k=b.Aa,g=[],l=0,m,n=0,p;for(m=0;m<a.length;++m)(p=a[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==a[m]&&(n||E[a[m-1]]===E||E[a[m+1]]===E))||(a[l++]=a[m]);a.length=l;l=a.length;for(m=n=0;m<l;++m)if(","===a[m]){if(!d(n,m))return null;n=m+1}return d(n,l)?g:null};(function(){var a=/^\w/,b=/^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*))*$/i;
y.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==G&&(t=!1);break;default:t=!1}t&&(m+="["+u.replace(/[^\w-]/g,"\\$&")+G+y+(D?" i]":"]"))}else if(c<d&&":"===a[c])if(r=a[++c],H.test(r))p+=":"+r;else break;else break;c!==d&&(t=!1);t&&(c=(g+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+e)&&n.push(c);return t}" "===a[d]&&++d;l-1!==d&&" "===a[l]&&--l;for(var n=[],p=d,r=!0,t=d;r&&t<l;++t){var G=a[t];if(F[G]===F||" "===G)m(p,t,G)?p=t+1:r=!1}m(p,l,"")||(r=!1);return r?(n.length&&(p=n.join(""),null!==
e&&(p="."+e+" "+p),g.push(p)),!0):!c||c(a.slice(d,l))}var e=b.na,f=b.L,k=b.Aa,g=[],l=0,m,n=0,p;for(m=0;m<a.length;++m)(p=a[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==a[m]&&(n||F[a[m-1]]===F||F[a[m+1]]===F))||(a[l++]=a[m]);a.length=l;l=a.length;for(m=n=0;m<l;++m)if(","===a[m]){if(!d(n,m))return null;n=m+1}return d(n,l)?g:null};(function(){var a=/^\w/,b=/^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*))*$/i;
m=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}c.length=e;c=c.join(" ");return c.length?b.test(c)?a.test(c)?c:"not all , "+c:"not all":""}})();(function(){function a(a){var b=/^\s*[']([^']*)[']\s*$/,c=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,d=/^\s*url\s*[(][']([^']*)['][)]\s*$/,e=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(a))||(f=b.exec(a))||(f=c.exec(a))||(f=d.exec(a))||(f=e.exec(a))?f[1]:null}function b(c,e,f,l,q,r,t){function u(){C=
x.length&&null===x[x.length-1]}var G=void 0,y=t||[0],x=[],C=!1;n(e,{startStylesheet:function(){G=[]},endStylesheet:function(){},startAtrule:function(e,k){if(C)e=null;else if("@media"===e)G.push("@media"," ",m(k));else if("@keyframes"===e||"@-webkit-keyframes"===e){var g=k[0];1!==k.length||/__$|[^\w\-]/.test(g)?e=null:(G.push(e," ",g+f.L),e="@keyframes")}else if("@import"===e&&0<k.length)if(e=null,"function"===typeof r){var n=m(k.slice(1));if("not all"!==n){++y[0];var t=[];G.push(t);var u=p(d(c,a(k[0])),
function(a){var c=b(u,a.qa,f,l,q,r,y);--y[0];a=n?{toString:function(){return"@media "+n+" {"+c.result+"}"}}:c.result;t[0]=a;r(a,!!y[0])},q)}}else window.console&&window.console.log("@import "+k.join(" ")+" elided");C=!e;x.push(e)},endAtrule:function(){x.pop();C||G.push(";");u()},startBlock:function(){C||G.push("{")},endBlock:function(){C||(G.push("}"),C=!0)},startRuleset:function(a){if(!C){var b=void 0;"@keyframes"===x[x.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
@ -81,20 +81,20 @@ li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement
s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};q.ELEMENT_DOM_INTERFACES=q.Q;q.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};q.ueffects=q.P;q.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(a){function b(a,b){var c;if(V.hasOwnProperty(b))c=V[b];else{var d=b.match(X);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(D))?String.fromCharCode(parseInt(d[1],
16)):aa&&W.test(b)?(aa.innerHTML="&"+b+";",d=aa.textContent,V[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(L,"&amp;").replace(T,"&lt;").replace(ba,"&gt;").replace(ca,"&#34;")}function e(a){return a.replace(O,"&amp;$1").replace(T,"&lt;").replace(ba,"&gt;")}function k(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
d=a+"";if(Y)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d<q;){var r=c[d++],t=c[d];switch(r){case "&":M.test(t)?(b.e&&b.e("&"+t,f,Q,g(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,Q,g(b,c,d,e,f));break;case "</":if(k=/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===
t.length&&">"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,Q,g(b,c,d,e,f));else{var u=c,G=d,y=b,x=f,D=Q,C=e,S=n(u,G);S?(y.t&&y.t(S.name,x,D,g(y,u,G,C,x)),d=S.next):d=u.length}else b.e&&b.e("&lt;/",f,Q,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,Q,g(b,c,d,e,f));var ka=a.f[p];ka&Z&&(d=m(c,{name:p,next:d,c:ka},b,f,Q,e))}else{var u=c,G=b,y=f,x=Q,D=e,z=n(u,d);z?(G.w&&G.w(z.name,z.R,y,x,g(G,u,z.next,D,
y)),d=z.c&Z?m(u,z,G,y,x,D):z.next):d=u.length}else b.e&&b.e("&lt;",f,Q,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l<q&&(">"!==c[l]||!/--$/.test(c[l-1]));l++);if(l<q){if(b.A){var v=c.slice(d,l).join("");b.A(v.substr(0,v.length-2),f,Q,g(b,c,l+1,e,f))}d=l+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,Q,g(b,c,d,e,f));break;case "<!":if(/^\w/.test(t)){if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,Q,g(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,Q,g(b,c,d,e,f));break;case "<?":if(!e.r){for(l=
d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,Q,g(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,Q,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,Q,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==Q)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;S.hasOwnProperty(c.name)||(S[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=S[c.name],p=c.next,q=c.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(c.c&a.c.CDATA)d.z&&d.z(m,f,k,g(d,b,
q,l,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(m),f,k,g(d,b,q,l,f));else throw Error("bug");return q}function n(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var k=b[d].substr(e[0].length),g=d+1,l=b.length;g<l&&">"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=P.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g<l;g++){if(n){if(">"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n=
e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(K,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
16)):Q&&W.test(b)?(Q.innerHTML="&"+b+";",d=Q.textContent,V[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(K,"&amp;").replace(T,"&lt;").replace(aa,"&gt;").replace(ba,"&#34;")}function e(a){return a.replace(N,"&amp;$1").replace(T,"&lt;").replace(aa,"&gt;")}function k(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
d=a+"";if(Y)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d<q;){var r=c[d++],t=c[d];switch(r){case "&":L.test(t)?(b.e&&b.e("&"+t,f,P,g(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,P,g(b,c,d,e,f));break;case "</":if(k=/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===
t.length&&">"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,P,g(b,c,d,e,f));else{var u=c,G=d,y=b,x=f,D=P,C=e,S=n(u,G);S?(y.t&&y.t(S.name,x,D,g(y,u,G,C,x)),d=S.next):d=u.length}else b.e&&b.e("&lt;/",f,P,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,P,g(b,c,d,e,f));var ka=a.f[p];ka&Z&&(d=m(c,{name:p,next:d,c:ka},b,f,P,e))}else{var u=c,G=b,y=f,x=P,D=e,z=n(u,d);z?(G.w&&G.w(z.name,z.R,y,x,g(G,u,z.next,D,
y)),d=z.c&Z?m(u,z,G,y,x,D):z.next):d=u.length}else b.e&&b.e("&lt;",f,P,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l<q&&(">"!==c[l]||!/--$/.test(c[l-1]));l++);if(l<q){if(b.A){var v=c.slice(d,l).join("");b.A(v.substr(0,v.length-2),f,P,g(b,c,l+1,e,f))}d=l+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,P,g(b,c,d,e,f));break;case "<!":if(/^\w/.test(t)){if(!e.r){for(l=d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,P,g(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,P,g(b,c,d,e,f));break;case "<?":if(!e.r){for(l=
d+1;l<q&&">"!==c[l];l++);l<q?d=l+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,P,g(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,P,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,P,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==P)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;S.hasOwnProperty(c.name)||(S[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=S[c.name],p=c.next,q=c.next+1;q<m&&("</"!==b[q-1]||!n.test(b[q]));q++);q<m&&--q;m=b.slice(p,q).join("");if(c.c&a.c.CDATA)d.z&&d.z(m,f,k,g(d,b,
q,l,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(m),f,k,g(d,b,q,l,f));else throw Error("bug");return q}function n(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var k=b[d].substr(e[0].length),g=d+1,l=b.length;g<l&&">"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=O.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g<l;g++){if(n){if(">"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n=
e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(ca,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
if("attribs"in m)k=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=a.f[n]):(n=c,m=l);if(l&a.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===c&&(p.v!==n||c!==n)&&g.push("</",p.v,">")}l&a.c.EMPTY||e.push({D:c,v:n});g.push("<",n);c=0;for(p=k.length;c<p;c+=2){var q=k[c],r=k[c+1];null!==r&&void 0!==r&&g.push(" ",q,'="',d(r),'"')}g.push(">");l&a.c.EMPTY&&!(m&a.c.EMPTY)&&g.push("</",n,">")}else f=!(l&a.c.EMPTY)}}},endTag:function(b,c){if(f)f=!1;else if(a.f.hasOwnProperty(b)){var d=
a.f[b];if(!(d&(a.c.EMPTY|a.c.FOLDABLE))){if(d&a.c.OPTIONAL_ENDTAG)for(d=e.length;0<=--d;){var k=e[d].D;if(k===b)break;if(!(a.f[k]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(k=e.length;--k>d;){var g=e[k].v;a.f[g]&a.c.OPTIONAL_ENDTAG||c.push("</",g,">")}d<e.length&&(b=e[d].v);e.length=d;c.push("</",b,">")}}}},pcdata:c,rcdata:c,cdata:c,endDoc:function(a){for(;e.length;e.length--)a.push("</",e[e.length-1].v,">")}})}function q(a,b,c,d,e){if(!e)return null;try{var k=
f.parse(""+a);if(k&&(!k.K()||ga.test(k.W()))){var g=e(k,b,c,d);return g?g.toString():null}}catch(ia){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function G(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function I(b,c,d,e,f){for(var k=0;k<c.length;k+=2){var g=c[k],l=c[k+1],m=l,n=null,p;if((p=
b+"::"+g,a.m.hasOwnProperty(p))||(p="*::"+g,a.m.hasOwnProperty(p)))n=a.m[p];if(null!==n)switch(n){case a.d.NONE:break;case a.d.SCRIPT:l=null;f&&r(f,b,g,m,l);break;case a.d.STYLE:if("undefined"===typeof U){l=null;f&&r(f,b,g,m,l);break}var t=[];U(l,{declaration:function(b,c){var e=b.toLowerCase();R(e,c,d?function(b){return q(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&t.push(e+": "+c.join(" "))}});l=0<t.length?t.join(" ; "):null;f&&r(f,b,g,m,l);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:l=
e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,G(a.J,b,g),G(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function N(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:I(e,f,b,c,d)}}}function J(a,b){var c=[];p(b)(a,
c);return c.join("")}var U,R;"undefined"!==typeof window&&(U=window.parseCssDeclarations,R=window.sanitizeCssProperty);var V={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},X=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,aa="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,K=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,M=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,L=/&/g,O=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T=
/[<]/g,ba=/>/g,ca=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,Q={},S={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=N;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return J(a,N(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=J;ea.Ba=ea.unescapeEntities=c;return ea}(q);
e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,G(a.J,b,g),G(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function M(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:I(e,f,b,c,d)}}}function J(a,b){var c=[];p(b)(a,
c);return c.join("")}var U,R;"undefined"!==typeof window&&(U=window.parseCssDeclarations,R=window.sanitizeCssProperty);var V={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},X=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,Q="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,ca=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,L=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,K=/&/g,N=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T=
/[<]/g,aa=/>/g,ba=/\"/g,O=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,P={},S={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=M;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return J(a,M(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=J;ea.Ba=ea.unescapeEntities=c;return ea}(q);
c=a.sanitize;"undefined"!==typeof window&&(window.html=a,window.html_sanitize=c)})();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
@ -118,76 +118,76 @@ d?(c[g++]=192|d>>>6,c[g++]=128|63&d):65536>d?(c[g++]=224|d>>>12,c[g++]=128|d>>>6
2===g?31:3===g?15:7;1<g&&d<m;)k=k<<6|63&b[d++],g--;1<g?n[f++]=65533:65536>k?n[f++]=k:(k-=65536,n[f++]=55296|k>>10&1023,n[f++]=56320|1023&k)}return e(n,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+l[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){var e=65535&b|0;b=b>>>16&65535|0;for(var f;0!==d;){f=2E3<d?2E3:d;d-=f;do e=e+c[k++]|0,b=b+e|0;while(--f);e%=65521;b%=65521}return e|b<<
16|0}},{}],6:[function(b,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(b,c,d){var e=function(){for(var b,c=[],d=0;256>d;d++){b=d;for(var e=
0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(v.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=0))}
function k(b,c){F._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+O,t=n[k+g-1],G=n[k+g];b.prev_length>=b.good_match&&(f>>=
2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===G&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<r;);if(e=O-(r-k),k=r-O,e>g){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];G=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window,
b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=E(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+
b.insert>=L)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+L-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<L)););}while(b.lookahead<T&&0!==b.strm.avail_in)}function q(b,c){for(var d,e;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=L&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
L-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d)),b.match_length>=L)if(e=F._tr_tally(b,b.strstart-b.match_start,b.match_length-L),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=L){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+L-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=F._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<L-1?b.strstart:L-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:Q):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Y}function r(b,c){for(var d,e,f;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return P;if(0===
b.lookahead)break}if(d=0,b.lookahead>=L&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+L-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=L-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d),5>=b.match_length&&(b.strategy===U||b.match_length===L&&4096<b.strstart-b.match_start)&&(b.match_length=L-1)),b.prev_length>=L&&b.match_length<=b.prev_length){f=
b.strstart+b.lookahead-L;e=F._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-L);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+L-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=L-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=F._tr_tally(b,0,b.window[b.strstart-1]),e&&k(b,!1),
b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(F._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<L-1?b.strstart:L-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:Q):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Y}function t(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function u(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
function k(b,c){E._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+N,t=n[k+g-1],G=n[k+g];b.prev_length>=b.good_match&&(f>>=
2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===G&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<r;);if(e=N-(r-k),k=r-N,e>g){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];G=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window,
b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=F(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+
b.insert>=K)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}while(b.lookahead<T&&0!==b.strm.avail_in)}function q(b,c){for(var d,e;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return O;if(0===b.lookahead)break}if(d=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d)),b.match_length>=K)if(e=E._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=E._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return O}return b.insert=b.strstart<K-1?b.strstart:K-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:P):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?O:Y}function r(b,c){for(var d,e,f;;){if(b.lookahead<T){if(p(b),b.lookahead<T&&c===B)return O;if(0===
b.lookahead)break}if(d=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-T&&(b.match_length=n(b,d),5>=b.match_length&&(b.strategy===U||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=K&&b.match_length<=b.prev_length){f=
b.strstart+b.lookahead-K;e=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=K-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return O}else if(b.match_available){if(e=E._tr_tally(b,0,b.window[b.strstart-1]),e&&k(b,!1),
b.strstart++,b.lookahead--,0===b.strm.avail_out)return O}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(E._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,c===G?(k(b,!0),0===b.strm.avail_out?Z:P):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?O:Y}function t(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function u(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=X;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=
this.ins_h=0;this.dyn_ltree=new v.Buf16(2*da);this.dyn_dtree=new v.Buf16(2*(2*aa+1));this.bl_tree=new v.Buf16(2*(2*K+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new v.Buf16(M+1);this.heap=new v.Buf16(2*W+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*W+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function y(b){var c;
return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ba:ca,b.adler=2===c.wrap?0:1,c.last_flush=B,F._tr_init(c),I):e(b,N)}function x(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
b.prev_length=L-1,b.match_available=0,b.ins_h=0);return c}function z(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===J&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>D||d!==X||8>f||15<f||0>c||9<c||0>g||g>R)return e(b,N);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+L-1)/L),m.window=new v.Buf8(2*m.w_size),m.head=new v.Buf16(m.hash_size),
m.prev=new v.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new v.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,x(b)}var A,v=b("../utils/common"),F=b("./trees"),H=b("./adler32"),E=b("./crc32"),C=b("./messages"),B=0,G=4,I=0,N=-2,J=-1,U=1,R=4,V=2,X=8,D=9,W=286,aa=30,K=19,da=2*W+1,M=15,L=3,O=258,T=O+L+1,ba=42,ca=113,P=1,Y=2,Z=3,Q=4;A=[new t(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===B)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:Q):(b.strstart>b.block_start&&k(b,!1),P)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32,
32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return z(b,c,X,15,8,0)};d.deflateInit2=z;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,I):N};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==G)return e(b,
0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ba)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
8&255)),n.gzhead.hcrc&&(b.adler=E(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ca)):(q=X+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ca,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-
q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=
1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ca)):n.status=ca),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)-
(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==B&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===B){t=P;break a}break}if(n.match_length=0,u=F._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=P;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:Q):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
P:Y)}else if(3===n.strategy)a:{var D,y;for(u=n.window;;){if(n.lookahead<=O){if(p(n),n.lookahead<=O&&c===B){t=P;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=L&&0<n.strstart&&(y=n.strstart-1,D=u[y],D===u[++y]&&D===u[++y]&&D===u[++y])){for(d=n.strstart+O;D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&y<d;);n.match_length=O-(d-y);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=L?(t=F._tr_tally(n,1,n.match_length-
L),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=F._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=P;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:Q):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?P:Y)}else t=A[n.level].func(n,c);if(t!==Z&&t!==Q||(n.status=666),t===P||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Y&&(1===c?F._tr_align(n):5!==c&&(F._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0===
n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==G?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?I:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==ba&&69!==c&&73!==c&&91!==
c&&103!==c&&c!==ca&&666!==c?e(b,N):(b.state=null,c===ca?e(b,-3):I)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==ba||d.lookahead))return N;1===g&&(b.adler=H(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>=
L;){e=d.strstart;k=d.lookahead-(L-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+L-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=L-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=L-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,I};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,m,n,p,q,r,t,u,y,x,z,A,v,F,H,E,C,B,G,I,N,J;d=b.state;e=b.next_in;N=b.input;f=e+(b.avail_in-5);m=b.next_out;J=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);q=d.dmax;r=d.wsize;t=d.whave;u=d.wnext;y=d.window;x=d.hold;z=d.bits;A=d.lencode;v=d.distcode;F=(1<<d.lenbits)-
1;H=(1<<d.distbits)-1;a:do b:for(15>z&&(x+=N[e++]<<z,z+=8,x+=N[e++]<<z,z+=8),E=A[x&F];;){if(C=E>>>24,x>>>=C,z-=C,C=E>>>16&255,0===C)J[m++]=65535&E;else{if(!(16&C)){if(0===(64&C)){E=A[(65535&E)+(x&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}B=65535&E;(C&=15)&&(z<C&&(x+=N[e++]<<z,z+=8),B+=x&(1<<C)-1,x>>>=C,z-=C);15>z&&(x+=N[e++]<<z,z+=8,x+=N[e++]<<z,z+=8);E=v[x&H];c:for(;;){if(C=E>>>24,x>>>=C,z-=C,C=E>>>16&255,!(16&C)){if(0===(64&C)){E=v[(65535&
E)+(x&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&E,C&=15,z<C&&(x+=N[e++]<<z,z+=8,z<C&&(x+=N[e++]<<z,z+=8)),G+=x&(1<<C)-1,G>q){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,z-=C,C=m-n,G>C){if(C=G-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,I=y,0===u){if(E+=r-C,C<B){B-=C;do J[m++]=y[E++];while(--C);E=m-G;I=J}}else if(u<C){if(E+=r+u-C,C-=u,C<B){B-=C;do J[m++]=y[E++];while(--C);if(E=0,u<B){C=u;B-=C;do J[m++]=y[E++];
while(--C);E=m-G;I=J}}}else if(E+=u-C,C<B){B-=C;do J[m++]=y[E++];while(--C);E=m-G;I=J}for(;2<B;)J[m++]=I[E++],J[m++]=I[E++],J[m++]=I[E++],B-=3;B&&(J[m++]=I[E++],1<B&&(J[m++]=I[E++]))}else{E=m-G;do J[m++]=J[E++],J[m++]=J[E++],J[m++]=J[E++],B-=3;while(2<B);B&&(J[m++]=J[E++],1<B&&(J[m++]=J[E++]))}break}}break}while(e<f&&m<p);B=z>>3;e-=B;z-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=x&(1<<z)-1;d.bits=z}},{}],11:[function(b,c,d){function e(b){return(b>>>
this.ins_h=0;this.dyn_ltree=new v.Buf16(2*da);this.dyn_dtree=new v.Buf16(2*(2*Q+1));this.bl_tree=new v.Buf16(2*(2*ca+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new v.Buf16(L+1);this.heap=new v.Buf16(2*W+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*W+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function y(b){var c;
return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?aa:ba,b.adler=2===c.wrap?0:1,c.last_flush=B,E._tr_init(c),I):e(b,M)}function x(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
b.prev_length=K-1,b.match_available=0,b.ins_h=0);return c}function z(b,c,d,f,k,g){if(!b)return M;var l=1;if(c===J&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>D||d!==X||8>f||15<f||0>c||9<c||0>g||g>R)return e(b,M);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+K-1)/K),m.window=new v.Buf8(2*m.w_size),m.head=new v.Buf16(m.hash_size),
m.prev=new v.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new v.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,x(b)}var A,v=b("../utils/common"),E=b("./trees"),H=b("./adler32"),F=b("./crc32"),C=b("./messages"),B=0,G=4,I=0,M=-2,J=-1,U=1,R=4,V=2,X=8,D=9,W=286,Q=30,ca=19,da=2*W+1,L=15,K=3,N=258,T=N+K+1,aa=42,ba=113,O=1,Y=2,Z=3,P=4;A=[new t(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===B)return O;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return O}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:P):(b.strstart>b.block_start&&k(b,!1),O)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32,
32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return z(b,c,X,15,8,0)};d.deflateInit2=z;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?M:(b.state.gzhead=c,I):M};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5<c||0>c)return b?e(b,M):M;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==G)return e(b,
0===b.avail_out?-5:M);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===aa)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>>
8&255)),n.gzhead.hcrc&&(b.adler=F(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(q=X+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ba,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-
q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=
1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)-
(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==B&&666!==n.status){var t;if(2===n.strategy)a:{for(var u;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===B){t=O;break a}break}if(n.match_length=0,u=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,u&&(k(n,!1),0===n.strm.avail_out)){t=O;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:P):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
O:Y)}else if(3===n.strategy)a:{var D,y;for(u=n.window;;){if(n.lookahead<=N){if(p(n),n.lookahead<=N&&c===B){t=O;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=K&&0<n.strstart&&(y=n.strstart-1,D=u[y],D===u[++y]&&D===u[++y]&&D===u[++y])){for(d=n.strstart+N;D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&D===u[++y]&&y<d;);n.match_length=N-(d-y);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=K?(t=E._tr_tally(n,1,n.match_length-
K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=O;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:P):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?O:Y)}else t=A[n.level].func(n,c);if(t!==Z&&t!==P||(n.status=666),t===O||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Y&&(1===c?E._tr_align(n):5!==c&&(E._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0===
n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==G?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?I:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==aa&&69!==c&&73!==c&&91!==
c&&103!==c&&c!==ba&&666!==c?e(b,M):(b.state=null,c===ba?e(b,-3):I)):M};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==aa||d.lookahead))return M;1===g&&(b.adler=H(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>=
K;){e=d.strstart;k=d.lookahead-(K-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+K-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=K-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=K-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,I};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,m,n,p,q,r,t,u,y,x,z,A,v,E,H,F,C,B,G,I,M,J;d=b.state;e=b.next_in;M=b.input;f=e+(b.avail_in-5);m=b.next_out;J=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);q=d.dmax;r=d.wsize;t=d.whave;u=d.wnext;y=d.window;x=d.hold;z=d.bits;A=d.lencode;v=d.distcode;E=(1<<d.lenbits)-
1;H=(1<<d.distbits)-1;a:do b:for(15>z&&(x+=M[e++]<<z,z+=8,x+=M[e++]<<z,z+=8),F=A[x&E];;){if(C=F>>>24,x>>>=C,z-=C,C=F>>>16&255,0===C)J[m++]=65535&F;else{if(!(16&C)){if(0===(64&C)){F=A[(65535&F)+(x&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}B=65535&F;(C&=15)&&(z<C&&(x+=M[e++]<<z,z+=8),B+=x&(1<<C)-1,x>>>=C,z-=C);15>z&&(x+=M[e++]<<z,z+=8,x+=M[e++]<<z,z+=8);F=v[x&H];c:for(;;){if(C=F>>>24,x>>>=C,z-=C,C=F>>>16&255,!(16&C)){if(0===(64&C)){F=v[(65535&
F)+(x&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&F,C&=15,z<C&&(x+=M[e++]<<z,z+=8,z<C&&(x+=M[e++]<<z,z+=8)),G+=x&(1<<C)-1,G>q){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,z-=C,C=m-n,G>C){if(C=G-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(F=0,I=y,0===u){if(F+=r-C,C<B){B-=C;do J[m++]=y[F++];while(--C);F=m-G;I=J}}else if(u<C){if(F+=r+u-C,C-=u,C<B){B-=C;do J[m++]=y[F++];while(--C);if(F=0,u<B){C=u;B-=C;do J[m++]=y[F++];
while(--C);F=m-G;I=J}}}else if(F+=u-C,C<B){B-=C;do J[m++]=y[F++];while(--C);F=m-G;I=J}for(;2<B;)J[m++]=I[F++],J[m++]=I[F++],J[m++]=I[F++],B-=3;B&&(J[m++]=I[F++],1<B&&(J[m++]=I[F++]))}else{F=m-G;do J[m++]=J[F++],J[m++]=J[F++],J[m++]=J[F++],B-=3;while(2<B);B&&(J[m++]=J[F++],1<B&&(J[m++]=J[F++]))}break}}break}while(e<f&&m<p);B=z>>3;e-=B;z-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=x&(1<<z)-1;d.bits=z}},{}],11:[function(b,c,d){function e(b){return(b>>>
24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.distdyn=this.lendyn=null;this.was=
this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=v,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(F),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,z):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=v,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(E),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,z):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
c)?A:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):A}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==z&&(b.state=null),d):A}function n(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new r.Buf8(b.wsize)),e>=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext=
e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,q,r=b("../utils/common"),t=b("./adler32"),u=b("./crc32"),y=b("./inffast"),x=b("./inftrees"),z=0,A=-2,v=1,F=852,H=592,E=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,C,B,D,W,F,K,H,M,L,O,T,ba,ca,P,Y,Z,Q=0,S=new r.Buf8(4),ga=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
!b.output||!b.input&&0!==b.avail_in)return A;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;W=m;F=C;Y=z;a:for(;;)switch(d.mode){case v:if(0===d.wrap){d.mode=13;break}for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(2&d.wrap&&35615===B){d.check=0;S[0]=255&B;S[1]=B>>>8&255;d.check=u(d.check,S,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check";
d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,P=(15&B)+8,0===d.wbits)d.wbits=P;else if(P>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<P;b.adler=d.check=1;d.mode=512&B?10:12;D=B=0;break;case 2:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.flags=B,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";d.mode=30;break}d.head&&(d.head.text=B>>8&1);512&d.flags&&
e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,q,r=b("../utils/common"),t=b("./adler32"),u=b("./crc32"),y=b("./inffast"),x=b("./inftrees"),z=0,A=-2,v=1,E=852,H=592,F=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,C,B,D,W,Q,E,H,L,K,N,T,aa,ba,O,Y,Z,P=0,S=new r.Buf8(4),ga=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
!b.output||!b.input&&0!==b.avail_in)return A;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;W=m;Q=C;Y=z;a:for(;;)switch(d.mode){case v:if(0===d.wrap){d.mode=13;break}for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(2&d.wrap&&35615===B){d.check=0;S[0]=255&B;S[1]=B>>>8&255;d.check=u(d.check,S,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check";
d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,O=(15&B)+8,0===d.wbits)d.wbits=O;else if(O>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<O;b.adler=d.check=1;d.mode=512&B?10:12;D=B=0;break;case 2:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.flags=B,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";d.mode=30;break}d.head&&(d.head.text=B>>8&1);512&d.flags&&
(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0;d.mode=3;case 3:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.head&&(d.head.time=B);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,S[2]=B>>>16&255,S[3]=B>>>24&255,d.check=u(d.check,S,4,0));D=B=0;d.mode=4;case 4:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.head&&(d.head.xflags=255&B,d.head.os=B>>8);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0;d.mode=5;case 5:if(1024&d.flags){for(;16>D;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}d.length=B;d.head&&(d.head.extra_len=B);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(K=d.length,K>m&&(K=m),K&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,K,P)),512&d.flags&&(d.check=u(d.check,f,K,g)),m-=K,g+=K,d.length-=K),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;K=0;do P=f[g+
K++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&K<m);if(512&d.flags&&(d.check=u(d.check,f,K,g)),m-=K,g+=K,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;K=0;do P=f[g+K++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&K<m);if(512&d.flags&&(d.check=u(d.check,f,K,g)),m-=K,g+=K,P)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>D;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}d.length=B;d.head&&(d.head.extra_len=B);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(E=d.length,E>m&&(E=m),E&&(d.head&&(O=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,E,O)),512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,d.length-=E),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;E=0;do O=f[g+
E++],d.head&&O&&65536>d.length&&(d.head.name+=String.fromCharCode(O));while(O&&E<m);if(512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,O)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;E=0;do O=f[g+E++],d.head&&O&&65536>d.length&&(d.head.comment+=String.fromCharCode(O));while(O&&E<m);if(512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,O)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>D;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}if(B!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}D=B=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}b.adler=d.check=e(B);D=B=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){B>>>=7&D;D-=7&D;d.mode=27;break}for(;3>D;){if(0===
m)break a;m--;B+=f[g++]<<D;D+=8}switch(d.last=1&B,B>>>=1,--D,3&B){case 0:d.mode=14;break;case 1:O=d;if(E){p=new r.Buf32(512);q=new r.Buf32(32);for(M=0;144>M;)O.lens[M++]=8;for(;256>M;)O.lens[M++]=9;for(;280>M;)O.lens[M++]=7;for(;288>M;)O.lens[M++]=8;x(1,O.lens,0,288,p,0,O.work,{bits:9});for(M=0;32>M;)O.lens[M++]=5;x(2,O.lens,0,32,q,0,O.work,{bits:5});E=!1}O.lencode=p;O.lenbits=9;O.distcode=q;O.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if((65535&B)!==(B>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(K=d.length){if(K>m&&(K=m),K>C&&(K=C),0===K)break a;r.arraySet(k,f,g,K,l);m-=K;g+=K;C-=K;l+=K;d.length-=K;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.nlen=(31&B)+257,B>>>=5,D-=5,d.ndist=(31&B)+
m)break a;m--;B+=f[g++]<<D;D+=8}switch(d.last=1&B,B>>>=1,--D,3&B){case 0:d.mode=14;break;case 1:N=d;if(F){p=new r.Buf32(512);q=new r.Buf32(32);for(L=0;144>L;)N.lens[L++]=8;for(;256>L;)N.lens[L++]=9;for(;280>L;)N.lens[L++]=7;for(;288>L;)N.lens[L++]=8;x(1,N.lens,0,288,p,0,N.work,{bits:9});for(L=0;32>L;)N.lens[L++]=5;x(2,N.lens,0,32,q,0,N.work,{bits:5});F=!1}N.lencode=p;N.lenbits=9;N.distcode=q;N.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if((65535&B)!==(B>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(E=d.length){if(E>m&&(E=m),E>C&&(E=C),0===E)break a;r.arraySet(k,f,g,E,l);m-=E;g+=E;C-=E;l+=E;d.length-=E;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(d.nlen=(31&B)+257,B>>>=5,D-=5,d.ndist=(31&B)+
1,B>>>=5,D-=5,d.ncode=(15&B)+4,B>>>=4,D-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.lens[ga[d.have++]]=7&B;B>>>=3;D-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},Y=x(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
d.nlen+d.ndist;){for(;Q=d.lencode[B&(1<<d.lenbits)-1],L=Q>>>24,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(16>O)B>>>=L,D-=L,d.lens[d.have++]=O;else{if(16===O){for(M=L+2;D<M;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B>>>=L,D-=L,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];K=3+(3&B);B>>>=2;D-=2}else if(17===O){for(M=L+3;D<M;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=L;D-=L;P=0;K=3+(7&B);B>>>=3;D-=3}else{for(M=L+7;D<M;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}B>>>=L;D-=L;P=0;K=11+(127&B);B>>>=7;D-=7}if(d.have+K>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;K--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},Y=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},Y=x(2,d.lens,d.nlen,d.ndist,
d.distcode,0,d.work,Z),d.distbits=Z.bits,Y){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,F);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;Q=d.lencode[B&(1<<d.lenbits)-1],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(M&&0===(240&M)){T=
L;ba=M;for(ca=O;Q=d.lencode[ca+((B&(1<<T+ba)-1)>>T)],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(T+L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=T;D-=T;d.back+=T}if(B>>>=L,D-=L,d.back+=L,d.length=O,0===M){d.mode=26;break}if(32&M){d.back=-1;d.mode=12;break}if(64&M){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&M;d.mode=22;case 22:if(d.extra){for(M=d.extra;D<M;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.length+=B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
23;case 23:for(;Q=d.distcode[B&(1<<d.distbits)-1],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(0===(240&M)){T=L;ba=M;for(ca=O;Q=d.distcode[ca+((B&(1<<T+ba)-1)>>T)],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(T+L<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=T;D-=T;d.back+=T}if(B>>>=L,D-=L,d.back+=L,64&M){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&M;d.mode=24;case 24:if(d.extra){for(M=d.extra;D<M;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.offset+=
B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(K=F-C,d.offset>K){if(K=d.offset-K,K>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}K>d.wnext?(K-=d.wnext,H=d.wsize-K):H=d.wnext-K;K>d.length&&(K=d.length);M=d.window}else M=k,H=l-d.offset,K=d.length;K>C&&(K=C);C-=K;d.length-=K;do k[l++]=M[H++];while(--K);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<<D;D+=8}if(F-=C,b.total_out+=F,d.total+=F,F&&(b.adler=d.check=d.flags?u(d.check,k,F,l-F):t(d.check,k,F,l-F)),F=C,(d.flags?B:e(B))!==d.check){b.msg="incorrect data check";d.mode=30;break}D=B=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}D=B=0}d.mode=29;case 29:Y=1;break a;case 30:Y=
-3;break a;case 31:return-4;default:return A}return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,(d.wsize||F!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,F-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,F-=b.avail_out,b.total_in+=W,b.total_out+=F,d.total+=F,d.wrap&&F&&(b.adler=d.check=d.flags?u(d.check,k,F,b.next_out-F):t(d.check,k,F,b.next_out-F)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&0===F||4===
d.nlen+d.ndist;){for(;P=d.lencode[B&(1<<d.lenbits)-1],K=P>>>24,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(16>N)B>>>=K,D-=K,d.lens[d.have++]=N;else{if(16===N){for(L=K+2;D<L;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B>>>=K,D-=K,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}O=d.lens[d.have-1];E=3+(3&B);B>>>=2;D-=2}else if(17===N){for(L=K+3;D<L;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=K;D-=K;O=0;E=3+(7&B);B>>>=3;D-=3}else{for(L=K+7;D<L;){if(0===m)break a;m--;
B+=f[g++]<<D;D+=8}B>>>=K;D-=K;O=0;E=11+(127&B);B>>>=7;D-=7}if(d.have+E>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;E--;)d.lens[d.have++]=O}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},Y=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},Y=x(2,d.lens,d.nlen,d.ndist,
d.distcode,0,d.work,Z),d.distbits=Z.bits,Y){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,Q);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;P=d.lencode[B&(1<<d.lenbits)-1],K=P>>>24,L=P>>>16&255,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(L&&0===(240&L)){T=
K;aa=L;for(ba=N;P=d.lencode[ba+((B&(1<<T+aa)-1)>>T)],K=P>>>24,L=P>>>16&255,N=65535&P,!(T+K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=T;D-=T;d.back+=T}if(B>>>=K,D-=K,d.back+=K,d.length=N,0===L){d.mode=26;break}if(32&L){d.back=-1;d.mode=12;break}if(64&L){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&L;d.mode=22;case 22:if(d.extra){for(L=d.extra;D<L;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.length+=B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
23;case 23:for(;P=d.distcode[B&(1<<d.distbits)-1],K=P>>>24,L=P>>>16&255,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(0===(240&L)){T=K;aa=L;for(ba=N;P=d.distcode[ba+((B&(1<<T+aa)-1)>>T)],K=P>>>24,L=P>>>16&255,N=65535&P,!(T+K<=D);){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}B>>>=T;D-=T;d.back+=T}if(B>>>=K,D-=K,d.back+=K,64&L){b.msg="invalid distance code";d.mode=30;break}d.offset=N;d.extra=15&L;d.mode=24;case 24:if(d.extra){for(L=d.extra;D<L;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}d.offset+=
B&(1<<d.extra)-1;B>>>=d.extra;D-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(E=Q-C,d.offset>E){if(E=d.offset-E,E>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}E>d.wnext?(E-=d.wnext,H=d.wsize-E):H=d.wnext-E;E>d.length&&(E=d.length);L=d.window}else L=k,H=l-d.offset,E=d.length;E>C&&(E=C);C-=E;d.length-=E;do k[l++]=L[H++];while(--E);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<<D;D+=8}if(Q-=C,b.total_out+=Q,d.total+=Q,Q&&(b.adler=d.check=d.flags?u(d.check,k,Q,l-Q):t(d.check,k,Q,l-Q)),Q=C,(d.flags?B:e(B))!==d.check){b.msg="incorrect data check";d.mode=30;break}D=B=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>D;){if(0===m)break a;m--;B+=f[g++]<<D;D+=8}if(B!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}D=B=0}d.mode=29;case 29:Y=1;break a;case 30:Y=
-3;break a;case 31:return-4;default:return A}return b.next_out=l,b.avail_out=C,b.next_in=g,b.avail_in=m,d.hold=B,d.bits=D,(d.wsize||Q!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,Q-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,Q-=b.avail_out,b.total_in+=W,b.total_out+=Q,d.total+=Q,d.wrap&&Q&&(b.adler=d.check=d.flags?u(d.check,k,Q,b.next_out-Q):t(d.check,k,Q,b.next_out-Q)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&0===Q||4===
c)&&Y===z&&(Y=-5),Y)};d.inflateEnd=function(b){if(!b||!b.state)return A;var c=b.state;return c.window&&(c.window=null),b.state=null,z};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?A:(d.head=c,c.done=!1,z)):A};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?A:11===d.mode&&(e=1,e=t(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,z)):A};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,q,r,t,u,y){var m,n,p,v,F,H,E,C,B=y.bits,G,I,N,J,U,R,V=0,X,D=null,W=0,aa=new e.Buf16(16);v=new e.Buf16(16);var K=null,da=0;for(G=0;15>=G;G++)aa[G]=0;for(I=0;I<q;I++)aa[c[d+I]]++;J=B;for(N=15;1<=N&&0===aa[N];N--);if(J>N&&(J=N),0===N)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B<N&&0===aa[B];B++);J<B&&(J=B);for(G=m=1;15>=G;G++)if(m<<=1,m-=aa[G],0>m)return-1;if(0<m&&(0===b||1!==N))return-1;v[1]=0;for(G=1;15>G;G++)v[G+1]=v[G]+
aa[G];for(I=0;I<q;I++)0!==c[d+I]&&(u[v[c[d+I]]++]=I);if(0===b?(D=K=u,F=19):1===b?(D=f,W-=257,K=g,da-=257,F=256):(D=k,K=l,F=-1),X=0,I=0,G=B,v=t,U=J,R=0,p=-1,V=1<<J,q=V-1,1===b&&852<V||2===b&&592<V)return 1;for(var M=0;;){M++;H=G-R;u[I]<F?(E=0,C=u[I]):u[I]>F?(E=K[da+u[I]],C=D[W+u[I]]):(E=96,C=0);m=1<<G-R;B=n=1<<U;do n-=m,r[v+(X>>R)+n]=H<<24|E<<16|C|0;while(0!==n);for(m=1<<G-1;X&m;)m>>=1;if(0!==m?(X&=m-1,X+=m):X=0,I++,0===--aa[G]){if(G===N)break;G=c[d+u[I]]}if(G>J&&(X&q)!==p){0===R&&(R=J);v+=B;U=G-R;
for(m=1<<U;U+R<N&&(m-=aa[U+R],!(0>=m));)U++,m<<=1;if(V+=1<<U,1===b&&852<V||2===b&&592<V)return 1;p=X&q;r[p]=J<<24|U<<16|v-t|0}}return 0!==X&&(r[v+X]=G-R<<24|4194304),y.bits=J,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,q,r,t,u,y){var m,n,p,v,E,H,F,C,B=y.bits,G,I,M,J,U,R,V=0,X,D=null,W=0,Q=new e.Buf16(16);v=new e.Buf16(16);var ca=null,da=0;for(G=0;15>=G;G++)Q[G]=0;for(I=0;I<q;I++)Q[c[d+I]]++;J=B;for(M=15;1<=M&&0===Q[M];M--);if(J>M&&(J=M),0===M)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B<M&&0===Q[B];B++);J<B&&(J=B);for(G=m=1;15>=G;G++)if(m<<=1,m-=Q[G],0>m)return-1;if(0<m&&(0===b||1!==M))return-1;v[1]=0;for(G=1;15>G;G++)v[G+1]=v[G]+Q[G];
for(I=0;I<q;I++)0!==c[d+I]&&(u[v[c[d+I]]++]=I);if(0===b?(D=ca=u,E=19):1===b?(D=f,W-=257,ca=g,da-=257,E=256):(D=k,ca=l,E=-1),X=0,I=0,G=B,v=t,U=J,R=0,p=-1,V=1<<J,q=V-1,1===b&&852<V||2===b&&592<V)return 1;for(var L=0;;){L++;H=G-R;u[I]<E?(F=0,C=u[I]):u[I]>E?(F=ca[da+u[I]],C=D[W+u[I]]):(F=96,C=0);m=1<<G-R;B=n=1<<U;do n-=m,r[v+(X>>R)+n]=H<<24|F<<16|C|0;while(0!==n);for(m=1<<G-1;X&m;)m>>=1;if(0!==m?(X&=m-1,X+=m):X=0,I++,0===--Q[G]){if(G===M)break;G=c[d+u[I]]}if(G>J&&(X&q)!==p){0===R&&(R=J);v+=B;U=G-R;for(m=
1<<U;U+R<M&&(m-=Q[U+R],!(0>=m));)U++,m<<=1;if(V+=1<<U,1===b&&852<V||2===b&&592<V)return 1;p=X&q;r[p]=J<<24|U<<16|v-t|0}}return 0!==X&&(r[v+X]=G-R<<24|4194304),y.bits=J,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>V-d?(b.bi_buf|=c<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=c>>V-b.bi_valid,b.bi_valid+=d-V):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function m(b,c,d){l(b,d[2*c],d[2*c+1])}function n(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;while(0<
--c);return d>>>1}function p(b,c,d){var e,f=Array(R+1),k=0;for(e=1;e<=R;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;c<I;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<J;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*X]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function t(b,c,d,e){var f=2*c,k=2*d;return b[f]<
b[k]||b[f]===b[k]&&e[c]<=e[d]}function u(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&t(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!t(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function y(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=ca[f],m(b,k+G+1,c),g=K[k],0!==g&&(f-=P[k],l(b,f,g)),e--,k=256>e?ba[e]:ba[256+(e>>>7)],m(b,k,d),g=da[k],0!==g&&(e-=Y[k],l(b,
e,g)));while(n<b.last_lit)}m(b,X,c)}function x(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],b.heap[--b.heap_max]=
--c);return d>>>1}function p(b,c,d){var e,f=Array(R+1),k=0;for(e=1;e<=R;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;c<I;c++)b.dyn_ltree[2*c]=0;for(c=0;c<M;c++)b.dyn_dtree[2*c]=0;for(c=0;c<J;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*X]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function t(b,c,d,e){var f=2*c,k=2*d;return b[f]<
b[k]||b[f]===b[k]&&e[c]<=e[d]}function u(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&t(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!t(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function y(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=ba[f],m(b,k+G+1,c),g=ca[k],0!==g&&(f-=O[k],l(b,f,g)),e--,k=256>e?aa[e]:aa[256+(e>>>7)],m(b,k,d),g=da[k],0!==g&&(e-=Y[k],
l(b,e,g)));while(n<b.last_lit)}m(b,X,c)}function x(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],b.heap[--b.heap_max]=
d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,u(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,g=c.dyn_tree,l=c.max_code,r=c.stat_desc.static_tree,t=c.stat_desc.has_stree,D=c.stat_desc.extra_bits,y=c.stat_desc.extra_base,x=c.stat_desc.max_length,B=0;for(e=0;e<=R;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<U;d++)f=b.heap[d],e=g[2*g[2*f+1]+1]+1,e>x&&(e=x,B++),g[2*
f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=y&&(n=D[f-y]),q=g[2*f],b.opt_len+=q*(e+n),t&&(b.static_len+=q*(r[2*f+1]+n)));if(0!==B){do{for(e=x-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[x]--;B-=2}while(0<B);for(e=x;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function z(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,g=c[2*(e+1)+1],++l<m&&
f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*D]++):10>=l?b.bl_tree[2*W]++:b.bl_tree[2*aa]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,D,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,aa,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138,
q=3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return C;return E}function F(b,c,d,e){l(b,(B<<1)+(e?1:0),3);r(b);k(b,d);k(b,~d);H.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var H=b("../utils/common"),E=0,C=1,B=0,G=256,I=G+1+29,N=30,J=19,U=2*I+1,R=15,V=16,X=256,D=16,W=17,aa=18,K=[0,0,0,0,0,
0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],da=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=Array(2*(I+2));e(O);var T=Array(2*N);e(T);var ba=Array(512);e(ba);var ca=Array(256);e(ca);var P=Array(29);e(P);var Y=Array(N);e(Y);var Z,Q,S,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(R+1);for(e=d=0;28>e;e++)for(P[e]=d,c=0;c<1<<K[e];c++)ca[d++]=e;ca[d-1]=e;for(e=d=0;16>e;e++)for(Y[e]=
d,c=0;c<1<<da[e];c++)ba[d++]=e;for(d>>=7;e<N;e++)for(Y[e]=d<<7,c=0;c<1<<da[e]-7;c++)ba[256+d++]=e;for(c=0;c<=R;c++)k[c]=0;for(c=0;143>=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,I+1,k);for(c=0;c<N;c++)T[2*c+1]=5,T[2*c]=n(c,5);Z=new f(O,K,G+1,I,R);Q=new f(T,da,0,N,R);S=new f([],M,0,J,7);ga=!0}b.l_desc=new g(b.dyn_ltree,Z);b.d_desc=new g(b.dyn_dtree,Q);b.bl_desc=new g(b.bl_tree,S);b.bi_buf=0;b.bi_valid=0;q(b)};
d._tr_stored_block=F;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=v(b));x(b,b.l_desc);x(b,b.d_desc);z(b,b.dyn_ltree,b.l_desc.max_code);z(b,b.dyn_dtree,b.d_desc.max_code);x(b,b.bl_desc);for(g=J-1;3<=g&&0===b.bl_tree[2*L[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)F(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,O,T);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+
1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*L[f]+1],3);A(b,b.dyn_ltree,c-1);A(b,b.dyn_dtree,d-1);y(b,b.dyn_ltree,b.dyn_dtree)}q(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ca[d]+G+1)]++,b.dyn_dtree[2*(256>c?ba[c]:ba[256+(c>>>7)])]++),b.last_lit===
b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,X,O);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign;
f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*D]++):10>=l?b.bl_tree[2*W]++:b.bl_tree[2*Q]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<q){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,D,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,Q,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138,q=
3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return F;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return C;return F}function E(b,c,d,e){l(b,(B<<1)+(e?1:0),3);r(b);k(b,d);k(b,~d);H.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var H=b("../utils/common"),F=0,C=1,B=0,G=256,I=G+1+29,M=30,J=19,U=2*I+1,R=15,V=16,X=256,D=16,W=17,Q=18,ca=[0,0,0,0,0,0,
0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],da=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=Array(2*(I+2));e(N);var T=Array(2*M);e(T);var aa=Array(512);e(aa);var ba=Array(256);e(ba);var O=Array(29);e(O);var Y=Array(M);e(Y);var Z,P,S,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(R+1);for(e=d=0;28>e;e++)for(O[e]=d,c=0;c<1<<ca[e];c++)ba[d++]=e;ba[d-1]=e;for(e=d=0;16>e;e++)for(Y[e]=
d,c=0;c<1<<da[e];c++)aa[d++]=e;for(d>>=7;e<M;e++)for(Y[e]=d<<7,c=0;c<1<<da[e]-7;c++)aa[256+d++]=e;for(c=0;c<=R;c++)k[c]=0;for(c=0;143>=c;)N[2*c+1]=8,c++,k[8]++;for(;255>=c;)N[2*c+1]=9,c++,k[9]++;for(;279>=c;)N[2*c+1]=7,c++,k[7]++;for(;287>=c;)N[2*c+1]=8,c++,k[8]++;p(N,I+1,k);for(c=0;c<M;c++)T[2*c+1]=5,T[2*c]=n(c,5);Z=new f(N,ca,G+1,I,R);P=new f(T,da,0,M,R);S=new f([],L,0,J,7);ga=!0}b.l_desc=new g(b.dyn_ltree,Z);b.d_desc=new g(b.dyn_dtree,P);b.bl_desc=new g(b.bl_tree,S);b.bi_buf=0;b.bi_valid=0;q(b)};
d._tr_stored_block=E;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=v(b));x(b,b.l_desc);x(b,b.d_desc);z(b,b.dyn_ltree,b.l_desc.max_code);z(b,b.dyn_dtree,b.d_desc.max_code);x(b,b.bl_desc);for(g=J-1;3<=g&&0===b.bl_tree[2*K[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)E(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,N,T);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+
1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*K[f]+1],3);A(b,b.dyn_ltree,c-1);A(b,b.dyn_dtree,d-1);y(b,b.dyn_ltree,b.dyn_dtree)}q(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ba[d]+G+1)]++,b.dyn_dtree[2*(256>c?aa[c]:aa[256+(c>>>7)])]++),b.last_lit===
b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,X,N);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign;
var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";
window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
@ -527,9 +527,9 @@ mxConstants.ALIGN_CENTER?l-=c/2:e==mxConstants.ALIGN_RIGHT&&(l-=c);a+=l;f==mxCon
n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==l){var t="vertical-align:top;";n?t+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?t+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(t+="width:"+Math.round(c+1)+"px;",0<d&&(t+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var t=k&&0<c?t+("width:"+
Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):t+"white-space:nowrap;",u=this.createElement("g");1>r.alpha&&u.setAttribute("opacity",r.alpha);var y=this.createElement("foreignObject");y.setAttribute("style","overflow:visible;");y.setAttribute("pointer-events","all");t=this.createDiv(e,f,g,t,m);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(y);this.root.appendChild(u);var x,z;q=x=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
document?(t.style.visibility="hidden",document.body.appendChild(t)):y.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==y&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(F=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<
A.offsetWidth&&(t.style.whiteSpace=F));x=v+x-1;k&&"fill"!=m&&"width"!=m&&(n&&(x=Math.min(x,c)),t.style.width=x+"px");x=A.offsetWidth;z=A.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=x,u.mxCachedFinalOffsetHeight=z);z-=q;t.parentNode!=y&&(y.appendChild(t),t.style.visibility="")}else{A=document.createElement("div");A.style.cssText=t.getAttribute("style");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.position="absolute";A.style.visibility="hidden";z=document.createElement("div");
z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;A.appendChild(z);document.body.appendChild(A);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(x+=2,q+=2);if(k&&0<c){var v=z.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var F=A.style.whiteSpace;z.style.whiteSpace="nowrap";v<z.offsetWidth&&(A.style.whiteSpace=F)}n&&(v=Math.min(v,c));A.style.width=v+"px";
document?(t.style.visibility="hidden",document.body.appendChild(t)):y.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==y&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m&&(E=t.style.whiteSpace,t.style.whiteSpace="nowrap",v<
A.offsetWidth&&(t.style.whiteSpace=E));x=v+x-1;k&&"fill"!=m&&"width"!=m&&(n&&(x=Math.min(x,c)),t.style.width=x+"px");x=A.offsetWidth;z=A.offsetHeight;this.cacheOffsetSize&&(u.mxCachedFinalOffsetWidth=x,u.mxCachedFinalOffsetHeight=z);z-=q;t.parentNode!=y&&(y.appendChild(t),t.style.visibility="")}else{A=document.createElement("div");A.style.cssText=t.getAttribute("style");A.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";A.style.position="absolute";A.style.visibility="hidden";z=document.createElement("div");
z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;A.appendChild(z);document.body.appendChild(A);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(x+=2,q+=2);if(k&&0<c){var v=z.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var E=A.style.whiteSpace;z.style.whiteSpace="nowrap";v<z.offsetWidth&&(A.style.whiteSpace=E)}n&&(v=Math.min(v,c));A.style.width=v+"px";
x=z.offsetWidth+x+0;z=z.offsetHeight+q;A.style.display="inline-block";A.style.position="";A.style.visibility="";A.style.width=x+"px";t.setAttribute("style",A.style.cssText)}else x=z.offsetWidth+x,z=z.offsetHeight+q;A.parentNode.removeChild(A);y.appendChild(t)}n&&(z=Math.min(z,d),x=Math.min(x,c));"width"==m?d=z:"fill"!=m&&(c=x,d=z);1>r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&&
(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;A=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(A+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=p&&(A+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+A);y.setAttribute("width",
Math.round(Math.max(1,c)));y.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(y,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(y.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(y),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
@ -577,9 +577,9 @@ mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p,q){k=this.sta
g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=Math.PI/180*p,e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-E)<x?(l=b-a.getCenterY(),x=Math.abs(b-E),c=!0):Math.abs(b-F)<x?(l=b-a.y,x=Math.abs(b-F),c=!0):Math.abs(b-H)<x&&(l=b-a.y-a.height,x=Math.abs(b-H),c=!0);c&&(r=C,t=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-F)<x?(l=b-a.getCenterY(),x=Math.abs(b-F),c=!0):Math.abs(b-E)<x?(l=b-a.y,x=Math.abs(b-E),c=!0):Math.abs(b-H)<x&&(l=b-a.y-a.height,x=Math.abs(b-H),c=!0);c&&(r=C,t=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));q=q||c},e=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-v)<y?(k=b-a.getCenterX(),y=Math.abs(b-v),d=!0):Math.abs(b-z)<y?(k=b-a.x,y=Math.abs(b-z),d=!0):Math.abs(b-A)<y&&(k=b-a.x-a.width,y=Math.abs(b-A),d=!0);d&&(n=c,p=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||d},f=this.graph.getView().translate,g=this.graph.getView().scale,k=b.x,l=b.y,m=!1,n=null,p=null,q=!1,r=null,t=null,u=this.getGuideTolerance(),y=u,x=u,u=a.clone();u.x+=b.x;u.y+=b.y;var z=u.x,A=u.x+u.width,v=u.getCenterX(),F=u.y,H=u.y+u.height,E=u.getCenterY();for(b=0;b<this.states.length;b++){var C=this.states[b];null!=C&&(this.horizontal&&(e.call(this,C.getCenterX(),C),e.call(this,C.x,
mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||d},f=this.graph.getView().translate,g=this.graph.getView().scale,k=b.x,l=b.y,m=!1,n=null,p=null,q=!1,r=null,t=null,u=this.getGuideTolerance(),y=u,x=u,u=a.clone();u.x+=b.x;u.y+=b.y;var z=u.x,A=u.x+u.width,v=u.getCenterX(),E=u.y,H=u.y+u.height,F=u.getCenterY();for(b=0;b<this.states.length;b++){var C=this.states[b];null!=C&&(this.horizontal&&(e.call(this,C.getCenterX(),C),e.call(this,C.x,
C),e.call(this,C.x+C.width,C)),this.vertical&&(d.call(this,C.getCenterY(),C),d.call(this,C.y,C),d.call(this,C.y+C.height,C)))}c&&(m||(c=a.x-(this.graph.snap(a.x/g-f.x)+f.x)*g,k=this.graph.snap(k/g)*g-c),q||(f=a.y-(this.graph.snap(a.y/g-f.y)+f.y)*g,l=this.graph.snap(l/g)*g-f));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
[new mxPoint(p,minY),new mxPoint(p,maxY)]:[new mxPoint(p,-this.graph.panDy),new mxPoint(p,g.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(n,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";q||null==this.guideY?null!=this.guideY&&(null!=r&&null!=a&&(minX=Math.min(a.x+k-this.graph.panDx,r.x),maxX=Math.max(a.x+a.width+k-this.graph.panDx,r.x+r.width)),this.guideY.points=null!=minX&&null!=maxX?[new mxPoint(minX,t),
new mxPoint(maxX,t)]:[new mxPoint(-this.graph.panDx,t),new mxPoint(g.scrollWidth-3-this.graph.panDx,t)],this.guideY.stroke=this.getGuideColor(r,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden";b=new mxPoint(k,l)}return b};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
@ -662,9 +662,9 @@ function mxArrowConnector(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.f
mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),q=b[b.length-1],r=1;r<b.length-1&&b[r].x==
b[0].x&&b[r].y==b[0].y;)r++;var t=b[r].x-b[0].x,r=b[r].y-b[0].y,u=Math.sqrt(t*t+r*r);if(0!=u){var y=t/u,x,z=y,A=r/u,v,F=A,u=f*A,H=-f*y,E=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();t=y;r=A;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,y,A,n,d,f,m,!0);else{x=b[0].x+u/2+m*y;v=b[0].y+H/2+m*A;var C=b[0].x-u/2+m*y,B=b[0].y-H/2+m*A;g?(a.moveTo(x,v),E.push(function(){a.lineTo(C,B)})):(a.moveTo(C,B),a.lineTo(x,v))}for(var G=v=x=0,u=0;u<b.length-2;u++)if(H=mxUtils.relativeCcw(b[u].x,
b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),x=b[u+2].x-b[u+1].x,v=b[u+2].y-b[u+1].y,G=Math.sqrt(x*x+v*v),0!=G&&(z=x/G,F=v/G,tmp=Math.max(Math.sqrt((y*z+A*F+1)/2),.04),x=y+z,v=A+F,G=Math.sqrt(x*x+v*v),0!=G)){x/=G;v/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),G=0!=H&&p?Math.max(.1,G):Math.max(tmp,.06),I=b[u+1].x+v*f/2/G,N=b[u+1].y-x*f/2/G;v=b[u+1].x-v*f/2/G;x=b[u+1].y+x*f/2/G;0!=H&&p?-1==H?(H=v+F*f,G=x-z*f,a.lineTo(v+A*f,x-y*f),a.quadTo(I,N,H,G),function(b,c){E.push(function(){a.lineTo(b,
c)})}(v,x)):(a.lineTo(I,N),function(b,c){var d=I-A*f,e=N+y*f,k=I-F*f,g=N+z*f;E.push(function(){a.quadTo(b,c,d,e)});E.push(function(){a.lineTo(k,g)})}(v,x)):(a.lineTo(I,N),function(b,c){E.push(function(){a.lineTo(b,c)})}(v,x));y=z;A=F}u=f*F;H=-f*z;if(l&&!g)this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!1);else{a.lineTo(q.x-m*z+u/2,q.y-m*F+H/2);var J=q.x-m*z-u/2,U=q.y-m*F-H/2;g?(a.moveTo(J,U),E.splice(0,0,function(){a.moveTo(J,U)})):a.lineTo(J,U)}for(u=E.length-1;0<=u;u--)E[u]();g?(a.end(),a.stroke()):(a.close(),
b[0].x&&b[r].y==b[0].y;)r++;var t=b[r].x-b[0].x,r=b[r].y-b[0].y,u=Math.sqrt(t*t+r*r);if(0!=u){var y=t/u,x,z=y,A=r/u,v,E=A,u=f*A,H=-f*y,F=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();t=y;r=A;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,y,A,n,d,f,m,!0);else{x=b[0].x+u/2+m*y;v=b[0].y+H/2+m*A;var C=b[0].x-u/2+m*y,B=b[0].y-H/2+m*A;g?(a.moveTo(x,v),F.push(function(){a.lineTo(C,B)})):(a.moveTo(C,B),a.lineTo(x,v))}for(var G=v=x=0,u=0;u<b.length-2;u++)if(H=mxUtils.relativeCcw(b[u].x,
b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),x=b[u+2].x-b[u+1].x,v=b[u+2].y-b[u+1].y,G=Math.sqrt(x*x+v*v),0!=G&&(z=x/G,E=v/G,tmp=Math.max(Math.sqrt((y*z+A*E+1)/2),.04),x=y+z,v=A+E,G=Math.sqrt(x*x+v*v),0!=G)){x/=G;v/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),G=0!=H&&p?Math.max(.1,G):Math.max(tmp,.06),I=b[u+1].x+v*f/2/G,M=b[u+1].y-x*f/2/G;v=b[u+1].x-v*f/2/G;x=b[u+1].y+x*f/2/G;0!=H&&p?-1==H?(H=v+E*f,G=x-z*f,a.lineTo(v+A*f,x-y*f),a.quadTo(I,M,H,G),function(b,c){F.push(function(){a.lineTo(b,
c)})}(v,x)):(a.lineTo(I,M),function(b,c){var d=I-A*f,e=M+y*f,k=I-E*f,g=M+z*f;F.push(function(){a.quadTo(b,c,d,e)});F.push(function(){a.lineTo(k,g)})}(v,x)):(a.lineTo(I,M),function(b,c){F.push(function(){a.lineTo(b,c)})}(v,x));y=z;A=E}u=f*E;H=-f*z;if(l&&!g)this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!1);else{a.lineTo(q.x-m*z+u/2,q.y-m*E+H/2);var J=q.x-m*z-u/2,U=q.y-m*E-H/2;g?(a.moveTo(J,U),F.splice(0,0,function(){a.moveTo(J,U)})):a.lineTo(J,U)}for(u=F.length-1;0<=u;u--)F[u]();g?(a.end(),a.stroke()):(a.close(),
a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,t,r,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-y,-A,c,e,f,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,m){g=k/g;var n=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;m?a.moveTo(b-n+p,c-k+f):a.lineTo(b-n+p,c-k+f);a.lineTo(b-n/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+n/g+p,c+k/g+f);a.lineTo(b+n+p,c+k+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
@ -864,7 +864,7 @@ k}else for(c++,e=0;e<this.nestedBestRanks.length;e++)for(f=a.ranks[e],g=0;g<f.le
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),m=[],n=0;n<k.length;n++){var p=k[n].getGeneralPurposeVariable(a-1);m.push(p)}m.sort(function(a,b){return a-b});f[l]=m}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;l=2*f-1;--f;e=[];for(g=0;g<l;++g)e[g]=0;for(g=0;g<d.length;g++)for(l=d[g]+f,++e[l];0<
l;)l%2&&(c+=e[l+1]),l=l-1>>1,++e[l];return c};
mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,q=null,r,t,u=null,y=null,x,z=null,l=0;l<g.length-1;l++){if(0==l){x=k[l];m=x.getNextLayerConnectedCells(f);n=x.getPreviousLayerConnectedCells(f);r=[];t=[];for(var A=0;A<m.length;A++)r[A]=m[A].getGeneralPurposeVariable(f+1);for(A=
0;A<n.length;A++)t[A]=n[A].getGeneralPurposeVariable(f-1)}else m=p,n=q,r=u,t=y,x=z;z=k[l+1];p=z.getNextLayerConnectedCells(f);q=z.getPreviousLayerConnectedCells(f);u=[];y=[];for(A=0;A<p.length;A++)u[A]=p[A].getGeneralPurposeVariable(f+1);for(A=0;A<q.length;A++)y[A]=q[A].getGeneralPurposeVariable(f-1);for(var v=0,F=0,A=0;A<r.length;A++)for(var H=0;H<u.length;H++)r[A]>u[H]&&v++,r[A]<u[H]&&F++;for(A=0;A<t.length;A++)for(H=0;H<y.length;H++)t[A]>y[H]&&v++,t[A]<y[H]&&F++;if(F<v||F==v&&e)p=x.getGeneralPurposeVariable(f),
0;A<n.length;A++)t[A]=n[A].getGeneralPurposeVariable(f-1)}else m=p,n=q,r=u,t=y,x=z;z=k[l+1];p=z.getNextLayerConnectedCells(f);q=z.getPreviousLayerConnectedCells(f);u=[];y=[];for(A=0;A<p.length;A++)u[A]=p[A].getGeneralPurposeVariable(f+1);for(A=0;A<q.length;A++)y[A]=q[A].getGeneralPurposeVariable(f-1);for(var v=0,E=0,A=0;A<r.length;A++)for(var H=0;H<u.length;H++)r[A]>u[H]&&v++,r[A]<u[H]&&E++;for(A=0;A<t.length;A++)for(H=0;H<y.length;H++)t[A]>y[H]&&v++,t[A]<y[H]&&E++;if(E<v||E==v&&e)p=x.getGeneralPurposeVariable(f),
x.setGeneralPurposeVariable(f,z.getGeneralPurposeVariable(f)),z.setGeneralPurposeVariable(f,p),p=m,q=n,u=r,y=t,z=x,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],k=new MedianCellSorter;k.cell=g;var l;l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m;m=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
@ -1025,8 +1025,8 @@ mxPrintPreview.prototype.open=function(a,b,c,d){var e=this.graph.cellRenderer.in
k.writeln(l);mxClient.IS_VML?k.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):("CSS1Compat"===document.compatMode&&k.writeln("<!DOCTYPE html>"),k.writeln("<html>"));k.writeln("<head>");this.writeHead(k,a);k.writeln("</head>");k.writeln('<body class="mxPage">')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-=
q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),y=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*y;var x=mxUtils.bind(this,function(){if(this.pageSelector&&(1<y||1<u)){var a=this.createPageSelector(y,u);k.body.appendChild(a);if(mxClient.IS_IE&&null==k.documentMode||
5==k.documentMode||8==k.documentMode||7==k.documentMode){a.style.position="absolute";var b=function(){a.style.top=(k.body.scrollTop||k.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),z=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;if(c||b)a.style.pageBreakAfter=
"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),k.body.appendChild(a));(c||b)&&this.addPageBreak(k)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var v=0;v<A.length;v++)z(A[v],!0);for(var F=this.getAppendices(this.pageFormat.width,this.pageFormat.height),v=0;v<y;v++){var H=v*t/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<u;a++){if(null==this.wnd)return null;
var E=a*r/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,C=v*u+a+1,B=new mxRectangle(E,H,r,t),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-E,-H,this.scale,C,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-E,-H)}),C);f.setAttribute("id","mxPage-"+C);z(f,null!=F||v<y-1||a<u-1)}}if(null!=F)for(v=0;v<F.length;v++)z(F[v],v<F.length-1);g&&!d&&(this.closeDocument(),x());this.wnd.focus()}catch(G){null!=f&&null!=f.parentNode&&
"always";g&&(mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE)?(k.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),k.body.appendChild(a));(c||b)&&this.addPageBreak(k)}),A=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=A)for(var v=0;v<A.length;v++)z(A[v],!0);for(var E=this.getAppendices(this.pageFormat.width,this.pageFormat.height),v=0;v<y;v++){var H=v*t/this.scale-this.y0/this.scale+(m.y-q.y*n)/n;for(a=0;a<u;a++){if(null==this.wnd)return null;
var F=a*r/this.scale-this.x0/this.scale+(m.x-q.x*n)/n,C=v*u+a+1,B=new mxRectangle(F,H,r,t),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-F,-H,this.scale,C,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-F,-H)}),C);f.setAttribute("id","mxPage-"+C);z(f,null!=E||v<y-1||a<u-1)}}if(null!=E)for(v=0;v<E.length;v++)z(E[v],v<E.length-1);g&&!d&&(this.closeDocument(),x());this.wnd.focus()}catch(G){null!=f&&null!=f.parentNode&&
f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("</body>");a.writeln("</html>");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("</style>")};mxPrintPreview.prototype.writePostfix=function(a){};
@ -1153,17 +1153,17 @@ b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&
d.y)||mxUtils.contains(b,a,d.y)||e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),e.push(new mxPoint(a,f+(Math.min(b.y+b.height,c.y+c.height)-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),
null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,k)||mxUtils.contains(b,d.x,k)||e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,k)))))},
SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,m=!0,n=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var q=g.length-1;if(null!=d&&0<d.length){for(var n=[],r=0;r<d.length;r++){var t=a.view.transformControlPoint(a,d[r]);null!=t&&(t.x=
Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));t=g[q];null!=t&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-t.x)<k&&(d[d.length-1].x=t.x),Math.abs(d[d.length-1].y-t.y)<k&&(d[d.length-1].y=t.y));var n=d[0],u=b,y=g[0],x=!1,z=!1,x=n;null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);for(r=0;2>r;r++){var A=null!=y&&y.x==x.x,v=null!=y&&y.y==x.y,F=null!=u&&x.y>=u.y&&x.y<=u.y+
u.height,u=null!=u&&x.x>=u.x&&x.x<=u.x+u.width,x=v||null==y&&F,z=A||null==y&&u;if(0!=r||!(x&&z||A&&v)){if(null!=y&&!v&&!A&&(F||u)){m=F?!1:!0;break}if(z||x){m=x;1==r&&(m=0==d.length%2?x:z);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);x=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));t=g[q];null!=t&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-t.x)<k&&(d[d.length-1].x=t.x),Math.abs(d[d.length-1].y-t.y)<k&&(d[d.length-1].y=t.y));var n=d[0],u=b,y=g[0],x=!1,z=!1,x=n;null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);for(r=0;2>r;r++){var A=null!=y&&y.x==x.x,v=null!=y&&y.y==x.y,E=null!=u&&x.y>=u.y&&x.y<=u.y+
u.height,u=null!=u&&x.x>=u.x&&x.x<=u.x+u.width,x=v||null==y&&E,z=A||null==y&&u;if(0!=r||!(x&&z||A&&v)){if(null!=y&&!v&&!A&&(E||u)){m=E?!1:!0;break}if(z||x){m=x;1==r&&(m=0==d.length%2?x:z);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);x=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
p.y));m?p.y=n.y:p.x=n.x;for(r=0;r<d.length;r++)m=!m,n=d[r],m?p.y=n.y:p.x=n.x,f(p.clone())}else n=p,m=!0;p=g[q];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[q]&&g[q].y!=n.y||null==g[q]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[q]&&g[q].x!=n.x||null==g[q]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&f(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=b)for(;1<
e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[q]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=t&&null!=e[e.length-1]&&Math.abs(t.x-e[e.length-1].x)<k&&Math.abs(t.y-e[e.length-1].y)<k&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-t.x)<k&&(e[e.length-1].x=t.x),Math.abs(e[e.length-1].y-t.y)<k&&(e[e.length-1].y=t.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,
0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,
2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,
getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,q=null!=b?b.width:0,r=null!=b?b.height:0,t=null!=c?c.x:m.x,u=null!=c?c.y:m.y,y=null!=c?c.width:0,x=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),z=a.view.scale*mxEdgeStyle.getJettySize(a,
b,c,d,!1);null!=b&&c==b&&(f=z=Math.max(f,z));var A=z+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,F=m.y-l.y,v=v*v+F*F<A*A;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,p,q,r),v),n=v.x,p=v.y,
b,c,d,!1);null!=b&&c==b&&(f=z=Math.max(f,z));var A=z+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,E=m.y-l.y,v=v*v+E*E<A*A;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,p,q,r),v),n=v.x,p=v.y,
q=v.width,r=v.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(t,u,y,x),v),t=v.x,u=v.y,y=v.width,x=v.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;r=Math.round(10*r)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;y=Math.round(10*y)/10;x=Math.round(10*x)/10;a=[0,0];n=[[n,p,q,r],[t,u,y,x]];z=[f,z];for(v=0;2>v;v++)mxEdgeStyle.limits[v][1]=
n[v][0]-z[v],mxEdgeStyle.limits[v][2]=n[v][1]-z[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+z[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+z[v];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);F=z-p;z=0;0>v?z=0>F?2:1:0>=F&&(z=3,0==v&&(z=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST),
n[v][0]-z[v],mxEdgeStyle.limits[v][2]=n[v][1]-z[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+z[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+z[v];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);E=z-p;z=0;0>v?z=0>E?2:1:0>=E&&(z=3,0==v&&(z=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST),
b[v][1]=(p.y-n[v][1])/n[v][3],1>=Math.abs(p.y-n[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[v][1]-n[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);v=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-A,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-A,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-A,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-A,0);A=[];
c=[];l=[];c[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=v>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=v>=p?v:p;q=[[0,0],[0,0]];r=!1;for(v=0;2>v;v++)0==a[v]&&(0==(c[v]&d[v])&&(c[v]=mxUtils.reversePortConstraints(c[v])),0==(l[v]&d[v])&&(l[v]=mxUtils.reversePortConstraints(l[v])),q[v][0]=l[v],q[v][1]=c[v]);0<p&&0<m&&(0<(c[0]&d[0])&&0<(l[1]&d[1])?(q[0][0]=
c[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=c[1],r=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=c[1],q[1][1]=l[1],r=!0));0<p&&!r&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=l[1],q[1][1]=c[1],r=!0);0<m&&!r&&(q[0][0]=c[0],q[0][1]=l[0],q[1][0]=c[1],q[1][1]=l[1]);for(v=0;2>v;v++)0==a[v]&&(0==(q[v][0]&d[v])&&(q[v][0]=q[v][1]),A[v]=q[v][0]&d[v],A[v]|=(q[v][1]&d[v])<<8,A[v]|=(q[1-v][v]&d[v])<<16,A[v]|=(q[1-v][1-v]&d[v])<<24,0==(A[v]&15)&&(A[v]<<=8),0==(A[v]&3840)&&(A[v]=A[v]&15|A[v]>>8),0==(A[v]&
@ -2010,9 +2010,9 @@ a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.f
this.graph.pageBreaksVisible;var b=a.getAttribute("pageWidth"),c=a.getAttribute("pageHeight");null!=b&&null!=c&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(b),parseFloat(c)));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:this.graph.defaultGraphBackground};
Editor.prototype.setGraphXml=function(a){if(null!=a){var b=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),b.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var c=b.document.createElement("mxGraphModel");c.appendChild(a);b.decode(c,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),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(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.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,c){b.undoableEditHappened(c.getProperty("edit"))};var c=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,c);a.getView().addListener(mxEvent.UNDO,c);c=function(b,c){for(var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes),e=a.getModel(),k=[],l=0;l<d.length;l++)(e.isVertex(d[l])||e.isEdge(d[l]))&&null!=a.view.getState(d[l])&&
k.push(d[l]);a.setSelectionCells(k)};b.addListener(mxEvent.UNDO,c);b.addListener(mxEvent.REDO,c);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(a,b){this.data=a;this.filename=b;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.data&&(this.cancel(!1),this.consumer(this.data,this.filename))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
@ -2044,8 +2044,8 @@ if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=r.toolbar)){var c=b.fon
d.cellEditor.stopEditing=function(a,b){u.apply(this,arguments);q()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var y=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var x="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
e.push(f));f=d.getModel().getStyle(b.cell);for(var k=null!=f?f.split(";"):[],g=0;g<k.length;g++){var l=k[g],m=l.indexOf("=");0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
"keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),F=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)x.push(F[a][b]);for(a=0;a<z.length;a++)x.push(z[a]);var H=function(a,b){d.getModel().beginUpdate();
try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=x.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var r=p.substring(0,q),t=mxUtils.indexOf(n,r);0<=t&&n.splice(t,1);for(var u=0;u<F.length;u++){var y=F[u];if(0<=mxUtils.indexOf(y,r))for(var v=
"keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],v="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),E=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<E.length;a++)for(b=0;b<E[a].length;b++)x.push(E[a][b]);for(a=0;a<z.length;a++)x.push(z[a]);var H=function(a,b){d.getModel().beginUpdate();
try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=x.slice(),f=0;f<m.length;f++){var p=m[f],q=p.indexOf("=");if(0<=q){var r=p.substring(0,q),t=mxUtils.indexOf(n,r);0<=t&&n.splice(t,1);for(var u=0;u<E.length;u++){var y=E[u];if(0<=mxUtils.indexOf(y,r))for(var v=
0;v<y.length;v++){var A=mxUtils.indexOf(n,y[v]);0<=A&&n.splice(A,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var r=n[f],C=e[r];null==C||"shape"==r&&!c||(!c||0>mxUtils.indexOf(z,r))&&d.setCellStyles(r,C,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){H(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){H(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));H(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&(e=d.getModel().isVertex(c[k])||e,!(f=d.getModel().isEdge(c[k])||f)||!e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(A,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
mxUtils.indexOf(z,c[k]))f||0<=mxUtils.indexOf(v,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(x,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(x,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(v,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
@ -2178,10 +2178,10 @@ function(){var a=this.currentState;t.apply(this,arguments);a!=this.currentState?
arguments)||mxEvent.isShiftDown(a)};var x=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return x.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(z=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,
function(){this.isEnabled()&&(this.container.style.cursor=z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var A=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return A.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};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,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<c||0<d){var k=this.getModel(),g=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var m=k.getChildCount(e),n=0;n<m;n++){var p=k.getChildAt(e,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var r=
mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var F=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:F.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:E.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 H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();H=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)),p.start(c.x,c.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);H=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var F=this.updateMouseEvent;this.updateMouseEvent=function(a){a=F.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);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.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();
@ -2283,7 +2283,7 @@ this.graph.currentEdgeStyle[b];return a};var c=mxConnectionHandler.prototype.cre
b.apply(this,arguments);this.error=null;return c});return a};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",html:"1",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.currentEdgeStyle=Graph.prototype.defaultEdgeStyle;Graph.prototype.currentVertexStyle={};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&
(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,
0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],
f[1]),2<f.length?"0"!=f[2]:!0))}}catch(L){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,
f[1]),2<f.length?"0"!=f[2]:!0))}}catch(K){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,
this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,
arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=
function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),k=b.getTerminal(e,!1);b.setTerminal(e,k,!0);b.setTerminal(e,f,!1);var g=b.getGeometry(e);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();
@ -2307,13 +2307,13 @@ f&&Math.abs(this.scrollTop-k.container.scrollTop)<f&&Math.abs(this.startX-d.getG
k.click=function(a){};k.addMouseListener(g);mxEvent.addListener(document,"mouseleave",function(a){g.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),k=0;k<a.length;k++){var g=c.getParent(a[k]),l=this.moveCells([f[k]],d,d,!1,g)[0];e.push(l);if(b)c.add(g,f[k]);else{var m=g.getIndex(a[k]);c.add(g,f[k],m+1)}}}finally{c.endUpdate()}return e};
Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var k=this.view.getState(b[f]);
if(null!=k){var g=a?k.getCenterX():k.getCenterY(),d=null!=d?Math.max(d,g):g,e=null!=e?Math.min(e,g):g;c.push(k)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});k=this.view.translate;g=this.view.scale;e=e/g-(a?k.x:k.y);d=d/g-(a?k.x:k.y);this.getModel().beginUpdate();try{for(var l=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var m=this.getCellGeometry(c[f].cell),d=d+l;null!=m&&(m=m.clone(),a?m.x=Math.round(d-m.width/2):m.y=Math.round(d-m.height/2),this.getModel().setGeometry(c[f].cell,
m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-
e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}for(var e=new mxCodec,f=new mxGraphModel,k=f.getChildAt(f.getRoot(),0),d=0;d<a.length;d++)c.get(this.model.getParent(a[d]))||f.add(k,b[d]);return e.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,k){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;k=null!=
k?k:!0;var g=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();d=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==m.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/l;d.setAttribute("width",Math.ceil(g.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(g.height*a)+2*c+"px");d.setAttribute("version","1.1");var n=d;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(n));m.appendChild(d);m=this.createSvgCanvas(n);m.foOffset=e?-.5:0;m.textOffset=e?-.5:0;m.imageOffset=e?-.5:
0;m.translate(Math.floor((c/b-g.x)/l),Math.floor((c/b-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,k,g,l,m,n,q,r){var t=this.state;if(null!=this.foAltText&&(0==d||0!=t.fontSize&&f.length<5*d/t.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(d/2));u.setAttribute("y",Math.round((e+t.fontSize)/2));u.setAttribute("fill",t.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(t.fontSize)+"px");
u.setAttribute("font-family",t.fontFamily);(t.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(t.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style","italic");(t.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,f);return u}return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*
if(null!=k){var g=a?k.getCenterX():k.getCenterY(),d=null!=d?Math.max(d,g):g,e=null!=e?Math.min(e,g):g;c.push(k)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});k=this.view.translate;g=this.view.scale;e=e/g-(a?k.x:k.y);d=d/g-(a?k.x:k.y);this.getModel().beginUpdate();try{for(var l=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var m=this.view.getState(this.model.getParent(c[f].cell)),n=this.getCellGeometry(c[f].cell),d=d+l;null!=n&&null!=m&&(n=n.clone(),a?n.x=Math.round(d-n.width/2)-m.origin.x:
n.y=Math.round(d-n.height/2)-m.origin.y,this.getModel().setGeometry(c[f].cell,n))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||
c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,k){b=null!=b?b:1;c=null!=c?c:0;e=
null!=e?e:!0;f=null!=f?f:!0;k=null!=k?k:!0;var g=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();d=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==m.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",
mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/l;d.setAttribute("width",Math.ceil(g.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(g.height*a)+2*c+"px");d.setAttribute("version","1.1");var n=d;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(n));m.appendChild(d);m=this.createSvgCanvas(n);m.foOffset=e?-.5:0;m.textOffset=e?
-.5:0;m.imageOffset=e?-.5:0;m.translate(Math.floor((c/b-g.x)/l),Math.floor((c/b-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,k,g,l,m,n,q,r){var t=this.state;if(null!=this.foAltText&&(0==d||0!=t.fontSize&&f.length<5*d/t.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(d/2));u.setAttribute("y",Math.round((e+t.fontSize)/2));u.setAttribute("fill",t.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(t.fontSize)+
"px");u.setAttribute("font-family",t.fontFamily);(t.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(t.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style","italic");(t.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,f);return u}return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*
e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(g,e)&&m.image(b.x,b.y,c.width,c.height,c.src,!0));m.scale(a);m.textEnabled=k;k=this.createSvgImageExport();var q=k.drawCellState;k.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&q.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),m);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=
window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=
document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");
@ -2322,31 +2322,31 @@ c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)last
if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,k){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),
b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.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){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=
function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(K){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||
!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border=
"")};var k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===
a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}k.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==g.charAt(g.length-1)&&(g=g.substring(0,
g.length-1));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(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=f?"bold":"normal";this.textarea.style.fontStyle=
k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var g=mxUtils.htmlEntities(this.textarea.innerHTML);
mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight=
"normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=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<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=
Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",l.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,"<br/>"));return 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"1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}};var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=
function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(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 p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);p.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)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(b.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!(!this.graph.isSwimlane(a.cell)&&
0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var q=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=
this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=q.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(b=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/b)+" x "+this.roundLength(this.bounds.height/
b)),b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==b&&(b=this.bounds),this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=b.y+b.height+12+"px")};mxVertexHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;mxEdgeHandler.prototype.updateHint=function(b,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,
e=this.graph.view.scale,f=this.roundLength(c.x/e-d.x),d=this.roundLength(c.y/e-d.y);this.hint.innerHTML=f+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-
this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),c.y)+this.state.view.graph.gridSize+"px";null!=this.hideEdgeHintThread&&window.clearTimeout(this.hideEdgeHintThread);this.hideEdgeHintThread=window.setTimeout(mxUtils.bind(this,function(){null!=this.hint&&(this.hint.style.visibility="hidden")}),500)};mxEdgeHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAACXBIWXMAAAsTAAALEwEAmpwYAAABLUlEQVQ4y61US4rCQBBNeojiRrLSnbMOWWU3V1FPouARcgc9hyLOCSSbYZw5gRCIkM9KbevJaycS4zCOBY+iq6pf1y+xrNtiE6oEY/tVzMUXgSNoCJrUDu3qHpldutwSuIKOoEvt0m7I7DoCvNj2fb8XRdEojuN5lmVraJxhh59xFSLFF9phGL7lef6hRb63R73aHM8aAjv8JHJ47yqLlud5r0VRbHa51sPZQVuT/QU4ww4/4ljaJRubrC5SxouD6TWBQV/sEIkbs0eOIVGssSO1L5D6LQID+BHHZjdMSYpj7KZpun7/uk8CP5rNqTXLJP/OpNyTMWruP9CTP08nCILKdCp7gkCzJ8vPnz2BvW5PKhuLjJBykiQLaWIEjTP3o3Zjn/LtPO0rfvh/cgKu7z6wtPPltQAAAABJRU5ErkJggg==":
function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(ca){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,
b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":
"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline=
"none",this.textarea.style.border="")};var k=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;
d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}k.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||
8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){g=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<g.length&&"\n"==
g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"<br/>"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD,k=(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=
f?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
var g=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(g=mxUtils.replaceTrailingNewlines(g,"<div><br></div>"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+
"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=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<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*
c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow=
"",l.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,"<br/>"));return 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"1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}};
var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(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 p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&
(e=null);p.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)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(b.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=
function(a,b){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var q=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&
null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=q.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(b=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/
b)+" x "+this.roundLength(this.bounds.height/b)),b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==b&&(b=this.bounds),this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=b.y+b.height+12+"px")};mxVertexHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;mxEdgeHandler.prototype.updateHint=function(b,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));
var d=this.graph.view.translate,e=this.graph.view.scale,f=this.roundLength(c.x/e-d.x),d=this.roundLength(c.y/e-d.y);this.hint.innerHTML=f+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=
Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),c.y)+this.state.view.graph.gridSize+"px";null!=this.hideEdgeHintThread&&window.clearTimeout(this.hideEdgeHintThread);this.hideEdgeHintThread=window.setTimeout(mxUtils.bind(this,function(){null!=this.hint&&(this.hint.style.visibility="hidden")}),500)};mxEdgeHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAACXBIWXMAAAsTAAALEwEAmpwYAAABLUlEQVQ4y61US4rCQBBNeojiRrLSnbMOWWU3V1FPouARcgc9hyLOCSSbYZw5gRCIkM9KbevJaycS4zCOBY+iq6pf1y+xrNtiE6oEY/tVzMUXgSNoCJrUDu3qHpldutwSuIKOoEvt0m7I7DoCvNj2fb8XRdEojuN5lmVraJxhh59xFSLFF9phGL7lef6hRb63R73aHM8aAjv8JHJ47yqLlud5r0VRbHa51sPZQVuT/QU4ww4/4ljaJRubrC5SxouD6TWBQV/sEIkbs0eOIVGssSO1L5D6LQID+BHHZjdMSYpj7KZpun7/uk8CP5rNqTXLJP/OpNyTMWruP9CTP08nCILKdCp7gkCzJ8vPnz2BvW5PKhuLjJBykiQLaWIEjTP3o3Zjn/LtPO0rfvh/cgKu7z6wtPPltQAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.fixedHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NkE1NkU4Njk2QjI1MTFFNEFDMjFGQTcyODkzNTc3NkYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NkE1NkU4NkE2QjI1MTFFNEFDMjFGQTcyODkzNTc3NkYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2QTU2RTg2NzZCMjUxMUU0QUMyMUZBNzI4OTM1Nzc2RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2QTU2RTg2ODZCMjUxMUU0QUMyMUZBNzI4OTM1Nzc2RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pmuk6K8AAAGBSURBVHjarFRBSsNQEM3/atNs6qLowixcKELoqjuXoqfQeoF6BMEj9BCC1YIXcCGlV8hGLNZlBKWlCk1JSs13Xvw/nca6UDrwmMzMy8tk/iTCWmwi52Eq53+QeWwg2bXSSNi1WiRibgRWCTahwEQmhJgw1WJGML2BC6wQnEqlsuH7fr3f7zdHo9EdPGLkUdc8mX8TJNYIpUajsR+G4YMie3pNVKebpB6GPOrgab7kr5F24Hne9ng87r6HStUuP5V1Mc2AGHnUwWMdCck6sVut1onjOHtnt4nV7M0fAuI65VEnXk3PTFq5Eyi4rnvUe1PW9fO3QOdUzvkbyqNOvEM2dMEHK2zbLr98zJ5+cJWkAvDGUC8Wi2X28Gww6bnHcTzYWp+JGAHTCQz1KIoGfFckCyZBELR3N4V1vCOyTrhHHnXw9N5kQn8+nWq1Onc6C/cERLMn7cfZniD/257wbjDxEjqiDT0fDof3tLE+PGK9HyXNy7pYyrez9K/43/+TLwEGAMb7AY6w980DAAAAAElFTkSuQmCC":
IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEMzRUVERTk2NzU1MTFFNTg5NjNEMjREQ0FFNENFQzgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEMzRUVERUE2NzU1MTFFNTg5NjNEMjREQ0FFNENFQzgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowQzNFRURFNzY3NTUxMUU1ODk2M0QyNERDQUU0Q0VDOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowQzNFRURFODY3NTUxMUU1ODk2M0QyNERDQUU0Q0VDOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Poj8AGUAAAF6SURBVHjarFTBSsNAEM2u2jSXeCh6sAcPilB6ys2j6Fdo/YH6CYKf0I8QrBb8AQ9S+gu5iMV6jKC0VCEJTalZ54VNnMR4ULrwmJ2Zt5PZmdkIo3yJgsRSBfmDzPUUku2VRsz2qixIehBYJZiECgsyJ0SEhQ6WBkwO8AArBKvZbG64rtsej8dd3/fvIKHDDr/myeJNYFgj2J1OZz8IggdF6+k1VoNhnEgs2OEHT/Mlv0aSQaPR2A7DcPgeKNW6/FTGxSIDdNjhB49lJCTLxOz1eieWZe2d3cZGd5RvAvQ22eEnXkvXTBqFDlTq9frR6E0Z18+qtO83ZIefeIes6IIXVpimWXv5yB8cnMqcDn+1Wq2xj2eFSfoeRdFkaz0f5OAqzunwz2azCZ8VyZS553n93U1hHO+I0uvADj94em6yQH/ujuM4ue6UzgmI6Zz0H7/nBPbf5oRng4rbyIgm9Hw6nd7TxLqQ0PV82JqXZbGUt7P0V/zv/8mXAAMASSz1f9Cd7ycAAAAASUVORK5CYII=":
IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.secondaryHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEJBMUVERjNEMkZDMTFFM0I0Qzc5RkE1RTc2NjI0OUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEJBMUVERjREMkZDMTFFM0I0Qzc5RkE1RTc2NjI0OUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowQkExRURGMUQyRkMxMUUzQjRDNzlGQTVFNzY2MjQ5QiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowQkExRURGMkQyRkMxMUUzQjRDNzlGQTVFNzY2MjQ5QiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvXDOj4AAAFqSURBVHjarFTNToNAEN5FLeiBmDRe7MGLF4IXbp71KapP4CPoO/QdvKiv4ME0PkAvJI2J0SueIHgAAk3b7XxkwSlgE38mmSwz8+3HsPMtUnSbbKww1VhbYB5XbrBnpX3JnlUXSbURvk1ukvcYyYy8IJ9rsoqw3MAJtsh3Xdc98H3/KgzDuyRJHrEiRh51jTOaX4LEDrk9Go1O0zR9UWTL9E0to+dyhSGPOnAab/DPKDtwHOcoy7LXz1SpxeRSzW9F7YiRRx041pGsSMC6Ty1f442LycUawRfRsOyIcDfA632ST6A3GAzOVfYu1PS+c+5q+iBQJ9wZO3TJD1aaptkX+YfYaFS3LKvPXl4fTDn3oigiYR1uJqF6nucR14rBglkQBGO5dyzkybBbxpRHHTitm5rox9PxPK81nZZOAKx1Eo5rnSD/nU54NzhxGx1hjHEcP5FifayItT5sjVvTyJ/vzr/f4l//T1YCDAC4VAdLL1OIRAAAAABJRU5ErkJggg==":
@ -2368,10 +2368,10 @@ this.secondDiv=null)),b.consume()}};var t=mxRubberband.prototype.reset;mxRubberb
c};var z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&z.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=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 v=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 v.apply(this,arguments)};var F=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))):F.apply(this,arguments)};var H=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);
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 v.apply(this,arguments)};var E=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))):E.apply(this,arguments)};var H=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)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
var E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
var F=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){F.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
"none")};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell);this.updateLinkHint(c);null!=c&&(a=!0);a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b){if(null==b||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="4px 10px 6px 10px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter=
@ -2379,7 +2379,7 @@ this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell);this.updat
b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.get("editLink")),b.setAttribute("width","11"),b.setAttribute("height","11"),b.style.marginLeft="10px",b.style.marginBottom="-1px",b.style.cursor="pointer",this.linkHint.appendChild(b),mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)})))}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var G=
mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});
this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell);null!=b&&(this.updateLinkHint(b),this.redrawHandles())};var I=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),b=null!=a?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==a&&(a=this.state);this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var J=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var R=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(R.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+
@ -2387,9 +2387,9 @@ a.height+6+this.state.view.graph.tolerance)+"px"}};var V=mxEdgeHandler.prototype
this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();
(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function r(){mxActor.call(this)}function t(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function F(){mxShape.call(this)}function H(){mxShape.call(this)}function E(){mxEllipse.call(this)}function C(){mxShape.call(this)}
function B(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function N(){mxShape.call(this)}function J(){mxShape.call(this)}function U(){mxCylinder.call(this)}function R(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this);this.spacing=0}function D(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function K(){mxActor.call(this)}
function da(){mxActor.call(this)}function M(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function T(){mxActor.call(this)}function ba(){mxActor.call(this)}function ca(){mxActor.call(this)}function P(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function Q(){mxEllipse.call(this)}function S(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function v(){mxCylinder.call(this)}function E(){mxShape.call(this)}function H(){mxShape.call(this)}function F(){mxEllipse.call(this)}function C(){mxShape.call(this)}
function B(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function M(){mxShape.call(this)}function J(){mxShape.call(this)}function U(){mxCylinder.call(this)}function R(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this);this.spacing=0}function D(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}
function da(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function N(){mxActor.call(this)}function T(){mxActor.call(this)}function aa(){mxActor.call(this)}function ba(){mxActor.call(this)}function O(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function P(){mxEllipse.call(this)}function S(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
function qa(){mxActor.call(this)}function la(){mxActor.call(this)}function ma(){mxActor.call(this)}function xa(a,b,c,d,e,f,k,g,l,m){k+=l;var n=d.clone();d.x-=e*(2*k+l);d.y-=f*(2*k+l);e*=k+l;f*=k+l;return function(){a.ellipse(n.x-e-k,n.y-f-k,2*k,2*k);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),
a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var ua=Math.tan(mxUtils.toRadians(30)),ia=(.5-ua)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/ua);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ia);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ia)*b);a.lineTo(0,.25*
b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+ua));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-ia)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ia)*b),a.lineTo(.5*b,(1-ia)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ia),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ia)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=
@ -2419,9 +2419,9 @@ arguments)};mxCellRenderer.prototype.defaultShapes.plus=z;var ya=mxRhombus.proto
1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),ya.apply(this,[a,b,c,d,e]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};A.prototype.paintForeground=function(a,b,c,
d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,k;do{k=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=k){var g=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+f+"Height"],
p=this.style["symbol"+f+"Spacing"]||0,q=this.style["symbol"+f+"ArcSpacing"];null!=q&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*q);var q=b,r=c,q=g==mxConstants.ALIGN_CENTER?q+(d-m)/2:g==mxConstants.ALIGN_RIGHT?q+(d-m-p):q+p,r=l==mxConstants.ALIGN_MIDDLE?r+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?r+(e-n-p):r+p;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,q,r,m,n);a.restore()}f++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
mxCellRenderer.prototype.defaultShapes.ext=A;mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=v;mxUtils.extend(F,mxShape);F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,
e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=F;mxUtils.extend(H,mxShape);H.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};H.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/
6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=H;mxUtils.extend(E,mxEllipse);E.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=E;mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);
mxCellRenderer.prototype.defaultShapes.ext=A;mxUtils.extend(v,mxCylinder);v.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=v;mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,
e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=E;mxUtils.extend(H,mxShape);H.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};H.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/
6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=H;mxUtils.extend(F,mxEllipse);F.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=F;mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);
a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=C;mxUtils.extend(B,mxShape);B.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};B.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};B.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};
mxCellRenderer.prototype.defaultShapes.umlControl=B;mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};G.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),k=mxUtils.getValue(this.style,
"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=G&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,
@ -2429,25 +2429,25 @@ a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=G;mxU
e){var f=this.corner,k=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+k,c);a.lineTo(b+k,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,k-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=
I;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=G.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};
mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&
(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);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(J,
(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(M,mxShape);M.prototype.size=10;M.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=M;mxUtils.extend(J,
mxShape);J.prototype.size=10;J.prototype.inset=2;J.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+k);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-k,f/2);a.quadTo((d-f)/2-k,f+k,d/2,f+k);a.quadTo((d+f)/2+k,f+k,(d+f)/2+k,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=J;mxUtils.extend(U,
mxCylinder);U.prototype.jettyWidth=32;U.prototype.jettyHeight=12;U.prototype.redrawPath=function(a,b,c,d,e,f){var k=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=k/2;var k=c+k/2,g=.3*e-b/2,l=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(k,g),a.lineTo(k,g+b),a.lineTo(c,g+b),a.moveTo(c,l),a.lineTo(k,l),a.lineTo(k,l+b),a.lineTo(c,l+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,l+b),a.lineTo(0,
l+b),a.lineTo(0,l),a.lineTo(c,l),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=U;mxUtils.extend(R,mxDoubleEllipse);R.prototype.outerStroke=!0;R.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=R;mxUtils.extend(V,
R);V.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=V;mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=4;X.prototype.isOpenEnded=function(){return!0};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};X.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=X;mxUtils.extend(D,mxArrowConnector);D.prototype.defaultWidth=10;D.prototype.defaultArrowWidth=
20;D.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};D.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};D.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=D;mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.redrawPath=
function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=W;mxUtils.extend(aa,mxRectangleShape);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(a,
function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=W;mxUtils.extend(Q,mxRectangleShape);Q.prototype.dx=20;Q.prototype.dy=20;Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.paintForeground=function(a,
b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));k=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+k,
c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=aa;mxUtils.extend(K,mxActor);K.prototype.dx=20;K.prototype.dy=20;K.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=K;mxUtils.extend(da,mxActor);da.prototype.dx=20;da.prototype.dy=20;da.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=da;mxUtils.extend(M,mxActor);M.prototype.arrowWidth=.3;M.prototype.arrowSize=.2;M.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=M;mxUtils.extend(L,mxActor);L.prototype.redrawPath=
function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",M.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",M.prototype.arrowSize))));c=(e-f)/2;var f=c+f,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),
new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=L;mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=O;mxUtils.extend(T,mxActor);T.prototype.redrawPath=
function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=T;mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=ba;mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=ca;mxUtils.extend(P,mxActor);P.prototype.size=.375;P.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=P;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=
Y;mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=Z;mxUtils.extend(Q,mxEllipse);Q.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();
a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=Q;mxUtils.extend(S,mxRhombus);S.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=S;mxUtils.extend(ga,
c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=Q;mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=ca;mxUtils.extend(da,mxActor);da.prototype.dx=20;da.prototype.dy=20;da.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=da;mxUtils.extend(L,mxActor);L.prototype.arrowWidth=.3;L.prototype.arrowSize=.2;L.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=L;mxUtils.extend(K,mxActor);K.prototype.redrawPath=
function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",L.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",L.prototype.arrowSize))));c=(e-f)/2;var f=c+f,k=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),
new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,k,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=K;mxUtils.extend(N,mxActor);N.prototype.size=.1;N.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=N;mxUtils.extend(T,mxActor);T.prototype.redrawPath=
function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=T;mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=aa;mxUtils.extend(ba,mxActor);ba.prototype.size=20;ba.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=ba;mxUtils.extend(O,mxActor);O.prototype.size=.375;O.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=O;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=
Y;mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=Z;mxUtils.extend(P,mxEllipse);P.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();
a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=P;mxUtils.extend(S,mxRhombus);S.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=S;mxUtils.extend(ga,
mxEllipse);ga.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ga;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,
f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=ea;mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),"1"==mxUtils.getValue(this.style,"top","1")&&(a.begin(),
a.moveTo(b,c),a.lineTo(b+d,c),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"right","1")&&(a.begin(),a.moveTo(b+d,c),a.lineTo(b+d,c+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"bottom","1")&&(a.begin(),a.moveTo(b+d,c+e),a.lineTo(b,c+e),a.end(),a.stroke()),"1"==mxUtils.getValue(this.style,"left","1")&&(a.begin(),a.moveTo(b,c+e),a.lineTo(b,c),a.end(),a.stroke()))};mxCellRenderer.prototype.defaultShapes.partialRectangle=ka;mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=
@ -2458,7 +2458,7 @@ n/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,k,g,l,m){var
a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*q+e*l,n.y-2*r+f*l);a.moveTo(n.x-q-r+f*l,n.y-r+q-e*l);a.lineTo(n.x+r-q-f*l,n.y-r-q+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,k,g,l,m){b=e*l*1.118;c=f*l*1.118;e*=k+l;f*=k+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);g?a.lineTo(n.x-e-f/2,n.y-f+e/2):a.lineTo(n.x+f/2-e,n.y-f-e/2);a.lineTo(n.x-e,n.y-f);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=
null!=a?a:2;return function(b,c,d,e,f,k,g,l,m,n){f*=g+m;k*=g+m;var p=e.clone();return function(){b.begin();b.moveTo(p.x,p.y);l?b.lineTo(p.x-f-k/a,p.y-k+f/a):b.lineTo(p.x+k/a-f,p.y-k-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var za=function(a,b,c){return na(a,["width"],b,function(b,d,e,f,k){k=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*k/2,f.y+e*b/4-d*k/2)},function(b,d,e,f,k,g){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*
b)/a.view.scale-c})},na=function(a,b,c,d,e){var f=a.absolutePoints,k=f.length-1,g=a.view.translate,l=a.view.scale,m=c?f[0]:f[k],n=c?f[1]:f[k-1],p=n.x-m.x,q=n.y-m.y,r=Math.sqrt(p*p+q*q);return fa(a,b,function(a){a=d.call(this,r,p/r,q/r,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+q*q);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,q/a,m,n,b,c)})},ja=function(a){return function(b){return[fa(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"arrowWidth",M.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",M.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},va=function(a,b,c){return function(d){var e=[fa(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,
"arrowWidth",L.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",L.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},va=function(a,b,c){return function(d){var e=[fa(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,
parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},ra=function(a,b,c){c=null!=c?c:1;return function(d){var e=[fa(d,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},
function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},Aa=function(a){return function(b){var c=[fa(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,
!1)&&c.push(ha(b));return c}},oa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return fa(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*d),c.y+(null!=b?b:c.height/8))},function(a,b,c){this.state.style[mxConstants.STYLE_ARCSIZE]=
@ -2478,36 +2478,36 @@ parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFA
!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},process:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[fa(a,["size"],function(a){var b=
Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",la.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",
e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,
mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},internalStorage:function(a){var b=[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),
c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",K.prototype.dx))),
c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",K.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));
mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},internalStorage:function(a){var b=[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),
c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Q.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),
c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[fa(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",da.prototype.dy)));
return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ja(1),doubleArrow:ja(.5),folder:function(a){return[fa(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",
g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[fa(a,["size"],
function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=
Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ra(y.prototype.size,!0),hexagon:ra(x.prototype.size,!0,.5),curlyBracket:ra(q.prototype.size,!1),display:ra(ma.prototype.size,!1),cube:va(1,
a.prototype.size,!1),card:va(.5,k.prototype.size,!0),loopLimit:va(.5,ca.prototype.size,!0),trapezoid:Aa(.5),parallelogram:Aa(1)};Graph.createHandle=fa;Graph.handleFactory=wa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=wa[this.state.style.shape];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ra(y.prototype.size,!0),hexagon:ra(x.prototype.size,!0,.5),curlyBracket:ra(q.prototype.size,!1),display:ra(ma.prototype.size,!1),cube:va(1,
a.prototype.size,!1),card:va(.5,k.prototype.size,!0),loopLimit:va(.5,ba.prototype.size,!0),trapezoid:Aa(.5),parallelogram:Aa(1)};Graph.createHandle=fa;Graph.handleFactory=wa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=wa[this.state.style.shape];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
wa[this.state.style.shape];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sa=new mxPoint(1,0),ta=new mxPoint(1,0),ja=mxUtils.toRadians(-30),sa=mxUtils.getRotatedPoint(sa,Math.cos(ja),Math.sin(ja)),ja=mxUtils.toRadians(-150),ta=mxUtils.getRotatedPoint(ta,Math.cos(ja),Math.sin(ja));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,
d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=sa.x,m=sa.y,n=ta.x,p=ta.y,q="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){a=function(a,b,c){a-=r.x;var d=b-r.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);q?(c&&(r=new mxPoint(r.x+l*b,r.y+m*b),e.push(r)),r=new mxPoint(r.x+n*a,r.y+p*a)):(c&&(r=new mxPoint(r.x+n*a,r.y+p*a),e.push(r)),r=new mxPoint(r.x+l*b,r.y+m*b));e.push(r)};
var r=g;null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Fa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Fa.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),
new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;
O.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=
mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;
N.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;P.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=
mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,
1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,
.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];y.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!1),new mxConnectionConstraint(new mxPoint(.2,.5),!1),new mxConnectionConstraint(new mxPoint(.1,.75),!1),new mxConnectionConstraint(new mxPoint(.9,.25),!1),
new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.9,.75),!1)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;
new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.9,.75),!1)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;
mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!1),new mxConnectionConstraint(new mxPoint(.875,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!1),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];n.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;da.prototype.constraints=null;K.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];G.prototype.constraints=null;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,
.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;da.prototype.constraints=null;ca.prototype.constraints=null;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];G.prototype.constraints=null;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();
function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,c=b.editor,d=c.graph,e=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())});this.addAction("open...",
function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a),e=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,e);var f=e.getChildren(e.getChildAt(e.getRoot(),0));c.graph.setSelectionCells(c.graph.importCells(f))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
@ -2663,18 +2663,18 @@ d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null
g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,
a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",
mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var x=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var z=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),v=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",
E.style.marginRight="2px",E.style.marginTop="-2px",l.insertBefore(E,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,
function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(z.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=z.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",
!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);v(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),H=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),
c=z.view.getBounds(b),d=z.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=z.view.translate.x;c.y-=z.view.translate.y;F(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",
z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=
!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,
"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,
0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;F(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var r=JSON.parse(mxUtils.getTextContent(c.documentElement));
f(r,k);b=b.concat(r);v(a);this.spinner.stop();p=!0}catch(D){}else if("mxfile"==c.documentElement.nodeName)try{r=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),q=this.stringToCells(this.editor.graph.decompress(r)),F(q,new mxRectangle(0,0,m,n),a),p=!0}catch(D){}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),
k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var z=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),v=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=F&&null!=F.parentNode&&F.parentNode.removeChild(F),F=m.cloneNode(!1),F.setAttribute("src",Editor.spinImage),F.setAttribute("title",mxResources.get("saving")),F.style.cursor="default",
F.style.marginRight="2px",F.style.marginTop="-2px",l.insertBefore(F,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=F&&null!=F.parentNode&&(F.parentNode.removeChild(F),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,
function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=z.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,
c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);v(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),H=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
z.getSelectionCells(),c=z.view.getBounds(b),d=z.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=z.view.translate.x;c.y-=z.view.translate.y;E(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",
k.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),
z.isMouseDown=!1,z.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;E(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var r=JSON.parse(mxUtils.getTextContent(c.documentElement));
f(r,k);b=b.concat(r);v(a);this.spinner.stop();p=!0}catch(D){}else if("mxfile"==c.documentElement.nodeName)try{r=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),q=this.stringToCells(this.editor.graph.decompress(r)),E(q,new mxRectangle(0,0,m,n),a),p=!0}catch(D){}p||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),
mxEvent.addListener(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",A);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&A(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);
m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var E=null;mxEvent.addListener(m,
m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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://support.draw.io/questions/10420280");mxEvent.consume(a)})),l.insertBefore(c,l.firstChild));var F=null;mxEvent.addListener(m,
"click",H)}g.appendChild(l);g.style.paddingRight=18*l.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=740>=screen.height?5:46,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())};
@ -2708,26 +2708,26 @@ d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=pars
function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value",
"url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),
l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),z=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var A=document.createElement("input");
A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(e,mxResources.get("allPages"),g,!g),H=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom=
"16px";mxEvent.addListener(E,"change",function(){E.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,z.checked,A.value,n.getTarget(),n.getColor(),v.checked,F.checked,H.checked,E.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(e,mxResources.get("allPages"),g,!g),H=this.addCheckbox(e,mxResources.get("layers"),!0),F=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom=
"16px";mxEvent.addListener(F,"change",function(){F.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,z.checked,A.value,n.getTarget(),n.getColor(),v.checked,E.checked,H.checked,F.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");
m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft=
"12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",g.appendChild(p),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom=
"10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var v=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var F=null;if(null==l||l.constructor!=window.DriveFile||b)F=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var H=this.addCheckbox(g,mxResources.get("lightbox"),!0),E=this.addCheckbox(g,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=E.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(H,
"change",function(){H.checked?(C.removeAttribute("disabled"),E.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.getTarget(),v.getColor(),null==F?!0:F.checked,H.checked,E.checked,C.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
"10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var v=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var E=null;if(null==l||l.constructor!=window.DriveFile||b)E=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var H=this.addCheckbox(g,mxResources.get("lightbox"),!0),F=this.addCheckbox(g,mxResources.get("showEditButton"),!0);F.style.marginLeft="24px";var C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=F.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(H,
"change",function(){H.checked?(C.removeAttribute("disabled"),F.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.getTarget(),v.getColor(),null==E?!0:E.checked,H.checked,F.checked,C.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
p.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(f);var g=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,
mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";g.appendChild(n);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";g.appendChild(p);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),
k.background==mxConstants.NONE||null==k.background),v=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.setAttribute("type","checkbox");f&&(g.appendChild(F),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?F.setAttribute("disabled","disabled"):(F.setAttribute("checked","checked"),F.defaultChecked=!0);var H=this.addCheckbox(g,mxResources.get("shadow"),
k.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(g.appendChild(E),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var C=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var B=B=this.addCheckbox(g,mxResources.get("allPages"),a,!a);B.style.marginLeft="24px";
B.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!v.checked,H.checked,C.checked,E.checked,p.value,F.checked,!B.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=
k.background==mxConstants.NONE||null==k.background),v=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");f&&(g.appendChild(E),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?E.setAttribute("disabled","disabled"):(E.setAttribute("checked","checked"),E.defaultChecked=!0);var H=this.addCheckbox(g,mxResources.get("shadow"),
k.shadowVisible),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||F.setAttribute("disabled","disabled");b&&(g.appendChild(F),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var C=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var B=B=this.addCheckbox(g,mxResources.get("allPages"),a,!a);B.style.marginLeft="24px";
B.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!v.checked,H.checked,C.checked,F.checked,p.value,E.checked,!B.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=
function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";
c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));
mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var y=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!k.checked,y.checked,g.value,l.checked)}),
null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var l=
this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var v=1<g.model.getChildCount(g.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),v,!v);F.style.marginLeft=A.style.marginLeft;F.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(v&&
F.removeAttribute("disabled"),A.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,A.checked,F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var v=1<g.model.getChildCount(g.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),v,!v);E.style.marginLeft=A.style.marginLeft;E.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(v&&
E.removeAttribute("disabled"),A.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,A.checked,E.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=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");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.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()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
@ -2742,8 +2742,8 @@ e&&e(C)}}),c,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new
c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};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 f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var k=mxUtils.parseXml(a),l=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var m=l.getElementsByTagName("diagram");if(1==m.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){g.model.beginUpdate();try{for(var n=0;n<m.length;n++){var p=this.updatePageRoot(new DiagramPage(m[n])),
A=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,p,p,A))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var v=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,v);var F=v.getChildCount(v.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<F;n++){var H=v.getChildAt(v.getRoot(),n);if(1!=F||g.isCellLocked(g.getDefaultParent()))H=g.importCells([H],0,0,g.model.getRoot(),
null,a)[0],E=g.model.getChildren(H),g.moveCells(E,b,c),f=f.concat(E);else var E=v.getChildren(H),f=f.concat(g.importCells(E,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var C=g.getBoundingBoxFromGeometry(f,!0);null!=C&&g.moveCells(f,b-C.x,c-C.y)}}finally{g.model.endUpdate()}}}}catch(B){throw e||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
A=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,p,p,A))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var v=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,v);var E=v.getChildCount(v.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<E;n++){var H=v.getChildAt(v.getRoot(),n);if(1!=E||g.isCellLocked(g.getDefaultParent()))H=g.importCells([H],0,0,g.model.getRoot(),
null,a)[0],F=g.model.getChildren(H),g.moveCells(F,b,c),f=f.concat(F);else var F=v.getChildren(H),f=f.concat(g.importCells(F,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var C=g.getBoundingBoxFromGeometry(f,!0);null!=C&&g.moveCells(f,b-C.x,c-C.y)}}finally{g.model.endUpdate()}}}}catch(B){throw e||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
b,c,d)}catch(q){}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("/js/diagramly/Extensions.js",e):mxscript("/js/extensions.min.js",e))};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,
26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(x){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
@ -2759,11 +2759,11 @@ b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&6
b,c,d,e,f,g,l,m,k,z)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,p=n,q=[],r=mxUtils.bind(this,function(a,b){q[a]=b;if(0==--p){this.spinner.stop();if(null!=t)t(q);else{var c=[];l.getModel().beginUpdate();try{for(var d=0;d<q.length;d++){var e=q[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),G=0;G<n;G++)mxUtils.bind(this,function(f){var k=a[f],l=new FileReader;l.onload=
mxUtils.bind(this,function(a){if(null==g||g(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var l=a.target.result,n=l.indexOf(","),p=atob(l.substring(n+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],t=z?null:p.getAttribute("content");null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==
t.substring(0,14)?r(f,mxUtils.bind(this,function(){try{if(l.substring(0,n+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var g=a[0],p=parseFloat(g.getAttribute("width")),r=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox","0 0 "+p+" "+r);else if(isNaN(p)||isNaN(r)){var y=t.split(" ");3<y.length&&(p=parseFloat(y[2]),r=parseFloat(y[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var u=Math.min(1,Math.min(d/Math.max(1,
p)),d/Math.max(1,r));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*u)),Math.max(1,Math.round(r*u)),k.name)}}}catch(P){}return null})):r(f,mxUtils.bind(this,function(){return e(t,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var v=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var B=new Image;B.src=a.target.result;r(f,mxUtils.bind(this,function(){return e(v,"text/xml",b+f*m,c+f*m,B.width,B.height,k.name)}));p=!0}}p||(null!=window.chrome&&
p)),d/Math.max(1,r));return e(l,k.type,b+f*m,c+f*m,Math.max(1,Math.round(p*u)),Math.max(1,Math.round(r*u)),k.name)}}}catch(O){}return null})):r(f,mxUtils.bind(this,function(){return e(t,"text/xml",b+f*m,c+f*m,0,0,k.name)}))}}else{p=!1;if("image/png"==k.type){var v=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var B=new Image;B.src=a.target.result;r(f,mxUtils.bind(this,function(){return e(v,"text/xml",b+f*m,c+f*m,B.width,B.height,k.name)}));p=!0}}p||(null!=window.chrome&&
null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,l,n){r(f,mxUtils.bind(this,function(){if(null!=g&&g.length<y){var p=u&&this.isResampleImage(a.target.result)?
Math.min(1,Math.min(d/l,d/n)):1;return e(g,k.type,b+f*m,c+f*m,Math.round(l*p),Math.round(n*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),u,d,x)})))}else e(a.target.result,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)?e(null,k.type,b+f*m,c+f*m,240,160,k.name,function(a){r(f,function(){return a})},k):"image"==k.type.substring(0,5)?l.readAsDataURL(k):l.readAsText(k)})(G)};EditorUi.prototype.parseFile=
function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1<l){var m=
Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var q=p.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=m;v.height=n;var F=v.toDataURL();q!==F&&(b=q,g=m,k=n)}}}catch(H){}c(b,g,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=
Math.round(g/l),n=Math.round(k/l),p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var q=p.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=m;v.height=n;var E=v.toDataURL();q!==E&&(b=q,g=m,k=n)}}}catch(H){}c(b,g,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=
EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,
10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var m=g(a);if("IDAT"==f(a,4)){e=a.substring(0,l-8);m=4294967295;m=this.updateCRC(m,b,0,4);m=this.updateCRC(m,d,0,d.length);e+=k(c.length+d.length+1+("zTXt"==b?1:0))+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+k(m^4294967295);e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+m);d=f(a,m);f(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&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&
@ -2810,7 +2810,7 @@ mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this
try{m.init()}catch(B){g.postMessage(JSON.stringify({event:"draft",error:B.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,
function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxResources.get(l.messageKey)):null!=l.message&&this.editor.setStatus(l.message);null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==
l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var r=this.editor.graph;if(null!=this.pages&&this.currentPage!=
this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),t=r.getGlobalVariable,E=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container);
this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),t=r.getGlobalVariable,F=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?F.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(r.container);r.model.setRoot(F.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container);
q(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200<=a.getStatus()&&299>=a.getStatus()&&q(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");
if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";
if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
@ -2822,14 +2822,14 @@ b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged"
a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" (Ctrl+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),
mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight=
"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),
null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",k=40,u=40,y=0,x=this.editor.graph;x.getGraphBounds();for(var z=function(){x.setSelectionCells(da);x.scrollCellToVisible(x.getSelectionCell())},A=x.getFreeInsertPoint(),v=A.x,F=A.y,A=F,H=null,E="auto",C=[],B=null,G=null,I=0;I<b.length&&
"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var N=a.indexOf(":");if(0<N){var J=mxUtils.trim(a.substring(1,N)),U=mxUtils.trim(a.substring(N+1));"label"==J?H=x.sanitizeHtml(U):"style"==J?e=U:"width"==J?f=U:"height"==J?g=U:"ignore"==J?G=U.split(","):"connect"==J?C.push(JSON.parse(U)):"link"==J?B=U:"padding"==J?y=parseFloat(U):"edgespacing"==J?k=parseFloat(U):"nodespacing"==
J?u=parseFloat(U):"layout"==J&&(E=U)}}}var R=this.editor.csvToArray(b[I]);null==H&&(H="%"+R[0]+"%");if(null!=C)for(var V=0;V<C.length;V++)null==d[C[V].to]&&(d[C[V].to]={});x.model.beginUpdate();try{for(a=I+1;a<b.length;a++){var X=this.editor.csvToArray(b[a]);if(X.length==R.length){var D=new mxCell(H,new mxGeometry(v,A,0,0),e||"whiteSpace=wrap;html=1;");D.vertex=!0;for(var W=0;W<X.length;W++)x.setAttributeForCell(D,R[W],X[W]);x.setAttributeForCell(D,"placeholders","1");D.style=x.replacePlaceholders(D,
D.style);for(V=0;V<C.length;V++)d[C[V].to][D.getAttribute(C[V].to)]=D;null!=B&&"link"!=B&&(x.setLinkForCell(D,D.getAttribute(B)),x.setAttributeForCell(D,B,null));var aa=this.editor.graph.getPreferredSizeForCell(D);D.geometry.width="auto"==f?aa.width+y:parseFloat(f);D.geometry.height="auto"==g?aa.height+y:parseFloat(g);A+=D.geometry.height+u;c.push(x.addCell(D))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var K=c.slice(),da=c.slice(),V=0;V<C.length;V++){var M=C[V];for(a=
0;a<c.length;a++){var D=c[a],L=D.getAttribute(M.from);if(null!=L){x.setAttributeForCell(D,M.from,null);for(var O=L.split(","),W=0;W<O.length;W++){var T=d[M.to][O[W]];null!=T&&(da.push(x.insertEdge(null,null,M.label||"",M.invert?T:D,M.invert?D:T,M.style||x.createCurrentEdgeStyle())),mxUtils.remove(M.invert?D:T,K))}}}}if(null!=G)for(a=0;a<c.length;a++)for(D=c[a],W=0;W<G.length;W++)x.setAttributeForCell(D,mxUtils.trim(G[W]),null);var ba=new mxParallelEdgeLayout(x);ba.spacing=k;var ca=function(){ba.execute(x.getDefaultParent());
for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==f&&(b.width=Math.round(x.snap(b.width)));"auto"==g&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==E){var P=new mxCircleLayout(x);P.resetEdges=!1;var Y=P.isVertexIgnored;P.isVertexIgnored=function(a){return Y.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){P.execute(x.getDefaultParent());ca()},!0,z);z=null}else if("horizontaltree"==E||"verticaltree"==
E||"auto"==E&&da.length==2*c.length-1&&1==K.length){x.view.validate();var Z=new mxCompactTreeLayout(x,"horizontaltree"==E);Z.levelDistance=u;Z.edgeRouting=!1;this.executeLayout(function(){Z.execute(x.getDefaultParent(),0<K.length?K[0]:null)},!0,z);z=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==K.length){x.view.validate();var Q=new mxHierarchicalLayout(x,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Q.intraCellSpacing=u;this.executeLayout(function(){Q.execute(x.getDefaultParent(),
da);x.moveCells(da,v,F)},!0,z);z=null}else if("organic"==E||"auto"==E&&da.length>c.length){x.view.validate();var S=new mxFastOrganicLayout(x);S.forceConstant=3*u;S.resetEdges=!1;var ga=S.isVertexIgnored;S.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ba=new mxParallelEdgeLayout(x);ba.spacing=k;this.executeLayout(function(){S.execute(x.getDefaultParent());ca()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(ea){this.handleError(ea)}};
null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",k=40,u=40,y=0,x=this.editor.graph;x.getGraphBounds();for(var z=function(){x.setSelectionCells(da);x.scrollCellToVisible(x.getSelectionCell())},A=x.getFreeInsertPoint(),v=A.x,E=A.y,A=E,H=null,F="auto",C=[],B=null,G=null,I=0;I<b.length&&
"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var M=a.indexOf(":");if(0<M){var J=mxUtils.trim(a.substring(1,M)),U=mxUtils.trim(a.substring(M+1));"label"==J?H=x.sanitizeHtml(U):"style"==J?e=U:"width"==J?f=U:"height"==J?g=U:"ignore"==J?G=U.split(","):"connect"==J?C.push(JSON.parse(U)):"link"==J?B=U:"padding"==J?y=parseFloat(U):"edgespacing"==J?k=parseFloat(U):"nodespacing"==
J?u=parseFloat(U):"layout"==J&&(F=U)}}}var R=this.editor.csvToArray(b[I]);null==H&&(H="%"+R[0]+"%");if(null!=C)for(var V=0;V<C.length;V++)null==d[C[V].to]&&(d[C[V].to]={});x.model.beginUpdate();try{for(a=I+1;a<b.length;a++){var X=this.editor.csvToArray(b[a]);if(X.length==R.length){var D=new mxCell(H,new mxGeometry(v,A,0,0),e||"whiteSpace=wrap;html=1;");D.vertex=!0;for(var W=0;W<X.length;W++)x.setAttributeForCell(D,R[W],X[W]);x.setAttributeForCell(D,"placeholders","1");D.style=x.replacePlaceholders(D,
D.style);for(V=0;V<C.length;V++)d[C[V].to][D.getAttribute(C[V].to)]=D;null!=B&&"link"!=B&&(x.setLinkForCell(D,D.getAttribute(B)),x.setAttributeForCell(D,B,null));var Q=this.editor.graph.getPreferredSizeForCell(D);D.geometry.width="auto"==f?Q.width+y:parseFloat(f);D.geometry.height="auto"==g?Q.height+y:parseFloat(g);A+=D.geometry.height+u;c.push(x.addCell(D))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var ca=c.slice(),da=c.slice(),V=0;V<C.length;V++){var L=C[V];for(a=0;a<
c.length;a++){var D=c[a],K=D.getAttribute(L.from);if(null!=K){x.setAttributeForCell(D,L.from,null);for(var N=K.split(","),W=0;W<N.length;W++){var T=d[L.to][N[W]];null!=T&&(da.push(x.insertEdge(null,null,L.label||"",L.invert?T:D,L.invert?D:T,L.style||x.createCurrentEdgeStyle())),mxUtils.remove(L.invert?D:T,ca))}}}}if(null!=G)for(a=0;a<c.length;a++)for(D=c[a],W=0;W<G.length;W++)x.setAttributeForCell(D,mxUtils.trim(G[W]),null);var aa=new mxParallelEdgeLayout(x);aa.spacing=k;var ba=function(){aa.execute(x.getDefaultParent());
for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==f&&(b.width=Math.round(x.snap(b.width)));"auto"==g&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==F){var O=new mxCircleLayout(x);O.resetEdges=!1;var Y=O.isVertexIgnored;O.isVertexIgnored=function(a){return Y.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){O.execute(x.getDefaultParent());ba()},!0,z);z=null}else if("horizontaltree"==F||"verticaltree"==
F||"auto"==F&&da.length==2*c.length-1&&1==ca.length){x.view.validate();var Z=new mxCompactTreeLayout(x,"horizontaltree"==F);Z.levelDistance=u;Z.edgeRouting=!1;this.executeLayout(function(){Z.execute(x.getDefaultParent(),0<ca.length?ca[0]:null)},!0,z);z=null}else if("horizontalflow"==F||"verticalflow"==F||"auto"==F&&1==ca.length){x.view.validate();var P=new mxHierarchicalLayout(x,"horizontalflow"==F?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);P.intraCellSpacing=u;this.executeLayout(function(){P.execute(x.getDefaultParent(),
da);x.moveCells(da,v,E)},!0,z);z=null}else if("organic"==F||"auto"==F&&da.length>c.length){x.view.validate();var S=new mxFastOrganicLayout(x);S.forceConstant=3*u;S.resetEdges=!1;var ga=S.isVertexIgnored;S.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(x);aa.spacing=k;this.executeLayout(function(){S.execute(x.getDefaultParent());ba()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(ea){this.handleError(ea)}};
EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};var f=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=f.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)&&
@ -2920,9 +2920,9 @@ Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,
p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=v.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");A.addListener(mxEvent.CHANGE,function(){v.style.display=1<A.getChildCount(A.root)?"inline-block":"none"});v.style.display=1<A.getChildCount(A.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
(t=this.graphConfig["toolbar-buttons"][t],null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(m=b.ownerDocument.createElement("div"),m.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",m.setAttribute("title",this.graphConfig.title),mxUtils.write(m,
this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var F=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==F&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
p=null),b.style.border=F)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var E=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
p=null),b.style.border=E)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,function(c){null!=b&&(c=mxEvent.getSource(c).getAttribute("href"),null==c||a.isExternalProtocol(c)||a.isBlankLink(c)||b.destroy())},mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(){if("open"==this.graphConfig.lightbox||window.self!==window.top){var a=this.layersEnabled?"&layers=1":"";if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,c=mxUtils.bind(this,function(a){"ready"==a.data&&a.source==b&&(b.postMessage(this.xml,"*"),mxEvent.removeListener(window,"message",c))});mxEvent.addListener(window,"message",c);b=window.open("https://www.draw.io/?client=1&lightbox=1&close=1&edit=_blank"+
a)}else window.drawdata=this.xml,window.open("https://www.draw.io/?client=1&lightbox=1&edit=_blank"+a)}else this.showLocalLightbox()};
@ -2940,6 +2940,6 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,c){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=c;d.send()}};GraphViewer.resizeSensorEnabled=!0;
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(c,d){function e(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function f(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function g(b,c){if(!b.resizedAttached)b.resizedAttached=
new e,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
b.appendChild(b.resizeSensor);"static"==f(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],g=d.childNodes[0],k=b.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,F,H,E=function(){if((F=b.offsetWidth)!=p||(H=b.offsetHeight)!=q)m=!0,p=F,q=H;l()},C=function(a,b,c){a.attachEvent?
a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",E);C(k,"scroll",E)}var k=function(){GraphViewer.resizeSensorEnabled&&d()},l=Object.prototype.toString.call(c),m="[object Array]"===l||"[object NodeList]"===l||"[object HTMLCollection]"===l||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(m)for(var l=0,n=c.length;l<n;l++)g(c[l],k);else g(c,k);this.detach=function(){if(m)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};
b.appendChild(b.resizeSensor);"static"==f(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],g=d.childNodes[0],k=b.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,E,H,F=function(){if((E=b.offsetWidth)!=p||(H=b.offsetHeight)!=q)m=!0,p=E,q=H;l()},C=function(a,b,c){a.attachEvent?
a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",F);C(k,"scroll",F)}var k=function(){GraphViewer.resizeSensorEnabled&&d()},l=Object.prototype.toString.call(c),m="[object Array]"===l||"[object NodeList]"===l||"[object HTMLCollection]"===l||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(m)for(var l=0,n=c.length;l<n;l++)g(c[l],k);else g(c,k);this.detach=function(){if(m)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();(function(){Editor.initMath();GraphViewer.initCss();mxStencilRegistry.dynamicLoading=!1;if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();