6.9.7 release

Former-commit-id: 7ca0792fbd
This commit is contained in:
David Benson 2017-07-31 12:04:39 +01:00
parent ed3626e423
commit 7246634bb0
25 changed files with 420 additions and 370 deletions

View file

@ -1,3 +1,8 @@
27-JUL-2017: 6.9.7
- Adds links to reviews in free add-ons
- Fixes preview in PlantUML add-on
26-JUL-2017: 6.9.6
- Switches to Google Cloud SDK

View file

@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/jgraph/drawio.png?branch=master)](https://travis-ci.org/jgraph/drawio)
[![Build Status](https://travis-ci.org/jgraph/drawio.png?branch=master)](https://travis-ci.org/jgraph/draw.io)
About
-----

View file

@ -1 +1 @@
6.9.6
6.9.7

View file

@ -20,6 +20,8 @@ public class ArrowMapping
public Boolean fill;
int arrowSize = 6; //6 is the default arrow size
public ArrowStyle(String name, boolean fill)
{
super();
@ -27,11 +29,19 @@ public class ArrowMapping
this.fill = fill;
}
public ArrowStyle(String name, boolean fill, int arrowSize)
{
super();
this.name = name;
this.fill = fill;
this.arrowSize = arrowSize;
}
public String toString(boolean start)
{
int intFill = fill ? 1 : 0;
return start ? "startArrow=" + name + ";startFill=" + intFill
: "endArrow=" + name + ";endFill=" + intFill;
return start ? "startArrow=" + name + ";startFill=" + intFill + ";startSize=" + arrowSize
: "endArrow=" + name + ";endFill=" + intFill + ";endSize=" + arrowSize;
}
}
@ -45,22 +55,22 @@ public class ArrowMapping
mapping.put(1, new ArrowStyle(mxConstants.ARROW_OPEN, false));
mapping.put(2, new ArrowStyle(mxConstants.ARROW_BLOCK, true));
mapping.put(3, new ArrowStyle(mxConstants.ARROW_BLOCK, false));
mapping.put(4, new ArrowStyle(mxConstants.ARROW_BLOCK, false));
mapping.put(5, new ArrowStyle(mxConstants.ARROW_DIAMOND, false));
mapping.put(6, new ArrowStyle(mxConstants.ARROW_CLASSIC, false));
mapping.put(7, new ArrowStyle(mxConstants.ARROW_DIAMOND, true));
mapping.put(4, new ArrowStyle(mxConstants.ARROW_BLOCK, false, 10));
mapping.put(5, new ArrowStyle(mxConstants.ARROW_DIAMOND, false, 12));
mapping.put(6, new ArrowStyle(mxConstants.ARROW_OPEN, false, 10));
mapping.put(7, new ArrowStyle(mxConstants.ARROW_DIAMOND, true, 12));
mapping.put(8, new ArrowStyle(mxConstants.ARROW_CLASSIC, true));
mapping.put(9, new ArrowStyle("ERzeroToMany", true));
mapping.put(10, new ArrowStyle("ERoneToMany", true));
mapping.put(11, new ArrowStyle("ERmandOne", true));
mapping.put(12, new ArrowStyle("ERone", true));
mapping.put(13, new ArrowStyle("ERzeroToOne", true));
mapping.put(14, new ArrowStyle("ERmany", true));
mapping.put(15, new ArrowStyle(mxConstants.ARROW_OVAL, false));
mapping.put(16, new ArrowStyle(mxConstants.ARROW_OVAL, true));
mapping.put(9, new ArrowStyle("ERzeroToMany", true, 10));
mapping.put(10, new ArrowStyle("ERoneToMany", true, 10));
mapping.put(11, new ArrowStyle("ERmandOne", true, 10));
mapping.put(12, new ArrowStyle("ERone", true, 10));
mapping.put(13, new ArrowStyle("ERzeroToOne", true, 10));
mapping.put(14, new ArrowStyle("ERmany", true, 10));
mapping.put(15, new ArrowStyle(mxConstants.ARROW_OVAL, false, 10));
mapping.put(16, new ArrowStyle("dash", false));
mapping.put(17, new ArrowStyle(mxConstants.ARROW_BLOCK, true));
mapping.put(18, new ArrowStyle(mxConstants.ARROW_CLASSIC, true));
mapping.put(19, new ArrowStyle(mxConstants.ARROW_CLASSIC, true));
mapping.put(19, new ArrowStyle("openAsync", false, 10));
}
public static ArrowStyle get(Integer gliffyId)

View file

@ -79,6 +79,11 @@ public class GliffyDiagramConverter
vertices = new LinkedHashMap<Integer, GliffyObject>();
this.diagramString = gliffyDiagramString;
drawioDiagram = new mxGraphHeadless();
//Disable parent (groups) auto extend feature as it miss with the coordinates of vsdx format
drawioDiagram.setExtendParents(false);
drawioDiagram.setExtendParentsOnAdd(false);
drawioDiagram.setConstrainChildren(false);
start();
}
@ -334,7 +339,7 @@ public class GliffyDiagramConverter
StringBuilder style = new StringBuilder();
mxGeometry geometry = new mxGeometry((int) gliffyObject.x, (int) gliffyObject.y, (int) gliffyObject.width, (int) gliffyObject.height);
mxGeometry geometry = new mxGeometry(gliffyObject.x, gliffyObject.y, gliffyObject.width, gliffyObject.height);
cell.setGeometry(geometry);
GliffyObject textObject = null;
@ -367,8 +372,13 @@ public class GliffyDiagramConverter
style.append("shadow=" + (shape.dropShadow ? 1 : 0)).append(";");
if(style.lastIndexOf("strokeWidth") == -1)
{
style.append("strokeWidth=" + shape.strokeWidth).append(";");
if (shape.strokeWidth == 0)
style.append("strokeColor=none;");
}
if(style.lastIndexOf("fillColor") == -1)
{
style.append("fillColor=" + shape.fillColor).append(";");
@ -418,7 +428,7 @@ public class GliffyDiagramConverter
{
textObject = gliffyObject;
cell.setVertex(true);
style.append("text;whiteSpace=wrap;html=1;nl2Br=0;");
style.append("text;html=1;nl2Br=0;");
cell.setValue(gliffyObject.getText());
//if text is a child of a cell, use relative geometry and set X and Y to 0
@ -479,14 +489,9 @@ public class GliffyDiagramConverter
style.append("shadow=" + (shape.dropShadow ? 1 : 0)).append(";");
style.append("fillColor=" + shape.fillColor).append(";");
style.append("strokeColor=" + shape.strokeColor).append(";");
style.append("startSize=" + header.height).append(";");
style.append("whiteSpace=wrap;");
double rads = Math.toRadians(gliffyObject.rotation);
mxPoint pivot = new mxPoint(gliffyObject.width/ 2, gliffyObject.height / 2);
double cos = Math.cos(rads);
double sin = Math.sin(rads);
mxPoint baseP = Utils.getRotatedPoint(new mxPoint(0, 0), cos, sin, pivot);
for (int i = 1; i < gliffyObject.children.size(); i++) // rest of the children are lanes
{
GliffyObject gLane = gliffyObject.children.get(i);
@ -499,26 +504,25 @@ public class GliffyDiagramConverter
laneStyle.append("shadow=" + (gs.dropShadow ? 1 : 0)).append(";");
laneStyle.append("fillColor=" + gs.fillColor).append(";");
laneStyle.append("strokeColor=" + gs.strokeColor).append(";");
laneStyle.append("whiteSpace=wrap;html=1;");
laneStyle.append("whiteSpace=wrap;html=1;fontStyle=0;");
mxGeometry childGeometry = null;
mxGeometry childGeometry = new mxGeometry(gLane.x, gLane.y, gLane.width, gLane.height);
if(gliffyObject.rotation != 0)
{
laneStyle.append("rotation=" + gliffyObject.rotation).append(";");
mxPoint pointAbs = new mxPoint(gLane.x, gLane.y );
pointAbs = Utils.getRotatedPoint(pointAbs, cos, sin, pivot);
childGeometry = new mxGeometry(pointAbs.getX() - baseP.getX(), pointAbs.getY() - baseP.getY(), gLane.width, gLane.height);
}
else
{
childGeometry = new mxGeometry(gLane.x, gLane.y, gLane.width, gLane.height);
Utils.rotatedGeometry(childGeometry, gliffyObject.rotation, gliffyObject.width/ 2, gliffyObject.height / 2);
}
mxCell mxLane = new mxCell();
mxLane.setVertex(true);
cell.insert(mxLane);
mxLane.setValue(gLane.children.get(0).getText());
GliffyObject laneTxt = gLane.children.get(0);
mxLane.setValue(laneTxt.getText());
laneStyle.append(laneTxt.graphic.getText().getStyle());
//for debugging, add gliffy id to the output in the style
laneStyle.append("gliffyId=" + gLane.id + ";");
mxLane.setStyle(laneStyle.toString());
mxLane.setGeometry(childGeometry);
@ -583,7 +587,7 @@ public class GliffyDiagramConverter
if (textObject != null)
{
style.append("html=1;nl2Br=0;whiteSpace=wrap;");
style.append("html=1;nl2Br=0;");
if(!gliffyObject.isLine())
{
@ -605,6 +609,9 @@ public class GliffyDiagramConverter
}
}
//for debugging, add gliffy id to the output in the style
style.append("gliffyId=" + gliffyObject.id + ";");
cell.setStyle(style.toString());
gliffyObject.mxObject = cell;

View file

@ -55,9 +55,10 @@ com.gliffy.shape.flowchart.flowchart_v1.default.delay=delay
com.gliffy.shape.flowchart.flowchart_v1.default.start_end=mxgraph.flowchart.terminator
com.gliffy.shape.flowchart.flowchart_v1.default.connector=ellipse;perimeter=ellipsePerimeter
com.gliffy.shape.flowchart.flowchart_v1.default.off_page_connector=offPageConnector;size=0.3
com.gliffy.shape.flowchart.flowchart_v1.default.left_arrow=mxgraph.arrows2.arrow;dy=0.65;dx=8.29;flipH=1;notch=0
com.gliffy.shape.flowchart.flowchart_v1.default.right_arrow=mxgraph.arrows2.arrow;dy=0.65;dx=8.29;notch=0
com.gliffy.shape.flowchart.flowchart_v1.default.double_arrow=mxgraph.arrows2.twoWayArrow;dy=0.65;dx=8.29;
# TODO Arrows Dy/Dx are dynamic in Gliffy
com.gliffy.shape.flowchart.flowchart_v1.default.left_arrow=mxgraph.arrows2.arrow;dy=0.65;dx=25;flipH=1;notch=0
com.gliffy.shape.flowchart.flowchart_v1.default.right_arrow=mxgraph.arrows2.arrow;dy=0.65;dx=25;notch=0
com.gliffy.shape.flowchart.flowchart_v1.default.double_arrow=mxgraph.arrows2.twoWayArrow;dy=0.65;dx=25;
#
# FLOWCHART V2
@ -90,14 +91,14 @@ com.gliffy.shape.flowchart.flowchart_v2.default.double_arrow=mxgraph.arrows2.two
#
# SWIMLANES
#
com.gliffy.shape.swimlanes.swimlanes_v1.default.vertical_single_lane_pool=swimlane
com.gliffy.shape.swimlanes.swimlanes_v1.default.horizontal_single_lane_pool=swimlane
com.gliffy.shape.swimlanes.swimlanes_v1.default.vertical_double_lane_pool=swimlane
com.gliffy.shape.swimlanes.swimlanes_v1.default.horizontal_double_lane_pool=swimlane
com.gliffy.shape.swimlanes.swimlanes_v1.default.vertical_triple_lane_pool=swimlane
com.gliffy.shape.swimlanes.swimlanes_v1.default.horizontal_triple_lane_pool=swimlane
com.gliffy.shape.swimlanes.swimlanes_v1.default.vertical_four_lane_pool=swimlane
com.gliffy.shape.swimlanes.swimlanes_v1.default.horizontal_four_lane_pool=swimlane
com.gliffy.shape.swimlanes.swimlanes_v1.default.vertical_single_lane_pool=swimlane;fontStyle=0
com.gliffy.shape.swimlanes.swimlanes_v1.default.horizontal_single_lane_pool=swimlane;fontStyle=0
com.gliffy.shape.swimlanes.swimlanes_v1.default.vertical_double_lane_pool=swimlane;fontStyle=0
com.gliffy.shape.swimlanes.swimlanes_v1.default.horizontal_double_lane_pool=swimlane;fontStyle=0
com.gliffy.shape.swimlanes.swimlanes_v1.default.vertical_triple_lane_pool=swimlane;fontStyle=0
com.gliffy.shape.swimlanes.swimlanes_v1.default.horizontal_triple_lane_pool=swimlane;fontStyle=0
com.gliffy.shape.swimlanes.swimlanes_v1.default.vertical_four_lane_pool=swimlane;fontStyle=0
com.gliffy.shape.swimlanes.swimlanes_v1.default.horizontal_four_lane_pool=swimlane;fontStyle=0
#
# UML v2
#
@ -302,31 +303,31 @@ com.gliffy.shape.erd.erd_v1.default.many_optional_many_mandatory=edgeStyle=ortho
# BPMN v1
#
# BPMN v1 EVENTS
com.gliffy.shape.bpmn.bpmn_v1.events.general_start=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=standard;symbol=general
com.gliffy.shape.bpmn.bpmn_v1.events.general_intermediate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=throwing;symbol=general
com.gliffy.shape.bpmn.bpmn_v1.events.general_end=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=end;symbol=general
com.gliffy.shape.bpmn.bpmn_v1.events.message_start=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=standard;symbol=message
com.gliffy.shape.bpmn.bpmn_v1.events.message_intermediate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=catching;symbol=message
com.gliffy.shape.bpmn.bpmn_v1.events.message_end=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=end;symbol=message
com.gliffy.shape.bpmn.bpmn_v1.events.timer_start=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=standard;symbol=timer
com.gliffy.shape.bpmn.bpmn_v1.events.timer_intermediate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=catching;symbol=timer
com.gliffy.shape.bpmn.bpmn_v1.events.cancel_intermediate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=boundInt;symbol=cancel
com.gliffy.shape.bpmn.bpmn_v1.events.cancel_end=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=end;symbol=cancel
com.gliffy.shape.bpmn.bpmn_v1.events.terminate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=end;symbol=terminate
com.gliffy.shape.bpmn.bpmn_v1.events.link_start=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=standard;symbol=link
com.gliffy.shape.bpmn.bpmn_v1.events.link_intermediate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=throwing;symbol=link
com.gliffy.shape.bpmn.bpmn_v1.events.link_end=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=end;symbol=link
com.gliffy.shape.bpmn.bpmn_v1.events.error_intermediate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=boundInt;symbol=error
com.gliffy.shape.bpmn.bpmn_v1.events.error_end=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=end;symbol=error
com.gliffy.shape.bpmn.bpmn_v1.events.compensation_intermediate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=throwing;symbol=compensation
com.gliffy.shape.bpmn.bpmn_v1.events.compensation_end=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=end;symbol=compensation
com.gliffy.shape.bpmn.bpmn_v1.events.rule_start=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=standard;symbol=conditional
com.gliffy.shape.bpmn.bpmn_v1.events.rule_intermediate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=catching;symbol=conditional
com.gliffy.shape.bpmn.bpmn_v1.events.multiple_start=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=standard;symbol=multiple
com.gliffy.shape.bpmn.bpmn_v1.events.multiple_intermediate=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=throwing;symbol=multiple
com.gliffy.shape.bpmn.bpmn_v1.events.multiple_end=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=ellipsePerimeter;outline=end;symbol=multiple
com.gliffy.shape.bpmn.bpmn_v1.events.general_start=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=standard;symbol=general
com.gliffy.shape.bpmn.bpmn_v1.events.general_intermediate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=throwing;symbol=general
com.gliffy.shape.bpmn.bpmn_v1.events.general_end=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=end;symbol=general
com.gliffy.shape.bpmn.bpmn_v1.events.message_start=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=standard;symbol=message
com.gliffy.shape.bpmn.bpmn_v1.events.message_intermediate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=catching;symbol=message
com.gliffy.shape.bpmn.bpmn_v1.events.message_end=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=end;symbol=message
com.gliffy.shape.bpmn.bpmn_v1.events.timer_start=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=standard;symbol=timer
com.gliffy.shape.bpmn.bpmn_v1.events.timer_intermediate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=catching;symbol=timer
com.gliffy.shape.bpmn.bpmn_v1.events.cancel_intermediate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=boundInt;symbol=cancel
com.gliffy.shape.bpmn.bpmn_v1.events.cancel_end=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=end;symbol=cancel
com.gliffy.shape.bpmn.bpmn_v1.events.terminate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=end;symbol=terminate
com.gliffy.shape.bpmn.bpmn_v1.events.link_start=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=standard;symbol=link
com.gliffy.shape.bpmn.bpmn_v1.events.link_intermediate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=throwing;symbol=link
com.gliffy.shape.bpmn.bpmn_v1.events.link_end=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=end;symbol=link
com.gliffy.shape.bpmn.bpmn_v1.events.error_intermediate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=boundInt;symbol=error
com.gliffy.shape.bpmn.bpmn_v1.events.error_end=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=end;symbol=error
com.gliffy.shape.bpmn.bpmn_v1.events.compensation_intermediate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=throwing;symbol=compensation
com.gliffy.shape.bpmn.bpmn_v1.events.compensation_end=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=end;symbol=compensation
com.gliffy.shape.bpmn.bpmn_v1.events.rule_start=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=standard;symbol=conditional
com.gliffy.shape.bpmn.bpmn_v1.events.rule_intermediate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=catching;symbol=conditional
com.gliffy.shape.bpmn.bpmn_v1.events.multiple_start=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=standard;symbol=multiple
com.gliffy.shape.bpmn.bpmn_v1.events.multiple_intermediate=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=throwing;symbol=multiple
com.gliffy.shape.bpmn.bpmn_v1.events.multiple_end=mxgraph.bpmn.shape;perimeter=ellipsePerimeter;outline=end;symbol=multiple
# BPMN v1 ACTIVITIES
com.gliffy.shape.bpmn.bpmn_v1.activities.multiple_instances=mxgraph.ios7.icons.pause;verticalLabelPosition=bottom;verticalAlign=top;fillColor=#000000
com.gliffy.shape.bpmn.bpmn_v1.activities.multiple_instances=mxgraph.ios7.icons.pause;fillColor=#000000
com.gliffy.shape.bpmn.bpmn_v1.activities.compensation=mxgraph.bpmn.compensation;html=1;fillColor=#000000;verticalLabelPosition=bottom;verticalAlign=top
com.gliffy.shape.bpmn.bpmn_v1.activities.ad_hoc=mxgraph.bpmn.ad_hoc;fillColor=#000000;verticalLabelPosition=bottom;verticalAlign=top
com.gliffy.shape.bpmn.bpmn_v1.activities.looping=mxgraph.bpmn.loop;verticalLabelPosition=bottom;verticalAlign=top
@ -338,14 +339,14 @@ com.gliffy.shape.bpmn.bpmn_v1.activities.task=ext;rounded=1
# BPMN v1 DATA ARTIFACTS
com.gliffy.shape.bpmn.bpmn_v1.data_artifacts.annotation=mxgraph.flowchart.annotation_1;strokeWidth=2;html=1
com.gliffy.shape.bpmn.bpmn_v1.data_artifacts.data_object=note;size=25
com.gliffy.shape.bpmn.bpmn_v1.data_artifacts.group=rect;dashed=1
com.gliffy.shape.bpmn.bpmn_v1.data_artifacts.group=rect;dashed=1;fillColor=none;dashPattern=8 3 2 3
# BPMN v1 GATEWAYS
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway=rhombus
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_xor_data=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=exclusiveGw
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_and=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=parallelGw
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_xor_event=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=throwing;symbol=multiple
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_complex=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=complexGw
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_or=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=end;symbol=general
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_xor_data=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=exclusiveGw
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_and=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=parallelGw
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_xor_event=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;outline=throwing;symbol=multiple
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_complex=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=complexGw
com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_or=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;outline=end;symbol=general
# BPMN v1 CONNECTORS
com.gliffy.shape.bpmn.bpmn_v1.connectors.normal_sequence_flow=edgeStyle=orthogonalEdgeStyle;dashed=1
com.gliffy.shape.bpmn.bpmn_v1.connectors.message_flow=edgeStyle=orthogonalEdgeStyle

View file

@ -163,7 +163,10 @@ public class GliffyObject implements PostDeserializable
}
else
{
return child.getTextObject();
GliffyObject txtObj = child.getTextObject();
if (txtObj != null)
return txtObj;
}
}

View file

@ -33,6 +33,8 @@ public class GliffyText implements PostDeserializer.PostDeserializable
public Integer linePerpValue;
public String overflow;
private static Pattern pattern = Pattern.compile("<p(.*?)<\\/p>");
private static Pattern textAlign = Pattern.compile(".*(text-align: ?(left|center|right);).*", Pattern.DOTALL);
@ -61,6 +63,9 @@ public class GliffyText implements PostDeserializer.PostDeserializable
{
StringBuilder sb = new StringBuilder();
//I hate magic numbers, but -7 seams to fix all text top padding when valign is not middle
int topPaddingShift = 7;
//vertical label position
if (vposition.equals("above"))
{
@ -75,6 +80,9 @@ public class GliffyText implements PostDeserializer.PostDeserializable
else if (vposition.equals("none"))
{
sb.append("verticalAlign=").append(valign).append(";");
if ("middle".equals(valign))
topPaddingShift = 0;
}
if (hposition.equals("left"))
@ -97,9 +105,13 @@ public class GliffyText implements PostDeserializer.PostDeserializable
sb.append("spacingLeft=").append(paddingLeft).append(";");
sb.append("spacingRight=").append(paddingRight).append(";");
sb.append("spacingTop=").append(paddingTop).append(";");
sb.append("spacingTop=").append(paddingTop - topPaddingShift).append(";");
sb.append("spacingBottom=").append(paddingBottom).append(";");
//We should wrap only if overflow is none. (TODO better support left & right overflow)
if ("none".equals(overflow))
sb.append("whiteSpace=wrap;");
return sb.toString();
}

View file

@ -802,28 +802,12 @@ public class mxVsdxCodec
for (int i = 0; i < group.getChildCount(); i++)
{
mxICell child = group.getChildAt(i);
rotatedPoint(child.getGeometry(), rotation, hw, hh);
Utils.rotatedGeometry(child.getGeometry(), rotation, hw, hh);
}
}
return group;
}
public static void rotatedPoint(mxGeometry geo, double rotation,
double cx, double cy)
{
rotation = Math.toRadians(rotation);
double cos = Math.cos(rotation), sin = Math.sin(rotation);
double x = geo.getCenterX() - cx;
double y = geo.getCenterY() - cy;
double x1 = x * cos - y * sin;
double y1 = y * cos + x * sin;
geo.setX(Math.round(x1 + cx - geo.getWidth() / 2));
geo.setY(Math.round(y1 + cy - geo.getHeight() / 2));
}
public static void rotatedEdgePoint(mxPoint pt, double rotation,
double cx, double cy)
{

View file

@ -2449,7 +2449,7 @@ public class VsdxShape extends Shape
mxGeometry tmpGeo = new mxGeometry(x, y, txtWV, txtHV);
mxGeometry pgeo = parent.getGeometry();
double hw = pgeo.getWidth() / 2, hh = pgeo.getHeight() / 2;
mxVsdxCodec.rotatedPoint(tmpGeo, rotation, hw, hh);
Utils.rotatedGeometry(tmpGeo, rotation, hw, hh);
x = tmpGeo.getX();
y = tmpGeo.getY();
}

View file

@ -17,6 +17,7 @@ import java.util.zip.Deflater;
import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;
import com.mxgraph.model.mxGeometry;
import com.mxgraph.util.mxPoint;
/**
@ -200,4 +201,22 @@ public class Utils
return new mxPoint(x1 + c.getX(), y1 + c.getY());
}
/**
* Rotates the given geometry (in place) by the given rotation (in degrees).
*/
public static void rotatedGeometry(mxGeometry geo, double rotation,
double cx, double cy)
{
rotation = Math.toRadians(rotation);
double cos = Math.cos(rotation), sin = Math.sin(rotation);
double x = geo.getCenterX() - cx;
double y = geo.getCenterY() - cy;
double x1 = x * cos - y * sin;
double y1 = y * cos + x * sin;
geo.setX(Math.round(x1 + cx - geo.getWidth() / 2));
geo.setY(Math.round(y1 + cy - geo.getHeight() / 2));
}
}

3
war/META-INF/MANIFEST.MF Normal file
View file

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

View file

@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 07/26/2017 10:36 AM
# 07/27/2017 12:50 PM
app.html
index.html?offline=1

View file

@ -394,7 +394,7 @@
<img border="0" width="24" height="24" src="images/glyphicons_google.png" alt="draw.io on Google+"/>
</a>
&nbsp;
<a href="https://github.com/jgraph/draw.io" title="draw.io on GitHub" target="_blank">
<a href="https://github.com/jgraph/drawio" title="draw.io on GitHub" target="_blank">
<img border="0" width="24" height="24" src="images/glyphicons_github.png" alt="draw.io on GitHub"/>
</a>
</div>

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

@ -2005,7 +2005,7 @@ null!=d&&(a=d.style[mxConstants.STYLE_FONTFAMILY]||a,c=d.style[mxConstants.STYLE
mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);
mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));b.addListener("gridSizeChanged",
mxUtils.bind(this,function(){b.isGridEnabled()&&b.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;
EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?110:200;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?118:208;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
var c=a.setDefaultParent,d=this;this.editor.graph.setDefaultParent=function(){c.apply(this,arguments);d.updateActionStates()};a.editLink=d.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var c=this.editor.graph;9==a.which&&c.isEnabled()&&!mxEvent.isAltDown(a)&&(c.isEditing()?c.stopEditing(!1):c.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
EditorUi.prototype.onKeyPress=function(a){var c=this.editor.graph;!this.isImmediateEditingEvent(a)||c.isEditing()||c.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(c.escape(),c.startEditing(),mxClient.IS_FF&&(c=c.cellEditor,c.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(c.textarea),a.collapse(!1),c=window.getSelection(),c.removeAllRanges(),c.addRange(a)))};
@ -5866,10 +5866,10 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
StorageFile.prototype.saveFile=function(a,b,c,d){if(this.isEditable()){var f=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=c&&c()}))}catch(g){null!=d&&d(g)}});this.isRenamable()&&"."==a.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt",
[a]),f,d):f()}))}else null!=c&&c()};StorageFile.prototype.rename=function(a,b,c){var d=this.getTitle();this.title=a;this.hasSameExtension(d,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){d!=a&&this.ui.removeLocalData(d,b)}),c)};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,b,c){StorageFile.call(this,a,b,c)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,b,c){this.saveFile(a,!1,b,c)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(a,b,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,c){StorageFile.call(this,a,b,c);a=c;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,c){return!1};UrlLibrary.prototype.saveAs=function(a,b,c){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,c){function d(d,e,f,g,q,k){function v(){mxEvent.addListener(u,"click",null!=k?k:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,l.checked);b()})):(a.setMode(f,l.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var u=document.createElement("a");u.style.overflow="hidden";u.style.display=
mxClient.IS_QUIRKS?"inline":"inline-block";u.className="geBaseButton";u.style.fontSize="11px";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 10px 12px 10px";u.style.width="68px";u.style.height="80px";u.style.whiteSpace="nowrap";u.setAttribute("title",e);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");var x=document.createElement("div");x.style.textOverflow="ellipsis";x.style.overflow="hidden";if(null!=d){var p=document.createElement("img");p.setAttribute("src",
d);p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.style.paddingBottom="6px";u.appendChild(p)}else x.style.paddingTop="5px",x.style.whiteSpace="normal",mxClient.IS_IOS&&(u.style.padding="0px 10px 20px 10px",u.style.top="6px");u.appendChild(x);mxUtils.write(x,e);if(null!=q)for(d=0;d<q.length;d++)mxUtils.br(x),mxUtils.write(x,q[d]);if(null!=g&&null==a[g]){p.style.visibility="hidden";mxUtils.setOpacity(x,10);var t=new Spinner({lines:12,length:12,
width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(u);var w=window.setTimeout(function(){null==a[g]&&(t.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(w),mxUtils.setOpacity(x,100),p.style.visibility="",t.stop(),v(),"drive"==g&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else v();h.appendChild(u);++m>=c&&(mxUtils.br(h),m=0)}c=null!=c?c:3;var f=document.createElement("div");
StorageLibrary.prototype.isRenamable=function(a,b,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,c){StorageFile.call(this,a,b,c);a=c;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,c){return!1};UrlLibrary.prototype.saveAs=function(a,b,c){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,c){function d(d,e,f,g,q,p){function v(){mxEvent.addListener(u,"click",null!=p?p:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,l.checked);b()})):(a.setMode(f,l.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var u=document.createElement("a");u.style.overflow="hidden";u.style.display=
mxClient.IS_QUIRKS?"inline":"inline-block";u.className="geBaseButton";u.style.fontSize="11px";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 10px 12px 10px";u.style.width="68px";u.style.height="80px";u.style.whiteSpace="nowrap";u.setAttribute("title",e);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");var x=document.createElement("div");x.style.textOverflow="ellipsis";x.style.overflow="hidden";if(null!=d){var k=document.createElement("img");k.setAttribute("src",
d);k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="60px";k.style.height="60px";k.style.paddingBottom="6px";u.appendChild(k)}else x.style.paddingTop="5px",x.style.whiteSpace="normal",mxClient.IS_IOS&&(u.style.padding="0px 10px 20px 10px",u.style.top="6px");u.appendChild(x);mxUtils.write(x,e);if(null!=q)for(d=0;d<q.length;d++)mxUtils.br(x),mxUtils.write(x,q[d]);if(null!=g&&null==a[g]){k.style.visibility="hidden";mxUtils.setOpacity(x,10);var t=new Spinner({lines:12,length:12,
width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(u);var w=window.setTimeout(function(){null==a[g]&&(t.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(w),mxUtils.setOpacity(x,100),k.style.visibility="",t.stop(),v(),"drive"==g&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else v();h.appendChild(u);++m>=c&&(mxUtils.br(h),m=0)}c=null!=c?c:3;var f=document.createElement("div");
f.style.textAlign="center";f.style.whiteSpace="nowrap";f.style.paddingTop="0px";f.style.paddingBottom="20px";var g=a.addLanguageMenu(f);null!=g&&(g.style.bottom="28px");if(!a.isOffline()&&1<a.getServiceCount()){g=document.createElement("a");g.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");g.setAttribute("title",mxResources.get("help"));g.setAttribute("target","_blank");g.style.position="absolute";g.style.textDecoration="none";g.style.cursor="pointer";g.style.fontSize=
"12px";g.style.bottom="28px";g.style.left="26px";g.style.color="gray";var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";g.appendChild(k);mxUtils.write(g,mxResources.get("help"));f.appendChild(g)}var e=document.createElement("div");e.style.position="absolute";e.style.cursor="pointer";e.style.fontSize="12px";e.style.bottom="28px";e.style.color="gray";mxUtils.write(e,mxResources.get("decideLater"));
a.isOfflineApp()?e.style.right="20px":(mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0)"),e.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)e.style.marginLeft=-Math.round(e.clientWidth/2)+"px"};f.appendChild(e);mxEvent.addListener(e,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var h=document.createElement("div");mxClient.IS_QUIRKS&&(h.style.whiteSpace=
@ -5933,12 +5933,12 @@ l.className="geBtn";a.editor.cancelFirst&&d.appendChild(l);if(!a.isOffline()&&"u
a.movePickersToTop()});m.className="geBtn";d.appendChild(m);null!=a.drive&&"1"==urlParams.photos&&(m=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),m.className="geBtn",d.appendChild(m))}m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=f.value?new mxImage(mxUtils.trim(f.value),e.value,h.value):null)});m.className="geBtn gePrimaryBtn";d.appendChild(m);a.editor.cancelFirst||d.appendChild(l);c.appendChild(d);this.container=c},ParseDialog=function(a,b){function c(b,c){var d=b.split("\n");if("plantUmlPng"==
c||"plantUmlSvg"==c){var d="plantUmlPng"==c?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",e=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var h=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},l=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=h(c1&63);r+=h(c2&63);r+=h(c3&63);return r+=
h(c4&63)},m=new XMLHttpRequest;m.open("GET",d+function(a){r="";for(n=0;n<a.length;n+=3)r=n+2==a.length?r+l(a.charCodeAt(n),a.charCodeAt(n+1),0):n+1==a.length?r+l(a.charCodeAt(n),0,0):r+l(a.charCodeAt(n),a.charCodeAt(n+1),a.charCodeAt(n+2));return r}(e.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);m.responseType="blob";m.onload=function(c){200<=this.status&&300>this.status?(c=new FileReader,c.readAsDataURL(this.response),c.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();
e.getModel().beginUpdate();try{cell=e.insertVertex(null,null,b,f.x,f.y,d.width,d.height,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{e.getModel().endUpdate()}e.setSelectionCell(cell);e.scrollCellToVisible(e.getSelectionCell())};d.src=c.target.result},c.onerror=function(b){a.handleError(b)}):(a.spinner.stop(),a.handleError(c))};m.onerror=function(b){a.handleError(b)};m.send()}}else if("list"==c){if(0<d.length){var e=a.editor.graph,
g=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");g.vertex=!0;m=e.getPreferredSizeForCell(g);null!=m&&g.geometry.width<m.width+10&&(g.geometry.width=m.width+10);if(1<d.length)for(var n=1;n<d.length;n++)if("--"==d[n])m=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
m.vertex=!0,g.geometry.height+=m.geometry.height,g.insert(m);else if(0<d[n].length&&";"!=d[n].charAt(0)){var k=new mxCell(d[n],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");k.vertex=!0;m=e.getPreferredSizeForCell(k);null!=m&&k.geometry.width<m.width&&(k.geometry.width=m.width);g.geometry.width=Math.max(g.geometry.width,k.geometry.width);g.geometry.height+=
k.geometry.height;g.insert(k)}e.setSelectionCells(e.importCells([g],f.x,f.y));e.scrollCellToVisible(e.getSelectionCell())}}else{for(var k=function(a){var b=t[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30)),b.vertex=!0,t[a]=b,z.push(b));return b},t={},z=[],n=0;n<d.length;n++)if(";"!=d[n].charAt(0)){var B=d[n].split("->");if(2==B.length){var A=k(B[0]),B=k(B[1]),F=new mxCell("",new mxGeometry);F.edge=!0;A.insertEdge(F,!0);B.insertEdge(F,!1);z.push(F)}}if(0<z.length){d=document.createElement("div");
d.style.visibility="hidden";document.body.appendChild(d);e=new Graph(d);e.getModel().beginUpdate();try{z=e.importCells(z);for(n=0;n<z.length;n++)e.getModel().isVertex(z[n])&&(m=e.getPreferredSizeForCell(z[n]),z[n].geometry.width=Math.max(z[n].geometry.width,m.width),z[n].geometry.height=Math.max(z[n].geometry.height,m.height));g=new mxFastOrganicLayout(e);g.disableEdgeStyle=!1;g.forceConstant=120;g.execute(e.getDefaultParent())}finally{e.getModel().endUpdate()}e.clearCellOverlays();a.editor.graph.setSelectionCells(a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),
h(c4&63)},g=new XMLHttpRequest;g.open("GET",d+function(a){r="";for(n=0;n<a.length;n+=3)r=n+2==a.length?r+l(a.charCodeAt(n),a.charCodeAt(n+1),0):n+1==a.length?r+l(a.charCodeAt(n),0,0):r+l(a.charCodeAt(n),a.charCodeAt(n+1),a.charCodeAt(n+2));return r}(e.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);g.responseType="blob";g.onload=function(c){200<=this.status&&300>this.status?(c=new FileReader,c.readAsDataURL(this.response),c.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();
e.getModel().beginUpdate();try{cell=e.insertVertex(null,null,b,f.x,f.y,d.width,d.height,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{e.getModel().endUpdate()}e.setSelectionCell(cell);e.scrollCellToVisible(e.getSelectionCell())};d.src=c.target.result},c.onerror=function(b){a.handleError(b)}):(a.spinner.stop(),a.handleError(c))};g.onerror=function(b){a.handleError(b)};g.send()}}else if("list"==c){if(0<d.length){var e=a.editor.graph,
m=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");m.vertex=!0;g=e.getPreferredSizeForCell(m);null!=g&&m.geometry.width<g.width+10&&(m.geometry.width=g.width+10);if(1<d.length)for(var n=1;n<d.length;n++)if("--"==d[n])g=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
g.vertex=!0,m.geometry.height+=g.geometry.height,m.insert(g);else if(0<d[n].length&&";"!=d[n].charAt(0)){var k=new mxCell(d[n],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");k.vertex=!0;g=e.getPreferredSizeForCell(k);null!=g&&k.geometry.width<g.width&&(k.geometry.width=g.width);m.geometry.width=Math.max(m.geometry.width,k.geometry.width);m.geometry.height+=
k.geometry.height;m.insert(k)}e.setSelectionCells(e.importCells([m],f.x,f.y));e.scrollCellToVisible(e.getSelectionCell())}}else{for(var k=function(a){var b=t[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30)),b.vertex=!0,t[a]=b,z.push(b));return b},t={},z=[],n=0;n<d.length;n++)if(";"!=d[n].charAt(0)){var B=d[n].split("->");if(2==B.length){var A=k(B[0]),B=k(B[1]),F=new mxCell("",new mxGeometry);F.edge=!0;A.insertEdge(F,!0);B.insertEdge(F,!1);z.push(F)}}if(0<z.length){d=document.createElement("div");
d.style.visibility="hidden";document.body.appendChild(d);e=new Graph(d);e.getModel().beginUpdate();try{z=e.importCells(z);for(n=0;n<z.length;n++)e.getModel().isVertex(z[n])&&(g=e.getPreferredSizeForCell(z[n]),z[n].geometry.width=Math.max(z[n].geometry.width,g.width),z[n].geometry.height=Math.max(z[n].geometry.height,g.height));m=new mxFastOrganicLayout(e);m.disableEdgeStyle=!1;m.forceConstant=120;m.execute(e.getDefaultParent())}finally{e.getModel().endUpdate()}e.clearCellOverlays();a.editor.graph.setSelectionCells(a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),
f.x,f.y));a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());e.destroy();d.parentNode.removeChild(d)}}}function d(){return"list"==e.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"plantUmlPng"==e.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
"plantUmlSvg"==e.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->c\nc->a\n"}var f=a.editor.graph.getFreeInsertPoint(),g=document.createElement("div");g.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height="354px";k.style.marginBottom=
"16px";var e=document.createElement("select"),h=document.createElement("option");h.setAttribute("value","list");h.setAttribute("selected","selected");mxUtils.write(h,mxResources.get("list"));e.appendChild(h);h=document.createElement("option");h.setAttribute("value","diagram");mxUtils.write(h,mxResources.get("diagram"));e.appendChild(h);h=document.createElement("option");h.setAttribute("value","plantUmlSvg");mxUtils.write(h,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var l=document.createElement("option");
@ -5958,8 +5958,8 @@ tooltip:a.getAttribute("url")})}}a=a.nextSibling}e()}})}mxEvent.addListener(n,"k
function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});z.className="geBtn";l.appendChild(z)}b||"1"==urlParams.embed||(b=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(n.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},
mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),b.className="geBtn",l.appendChild(b));l.appendChild(v);a.editor.cancelFirst||null!=d||l.appendChild(m);h.appendChild(l);this.container=h},CreateDialog=function(a,b,c,d,f,g,k,e,h,l,m,n){function t(c,d,e,h){function l(){mxEvent.addListener(f,"click",function(){var c=e;if(k){var d=u.value,h=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>h){var c=null!=c?c:y.value,l="";c==App.MODE_GOOGLE?l=a.drive.extension:c==App.MODE_GITHUB?l=
a.gitHub.extension:c==App.MODE_DROPBOX?l=a.dropbox.extension:c==App.MODE_ONEDRIVE?l=a.oneDrive.extension:c==App.MODE_DEVICE&&(l=".xml");0<=h&&(d=d.substring(0,h));u.value=d+l}}p(e)})}var f=document.createElement("a");f.style.overflow="hidden";var v=document.createElement("img");v.src=c;v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width="60px";v.style.height="60px";v.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";
f.style.position="relative";f.style.margin="4px";f.style.padding="8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(v);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var m=document.createElement("div");f.appendChild(m);mxUtils.write(m,d);if(null!=h&&null==a[h]){v.style.visibility="hidden";mxUtils.setOpacity(m,10);var g=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,
top:"40%",zIndex:2E9});g.spin(f);var q=window.setTimeout(function(){null==a[h]&&(g.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(q),mxUtils.setOpacity(m,100),v.style.visibility="",g.stop(),l())}))}else l();x.appendChild(f);++w==n&&(mxUtils.br(x),w=0)}function p(b){var d=u.value;if(null==b||null!=d&&0<d.length)a.hideDialog(),c(d,b)}k=null!=k?k:!0;e=null!=e?e:!0;n=null!=n?n:3;var q=document.createElement("div");null==
f.style.position="relative";f.style.margin="4px";f.style.padding="8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(v);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var g=document.createElement("div");f.appendChild(g);mxUtils.write(g,d);if(null!=h&&null==a[h]){v.style.visibility="hidden";mxUtils.setOpacity(g,10);var m=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,
top:"40%",zIndex:2E9});m.spin(f);var q=window.setTimeout(function(){null==a[h]&&(m.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(q),mxUtils.setOpacity(g,100),v.style.visibility="",m.stop(),l())}))}else l();x.appendChild(f);++w==n&&(mxUtils.br(x),w=0)}function p(b){var d=u.value;if(null==b||null!=d&&0<d.length)a.hideDialog(),c(d,b)}k=null!=k?k:!0;e=null!=e?e:!0;n=null!=n?n:3;var q=document.createElement("div");null==
d&&a.addLanguageMenu(q);var v=document.createElement("h2");mxUtils.write(v,f||mxResources.get("create"));v.style.marginTop="0px";v.style.marginBottom="24px";q.appendChild(v);mxUtils.write(q,mxResources.get("filename")+":");var u=document.createElement("input");u.setAttribute("value",b);u.style.width="280px";u.style.marginLeft="10px";u.style.marginBottom="20px";this.init=function(){u.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,
null)};q.appendChild(u);mxUtils.br(q);var x=document.createElement("div");x.style.textAlign="center";var w=0;x.style.marginTop="6px";q.appendChild(x);var y=document.createElement("select");y.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(f,mxResources.get("googleDrive")),y.appendChild(f),t(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
"drive")),null!=a.gitHub&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITHUB),mxUtils.write(f,mxResources.get("github")),y.appendChild(f),t(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.DropboxClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(f,mxResources.get("dropbox")),y.appendChild(f),a.mode==App.MODE_DROPBOX&&f.setAttribute("selected","selected"),t(IMAGE_PATH+
@ -6027,9 +6027,9 @@ b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);c=mxUtils.bu
"6px";u.style.display="none";d=mxUtils.button(g||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.width="640px";g.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");
if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(u,"change",function(a){t=parseInt(u.value);c(p[t]);mxEvent.consume(a)});if("mxfile"==n.nodeName){var d=n.getElementsByTagName("diagram");p=[];for(var e=0;e<d.length;e++)p.push(d[e]);0<p.length&&
c(p[t]);if(1<p.length)for(u.style.display="",e=0;e<p.length;e++)d=document.createElement("option"),mxUtils.write(d,p[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==t&&d.setAttribute("selected","selected"),u.appendChild(d)}else b(n)};k.appendChild(u);k.appendChild(b);k.appendChild(c);k.appendChild(v);k.appendChild(h);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className="geBtn";a.editor.cancelFirst?(g.appendChild(b),g.appendChild(f),
g.appendChild(d)):(g.appendChild(d),g.appendChild(f),g.appendChild(b));e.appendChild(g);e.appendChild(k);this.container=e},FindWindow=function(a,b,c,d,f){function g(){var a=e.model.getDescendants(e.model.getRoot()),b=n.value.toLowerCase(),c=t.checked?new RegExp(b):null,d=null;h!=b&&(h=b,l=null);var f=null==l;if(e.isEnabled()&&0<b.length)for(var m=0;m<a.length;m++){var g=e.view.getState(a[m]);if(null!=g&&null!=g.cell.value&&(f||null==d)&&(e.model.isVertex(g.cell)||e.model.isEdge(g.cell))){e.isHtmlLabel(g.cell)?
(p.innerHTML=e.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([p])):label=e.getLabel(g.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var k;if(!(k=null==c&&label.substring(0,b.length)===b)&&(k=null!=c)&&!(k=c.test(label)))a:{k=c;var q=g.cell;if("object"===typeof q.value&&null!=q.value.attributes)for(var q=q.value.attributes,A=0;A<q.length;A++)if("label"!=q[A].nodeName&&k.test(q[A].nodeValue.toLowerCase())){k=!0;break a}k=!1}if(k)if(f){d=g;break}else null==
d&&(d=g)}f=f||g==l}null!=d?(l=d,e.setSelectionCell(l.cell),e.scrollCellToVisible(l.cell)):e.clearSelection();return!e.isEnabled()||0==b.length||null!=d}var k=a.actions.get("find"),e=a.editor.graph,h=null,l=null,m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var n=document.createElement("input");n.setAttribute("placeholder",mxResources.get("find"));n.setAttribute("type","text");n.style.marginTop="4px";n.style.marginBottom=
g.appendChild(d)):(g.appendChild(d),g.appendChild(f),g.appendChild(b));e.appendChild(g);e.appendChild(k);this.container=e},FindWindow=function(a,b,c,d,f){function g(){var a=e.model.getDescendants(e.model.getRoot()),b=n.value.toLowerCase(),c=t.checked?new RegExp(b):null,d=null;h!=b&&(h=b,l=null);var f=null==l;if(e.isEnabled()&&0<b.length)for(var g=0;g<a.length;g++){var m=e.view.getState(a[g]);if(null!=m&&null!=m.cell.value&&(f||null==d)&&(e.model.isVertex(m.cell)||e.model.isEdge(m.cell))){e.isHtmlLabel(m.cell)?
(p.innerHTML=e.getLabel(m.cell),label=mxUtils.extractTextWithWhitespace([p])):label=e.getLabel(m.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var k;if(!(k=null==c&&label.substring(0,b.length)===b)&&(k=null!=c)&&!(k=c.test(label)))a:{k=c;var q=m.cell;if("object"===typeof q.value&&null!=q.value.attributes)for(var q=q.value.attributes,A=0;A<q.length;A++)if("label"!=q[A].nodeName&&k.test(q[A].nodeValue.toLowerCase())){k=!0;break a}k=!1}if(k)if(f){d=m;break}else null==
d&&(d=m)}f=f||m==l}null!=d?(l=d,e.setSelectionCell(l.cell),e.scrollCellToVisible(l.cell)):e.clearSelection();return!e.isEnabled()||0==b.length||null!=d}var k=a.actions.get("find"),e=a.editor.graph,h=null,l=null,m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var n=document.createElement("input");n.setAttribute("placeholder",mxResources.get("find"));n.setAttribute("type","text");n.style.marginTop="4px";n.style.marginBottom=
"6px";n.style.width="170px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";m.appendChild(n);var t=document.createElement("input");t.setAttribute("type","checkbox");m.appendChild(t);mxUtils.write(m,mxResources.get("regularExpression"));var p=document.createElement("div");mxUtils.br(m);var q=mxUtils.button(mxResources.get("reset"),function(){n.value="";n.style.backgroundColor="";h=l=null;n.focus()});q.setAttribute("title",mxResources.get("reset"));q.style.marginTop="6px";q.style.marginRight=
"4px";q.style.backgroundColor="#f5f5f5";q.style.backgroundImage="none";q.className="geBtn";m.appendChild(q);q=mxUtils.button(mxResources.get("find"),function(){try{n.style.backgroundColor=g()?"":"#ffcfcf"}catch(v){a.handleError(v)}});q.setAttribute("title",mxResources.get("find")+" (Enter)");q.style.marginTop="6px";q.style.backgroundColor="#4d90fe";q.style.backgroundImage="none";q.className="geBtn gePrimaryBtn";m.appendChild(q);mxEvent.addListener(n,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);
else if(27==a.keyCode)k.funct();else if(h!=n.value.toLowerCase()||13==a.keyCode)try{n.style.backgroundColor=g()?"":"#ffcfcf"}catch(u){n.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(m,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(k.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),m,b,c,d,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
@ -6158,7 +6158,7 @@ L=document.createElement("tr"),N=L.cloneNode(!0),Q=document.createElement("td"),
mxResources.get("fitToSheetsAcross"));W.appendChild(l);mxUtils.write(P,mxResources.get("fitToBy"));var R=O.cloneNode(!0);Y.appendChild(R);mxEvent.addListener(O,"focus",function(){K.checked=!0});mxEvent.addListener(R,"focus",function(){K.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));U.appendChild(l);L.appendChild(Q);L.appendChild(J);L.appendChild(W);N.appendChild(P);N.appendChild(Y);N.appendChild(U);T.appendChild(L);T.appendChild(N);p.appendChild(T);
m.appendChild(p);h.appendChild(m);m=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));m.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var V=PageSetupDialog.addPageFormatPanel(l,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));m.appendChild(l);
var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","100 %");S.style.width="60px";m.appendChild(S);h.appendChild(m);l=document.createElement("div");l.style.cssText="text-align:right;margin:62px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&l.appendChild(m);a.isOffline()||(p=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),
p.className="geBtn",l.appendChild(p));PrintDialog.previewEnabled&&(p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),p.className="geBtn",l.appendChild(p));p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});p.className="geBtn gePrimaryBtn";l.appendChild(p);a.editor.cancelFirst||l.appendChild(m);h.appendChild(l);this.container=h}})();(function(){EditorUi.VERSION="6.9.6";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;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=
p.className="geBtn",l.appendChild(p));PrintDialog.previewEnabled&&(p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),p.className="geBtn",l.appendChild(p));p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});p.className="geBtn gePrimaryBtn";l.appendChild(p);a.editor.cancelFirst||l.appendChild(m);h.appendChild(l);this.container=h}})();(function(){EditorUi.VERSION="6.9.7";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;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.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
null!=c&&6<c.length}catch(n){}};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(m){}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(m){}})();
@ -6732,7 +6732,7 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+
"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.timeout=25E3;"1"!=urlParams.embed&&(App.prototype.menubarHeight=60);App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.basicAds=['<a title="'+mxResources.get("loveIt",["draw.io"])+'" target="_blank" href="https://twitter.com/intent/tweet?text='+encodeURIComponent(mxResources.get("loveIt",["www.draw.io"]))+'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-280)/3)+\',height=280,width=640\');return false;"\'><img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="'+
Editor.tweetImage+'"/>'+mxResources.get("loveIt",["draw.io"])+"</a>",'<a title="HTML5 JavaScript Diagramming" target="_blank" href="https://github.com/jgraph/draw.io"><img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="images/glyphicons_github.png"/>Fork us on GitHub</a>','<a title="'+mxResources.get("loveIt",["draw.io"])+'" target="_blank" href="https://www.facebook.com/sharer.php?u='+encodeURIComponent("https://www.draw.io")+'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-520)/3)+\',height=520,width=640\');return false;"\'><img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="'+
Editor.tweetImage+'"/>'+mxResources.get("loveIt",["draw.io"])+"</a>",'<a title="'+mxResources.get("loveIt",["draw.io"])+'" target="_blank" href="https://www.facebook.com/sharer.php?u='+encodeURIComponent("https://www.draw.io")+'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-520)/3)+\',height=520,width=640\');return false;"\'><img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="'+
Editor.facebookImage+'"/>'+mxResources.get("loveIt",["draw.io"])+"</a>",'<a title="draw.io Offline App" href="https://www.draw.io/app" target="_blank"><img border="0" align="absmiddle" style="margin-top:-1px;padding-right:8px;" src="images/download.png"/>draw.io Offline App</a>'];this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",
mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=
a)});a()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var b=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));
@ -6742,10 +6742,11 @@ mxResources.get("loveIt",["draw.io"])+"</a>",'<a title="Google Docs Add-on" href
(gapi.load("auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){"function"===
typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=c)});c()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility=
"hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();var d=document.getElementById("geFooterItem2");if(null!=d){this.basicAds.push(d.innerHTML);this.adsHtml=this.basicAds;mxUtils.setPrefixedStyle(d.style,"transition",
"all 1s ease");var f=this.adsHtml.length-1,g=null;this.updateAd=function(a){1==this.adsHtml.length&&window.clearInterval(g);0==this.adsHtml.length?null!=d.parentNode&&d.parentNode.removeChild(d):(a==f&&a++,mxUtils.setPrefixedStyle(d.style,"transform","scale(0)"),d.style.opacity="0",window.setTimeout(mxUtils.bind(this,function(){d.innerHTML=this.adsHtml[a];mxUtils.setPrefixedStyle(d.style,"transform","scale(1)");d.style.opacity="1";f=a}),1E3))};g=window.setInterval(mxUtils.bind(this,function(){this.updateAd(Math.round(Math.random()*
(this.adsHtml.length-2)))}),18E4);mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.adsHtml.splice(f,1);f=null;this.updateAd(0)}));10<mxSettings.getOpenCounter()&&window.setTimeout(mxUtils.bind(this,function(){this.updateAd(0)}),15E3)}null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",
this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop=
"12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
"all 1s ease");var f=this.adsHtml.length-1,g=null,k=null;this.updateAd=function(a){null!=g&&(window.clearTimeout(g),g=null);1==this.adsHtml.length&&window.clearInterval(k);0==this.adsHtml.length?null!=d.parentNode&&d.parentNode.removeChild(d):(a==f&&a++,mxUtils.setPrefixedStyle(d.style,"transform","scale(0)"),d.style.opacity="0",window.setTimeout(mxUtils.bind(this,function(){d.innerHTML=this.adsHtml[a];mxUtils.setPrefixedStyle(d.style,"transform","scale(1)");d.style.opacity="1";f=a}),1E3))};k=window.setInterval(mxUtils.bind(this,
function(){this.updateAd(Math.round(Math.random()*(this.adsHtml.length-2)))}),18E4);mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.adsHtml.splice(f,1);f=null;this.updateAd(0)}));10<mxSettings.getOpenCounter()&&(g=window.setTimeout(mxUtils.bind(this,function(){this.updateAd(0)}),15E3))}null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position=
"absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",
mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};
App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
App.prototype.checkLicense=function(){var a=this.drive.getUser(),b=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=b){var c=b.lastIndexOf("@"),d=b;0<=c&&(d=b.substring(c+1));mxUtils.post("/license","domain="+encodeURIComponent(d)+"&email="+encodeURIComponent(b)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var b=
a.getText();if(0<b.length){var c=JSON.parse(b);null!=c&&this.handleLicense(c,d)}}}catch(e){}}))}};
App.prototype.handleLicense=function(a,b){var c=document.getElementById("geFooter"),d=null;if(null!=c&&null!=a)if(d=a.expiry,null!=a.footer)c.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=d&&"never"!=d){var f=new Date(Date.parse(d)),g=Math.round((f-Date.now())/864E5);if(90>g){var k="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(b);c.style.height="100%";c.style.margin="0px";c.style.display=

View file

@ -2006,7 +2006,7 @@ null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,c=b.style[mxConstants.STYLE
mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);
mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",
mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;
EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?110:200;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?118:208;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9==a.which&&b.isEnabled()&&!mxEvent.isAltDown(a)&&(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a)))};

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

@ -2005,7 +2005,7 @@ null!=d&&(a=d.style[mxConstants.STYLE_FONTFAMILY]||a,c=d.style[mxConstants.STYLE
mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);
mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));b.addListener("gridSizeChanged",
mxUtils.bind(this,function(){b.isGridEnabled()&&b.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;
EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?110:200;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?118:208;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
var c=a.setDefaultParent,d=this;this.editor.graph.setDefaultParent=function(){c.apply(this,arguments);d.updateActionStates()};a.editLink=d.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var c=this.editor.graph;9==a.which&&c.isEnabled()&&!mxEvent.isAltDown(a)&&(c.isEditing()?c.stopEditing(!1):c.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
EditorUi.prototype.onKeyPress=function(a){var c=this.editor.graph;!this.isImmediateEditingEvent(a)||c.isEditing()||c.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(c.escape(),c.startEditing(),mxClient.IS_FF&&(c=c.cellEditor,c.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(c.textarea),a.collapse(!1),c=window.getSelection(),c.removeAllRanges(),c.addRange(a)))};
@ -5866,19 +5866,19 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
StorageFile.prototype.saveFile=function(a,f,d,c){if(this.isEditable()){var h=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(l){null!=c&&c(l)}});this.isRenamable()&&"."==a.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=a&&null!=d?this.ui.confirm(mxResources.get("replaceIt",
[a]),h,c):h()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,f,d){var c=this.getTitle();this.title=a;this.hasSameExtension(c,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){c!=a&&this.ui.removeLocalData(c,f)}),d)};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,f,d){StorageFile.call(this,a,f,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,f,d){this.saveFile(a,!1,f,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(a,f,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,f,d){StorageFile.call(this,a,f,d);a=d;f=a.lastIndexOf("/");0<=f&&(a=a.substring(f+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,f,d){return!1};UrlLibrary.prototype.saveAs=function(a,f,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,f,d){function c(b,c,v,t,h,u){function q(){mxEvent.addListener(p,"click",null!=u?u:function(){v!=App.MODE_GOOGLE||a.isDriveDomain()?v==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(v,g.checked);f()})):(a.setMode(v,g.checked),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";p.style.display=
StorageLibrary.prototype.isRenamable=function(a,f,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,f,d){StorageFile.call(this,a,f,d);a=d;f=a.lastIndexOf("/");0<=f&&(a=a.substring(f+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,f,d){return!1};UrlLibrary.prototype.saveAs=function(a,f,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,f,d){function c(b,c,t,u,h,v){function q(){mxEvent.addListener(p,"click",null!=v?v:function(){t!=App.MODE_GOOGLE||a.isDriveDomain()?t==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(t,g.checked);f()})):(a.setMode(t,g.checked),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";p.style.display=
mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 10px 12px 10px";p.style.width="68px";p.style.height="80px";p.style.whiteSpace="nowrap";p.setAttribute("title",c);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var x=document.createElement("div");x.style.textOverflow="ellipsis";x.style.overflow="hidden";if(null!=b){var l=document.createElement("img");l.setAttribute("src",
b);l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.width="60px";l.style.height="60px";l.style.paddingBottom="6px";p.appendChild(l)}else x.style.paddingTop="5px",x.style.whiteSpace="normal",mxClient.IS_IOS&&(p.style.padding="0px 10px 20px 10px",p.style.top="6px");p.appendChild(x);mxUtils.write(x,c);if(null!=h)for(b=0;b<h.length;b++)mxUtils.br(x),mxUtils.write(x,h[b]);if(null!=t&&null==a[t]){l.style.visibility="hidden";mxUtils.setOpacity(x,10);var w=new Spinner({lines:12,length:12,
width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});w.spin(p);var A=window.setTimeout(function(){null==a[t]&&(w.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[t]&&(window.clearTimeout(A),mxUtils.setOpacity(x,100),l.style.visibility="",w.stop(),q(),"drive"==t&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else q();e.appendChild(p);++k>=d&&(mxUtils.br(e),k=0)}d=null!=d?d:3;var h=document.createElement("div");
b);l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.width="60px";l.style.height="60px";l.style.paddingBottom="6px";p.appendChild(l)}else x.style.paddingTop="5px",x.style.whiteSpace="normal",mxClient.IS_IOS&&(p.style.padding="0px 10px 20px 10px",p.style.top="6px");p.appendChild(x);mxUtils.write(x,c);if(null!=h)for(b=0;b<h.length;b++)mxUtils.br(x),mxUtils.write(x,h[b]);if(null!=u&&null==a[u]){l.style.visibility="hidden";mxUtils.setOpacity(x,10);var w=new Spinner({lines:12,length:12,
width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});w.spin(p);var A=window.setTimeout(function(){null==a[u]&&(w.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[u]&&(window.clearTimeout(A),mxUtils.setOpacity(x,100),l.style.visibility="",w.stop(),q(),"drive"==u&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else q();e.appendChild(p);++k>=d&&(mxUtils.br(e),k=0)}d=null!=d?d:3;var h=document.createElement("div");
h.style.textAlign="center";h.style.whiteSpace="nowrap";h.style.paddingTop="0px";h.style.paddingBottom="20px";var l=a.addLanguageMenu(h);null!=l&&(l.style.bottom="28px");if(!a.isOffline()&&1<a.getServiceCount()){l=document.createElement("a");l.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");l.setAttribute("title",mxResources.get("help"));l.setAttribute("target","_blank");l.style.position="absolute";l.style.textDecoration="none";l.style.cursor="pointer";l.style.fontSize=
"12px";l.style.bottom="28px";l.style.left="26px";l.style.color="gray";var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";l.appendChild(m);mxUtils.write(l,mxResources.get("help"));h.appendChild(l)}var b=document.createElement("div");b.style.position="absolute";b.style.cursor="pointer";b.style.fontSize="12px";b.style.bottom="28px";b.style.color="gray";mxUtils.write(b,mxResources.get("decideLater"));
a.isOfflineApp()?b.style.right="20px":(mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0)"),b.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)b.style.marginLeft=-Math.round(b.clientWidth/2)+"px"};h.appendChild(b);mxEvent.addListener(b,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var e=document.createElement("div");mxClient.IS_QUIRKS&&(e.style.whiteSpace=
"nowrap",e.style.cssFloat="left");e.style.border="1px solid #d3d3d3";e.style.borderWidth="1px 0px 1px 0px";e.style.padding="18px 0px 18px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var k=0,n=document.createElement("p"),l=document.createElement("p");l.style.fontSize="16pt";l.style.padding="0px";l.style.paddingTop="4px";l.style.paddingBottom="16px";l.style.margin="0px";l.style.color="gray";mxUtils.write(l,mxResources.get("saveDiagramsTo")+
":");h.appendChild(l);"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");null!=a.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline?!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||c(null,mxResources.get("import"),null,null,["",mxResources.get("gliffy"),mxResources.get("formatVssx"),mxResources.get("formatVsdx"),mxResources.get("lucidchart")],function(){var b=document.createElement("input");b.setAttribute("type","file");
mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}):c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);h.appendChild(e);l=document.createElement("p");l.style.marginTop="12px";l.style.marginBottom="10px";l.appendChild(g);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));l.appendChild(m);mxUtils.br(l);var u=a.getRecent();if(null!=
u&&0<u.length){var t=document.createElement("select");t.style.marginTop="14px";t.style.width="140px";var v=document.createElement("option");v.setAttribute("value","");v.setAttribute("selected","selected");v.style.textAlign="center";mxUtils.write(v,mxResources.get("openRecent")+"...");t.appendChild(v);for(v=0;v<u.length;v++)(function(b){var a=b.mode;a==App.MODE_GOOGLE?a="googleDrive":a==App.MODE_ONEDRIVE&&(a="oneDrive");var e=document.createElement("option");e.setAttribute("value",b.id);mxUtils.write(e,
b.title+" ("+mxResources.get(a)+")");t.appendChild(e)})(u[v]);l.appendChild(t);mxEvent.addListener(t,"change",function(b){""!=t.value&&a.loadFile(t.value)})}else l.style.marginTop="20px",e.style.padding="30px 0px 26px 0px";e.appendChild(l);mxEvent.addListener(m,"click",function(b){g.checked=!g.checked;mxEvent.consume(b)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",
mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}):c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);h.appendChild(e);l=document.createElement("p");l.style.marginTop="12px";l.style.marginBottom="10px";l.appendChild(g);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));l.appendChild(m);mxUtils.br(l);var v=a.getRecent();if(null!=
v&&0<v.length){var u=document.createElement("select");u.style.marginTop="14px";u.style.width="140px";var t=document.createElement("option");t.setAttribute("value","");t.setAttribute("selected","selected");t.style.textAlign="center";mxUtils.write(t,mxResources.get("openRecent")+"...");u.appendChild(t);for(t=0;t<v.length;t++)(function(b){var a=b.mode;a==App.MODE_GOOGLE?a="googleDrive":a==App.MODE_ONEDRIVE&&(a="oneDrive");var e=document.createElement("option");e.setAttribute("value",b.id);mxUtils.write(e,
b.title+" ("+mxResources.get(a)+")");u.appendChild(e)})(v[t]);l.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else l.style.marginTop="20px",e.style.padding="30px 0px 26px 0px";e.appendChild(l);mxEvent.addListener(m,"click",function(b){g.checked=!g.checked;mxEvent.consume(b)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",
n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",h.appendChild(n))},5E3);this.container=h},SplashDialog=function(a){var f=document.createElement("div");f.style.textAlign="center";a.addLanguageMenu(f);
var d=null,c=a.getServiceCount();!a.isOffline()&&1<c&&(d=document.createElement("a"),d.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage"),d.setAttribute("title",mxResources.get("help")),d.setAttribute("target","_blank"),d.style.position="absolute",d.style.fontSize="12px",d.style.textDecoration="none",d.style.cursor="pointer",d.style.bottom="22px",d.style.left="26px",d.style.color="gray",c=document.createElement("img"),c.setAttribute("border","0"),c.setAttribute("valign","bottom"),
c.setAttribute("src",Editor.helpImage),c.style.marginRight="2px",d.appendChild(c),mxUtils.write(d,mxResources.get("help")),f.appendChild(d));c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.style.color="gray";var h=document.createElement("img");h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="40px";h.style.height="40px";h.style.marginRight="12px";h.style.paddingBottom="4px";var l="";a.mode==App.MODE_GOOGLE?
@ -5898,29 +5898,29 @@ l()}),f.className="geBtn",d.appendChild(f),d.style.textAlign="center");var n=mxU
f.length?l?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var m=document.createElement("div");m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,a.formatFileSize(f.length));c.appendChild(m);var b=document.createElement("textarea");b.setAttribute("autocomplete","off");b.setAttribute("autocorrect","off");b.setAttribute("autocapitalize","off");b.setAttribute("spellcheck","false");b.style.marginTop="10px";b.style.resize="none";b.style.height=
"150px";b.style.width="440px";b.style.border="1px solid gray";b.value=mxResources.get("updatingDocument");c.appendChild(b);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>f.length?(b.value=f,b.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?b.select():document.execCommand("selectAll",!1,null)):(b.setAttribute("readonly","true"),b.value=f.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};m=document.createElement("div");m.style.position="absolute";
m.style.bottom="36px";m.style.right="32px";var e=null;mxClient.IS_CHROMEAPP||navigator.standalone||!(l||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(e=mxUtils.button(mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var e=5E5>f.length?b.value:f;if(null!=h)h(e);else if(l)try{var c=window.open(e);(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=c&&null!=c.location.href&&c.location.href.substring(0,8)!=e.substring(0,8)&&(c.close(),
a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var g=window.open().document;g.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>");g.close()}}),e.className="geBtn",m.appendChild(e));if(!l||7500<f.length){var g=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",f,"text/plain")});
g.className="geBtn";m.appendChild(g)}if(l&&!a.isOffline()){if(51200>f.length){var k=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(b.value);window.open(e)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("border","0");k.appendChild(g);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");
k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";m.appendChild(k)}7168>f.length&&(k=mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(b.value);window.open(e)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("border",
a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var g=window.open().document;g.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>");g.close()}}),e.className="geBtn",m.appendChild(e));if(!l||7500<f.length){var g=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",f,"text/plain")});
g.className="geBtn";m.appendChild(g)}if(l&&!a.isOffline()){if(51200>f.length){var k=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(b.value);window.open(e)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("border","0");k.appendChild(g);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");
k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";m.appendChild(k)}7168>f.length&&(k=mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(b.value);window.open(e)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("border",
"0"),g.style.marginBottom="5px",k.appendChild(g),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign="bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",m.appendChild(k))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.appendChild(g);k=mxUtils.button(mxResources.get("copy"),function(){b.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?b.select():document.execCommand("selectAll",
!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(m.appendChild(k),k.className="geBtn gePrimaryBtn",g.className="geBtn"):(m.appendChild(e),g.className="geBtn",e.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c},GoogleSitesDialog=function(a,f){function d(){var b=null!=B.getTitle()?B.getTitle():this.defaultFilename;if(D.checked&&""!=u.value){var a="https://www.draw.io/gadget.xml?type=4&diagram="+
encodeURIComponent(mxUtils.htmlEntities(u.value));null!=b&&(a+="&title="+encodeURIComponent(b));0<y.length&&(a+="&s="+y);""!=t.value&&"0"!=t.value&&(a+="&border="+t.value);""!=n.value&&(a+="&height="+n.value);a+="&pan="+(v.checked?"1":"0");a+="&zoom="+(q.checked?"1":"0");a+="&fit="+(A.checked?"1":"0");a+="&resize="+(w.checked?"1":"0");a+="&x0="+Number(k.value);a+="&y0="+e;h.mathEnabled&&(a+="&math=1");x.checked?a+="&edit=_blank":p.checked&&(a+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));
g.value=a}else B.constructor==DriveFile||B.constructor==DropboxFile?(a="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?a+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(a+=B.getHash().substring(1),a=B.constructor==DropboxFile?a+"&type=2":a+"&type=1"),null!=b&&(a+="&title="+encodeURIComponent(b)),""!=n.value&&(b=parseInt(n.value)+parseInt(k.value),a+="&height="+b),g.value=a):g.value=""}var c=document.createElement("div"),h=a.editor.graph,l=h.getGraphBounds(),m=h.view.scale,
!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(m.appendChild(k),k.className="geBtn gePrimaryBtn",g.className="geBtn"):(m.appendChild(e),g.className="geBtn",e.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c},GoogleSitesDialog=function(a,f){function d(){var b=null!=B.getTitle()?B.getTitle():this.defaultFilename;if(D.checked&&""!=v.value){var a="https://www.draw.io/gadget.xml?type=4&diagram="+
encodeURIComponent(mxUtils.htmlEntities(v.value));null!=b&&(a+="&title="+encodeURIComponent(b));0<y.length&&(a+="&s="+y);""!=u.value&&"0"!=u.value&&(a+="&border="+u.value);""!=n.value&&(a+="&height="+n.value);a+="&pan="+(t.checked?"1":"0");a+="&zoom="+(q.checked?"1":"0");a+="&fit="+(A.checked?"1":"0");a+="&resize="+(w.checked?"1":"0");a+="&x0="+Number(k.value);a+="&y0="+e;h.mathEnabled&&(a+="&math=1");x.checked?a+="&edit=_blank":p.checked&&(a+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));
g.value=a}else B.constructor==DriveFile||B.constructor==DropboxFile?(a="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=v.value?a+=encodeURIComponent(mxUtils.htmlEntities(v.value))+"&type=3":(a+=B.getHash().substring(1),a=B.constructor==DropboxFile?a+"&type=2":a+"&type=1"),null!=b&&(a+="&title="+encodeURIComponent(b)),""!=n.value&&(b=parseInt(n.value)+parseInt(k.value),a+="&height="+b),g.value=a):g.value=""}var c=document.createElement("div"),h=a.editor.graph,l=h.getGraphBounds(),m=h.view.scale,
b=Math.floor(l.x/m-h.view.translate.x),e=Math.floor(l.y/m-h.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";c.appendChild(g);mxUtils.br(c);this.init=function(){g.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+
":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=b;c.appendChild(k);mxUtils.write(c,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(l.height/m);c.appendChild(n);mxUtils.br(c);l=document.createElement("hr");l.setAttribute("size","1");l.style.marginBottom="16px";l.style.marginTop=
"16px";c.appendChild(l);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=f||"";c.appendChild(u);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft=
"4px";t.value="0";c.appendChild(t);mxUtils.br(c);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";c.appendChild(v);mxUtils.write(c,mxResources.get("pan")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+" ");var p=document.createElement("input");
"16px";c.appendChild(l);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","28");v.style.marginBottom="8px";v.style.marginTop="2px";v.style.width="410px";v.value=f||"";c.appendChild(v);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft=
"4px";u.value="0";c.appendChild(u);mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";c.appendChild(t);mxUtils.write(c,mxResources.get("pan")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+" ");var p=document.createElement("input");
p.setAttribute("type","checkbox");p.style.marginLeft="8px";p.setAttribute("title",window.location.href);c.appendChild(p);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("asNew")+" ");mxUtils.br(c);var w=document.createElement("input");w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="16px";c.appendChild(w);
mxUtils.write(c,mxResources.get("resize")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft="8px";c.appendChild(D);mxUtils.write(c,mxResources.get("embed")+" ");var y=a.getBasenames().join(";"),B=a.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(w,
"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(D,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(k,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(u,"change",d);d();mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)});l=document.createElement("div");l.style.paddingTop=
mxUtils.write(c,mxResources.get("resize")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft="8px";c.appendChild(D);mxUtils.write(c,mxResources.get("embed")+" ");var y=a.getBasenames().join(";"),B=a.getCurrentFile();mxEvent.addListener(t,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(w,
"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(D,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(k,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(v,"change",d);d();mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)});l=document.createElement("div");l.style.paddingTop=
"12px";l.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";l.appendChild(m);c.appendChild(l);this.container=c},CreateGraphDialog=function(a,f,d){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.width="100%";f.style.height="360px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);
c.appendChild(f);var l=new Graph(f);l.setCellsCloneable(!0);l.setPanning(!0);l.setAllowDanglingEdges(!1);l.connectionHandler.select=!1;l.view.setTranslate(20,20);l.border=20;l.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";l.cellRenderer.installCellOverlayListeners=function(b,a,e){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(e.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(e){a.fireEvent(new mxEventObject("pointerdown","event",
e,"state",b))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(e.node,"touchstart",function(e){a.fireEvent(new mxEventObject("pointerdown","event",e,"state",b))})};l.getAllConnectionConstraints=function(){return null};l.connectionHandler.marker.highlight.keepOnTop=!1;l.connectionHandler.createEdgeState=function(b){b=l.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,b,this.graph.getCellStyle(b))};var b=l.getDefaultParent(),e=mxUtils.bind(this,function(a){var c=
new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,q){l.connectionHandler.reset();l.clearSelection();var g=l.getCellGeometry(a),p;n(function(){p=l.insertVertex(b,null,"Entry",g.x,g.y,80,30,"rounded=1;");e(p);l.view.refresh(p);l.insertEdge(b,null,"",a,p,m)},function(){l.scrollCellToVisible(p)})});c.addListener("pointerdown",function(b,a){var e=a.getProperty("event"),c=a.getProperty("state");l.popupMenuHandler.hideMenu();l.stopEditing(!1);var q=
mxUtils.convertPoint(l.container,mxEvent.getClientX(e),mxEvent.getClientY(e));l.connectionHandler.start(c,q.x,q.y);l.isMouseDown=!0;l.isMouseTrigger=mxEvent.isMouseEvent(e);mxEvent.consume(e)});l.addCellOverlay(a,c)});l.getModel().beginUpdate();var g;try{g=l.insertVertex(b,null,"Start",0,0,80,30,"ellipse"),e(g)}finally{l.getModel().endUpdate()}var k;"horizontalTree"==d?(k=new mxCompactTreeLayout(l),k.edgeRouting=!1,k.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==
d?(k=new mxCompactTreeLayout(l,!1),k.edgeRouting=!1,k.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"verticalFlow"==d?k=new mxHierarchicalLayout(l,mxConstants.DIRECTION_NORTH):"horizontalFlow"==d?k=new mxHierarchicalLayout(l,mxConstants.DIRECTION_WEST):"organic"==d?(k=new mxFastOrganicLayout(l,!1),k.forceConstant=80):"circle"==d&&(k=new mxCircleLayout(l));if(null!=k){var n=function(b,a){l.getModel().beginUpdate();try{null!=b&&b(),k.execute(l.getDefaultParent(),g)}catch(w){throw w;
}finally{var e=new mxMorphing(l);e.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=a&&a()}));e.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(b,a,e,c,g){u.apply(this,arguments);n()};l.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};l.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),
function(){null!=f.parentNode&&(l.destroy(),f.parentNode.removeChild(f));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&c.appendChild(t);var v=mxUtils.button(mxResources.get("insert"),function(){l.clearCellOverlays();var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(l.getModel().getChildren(l.getDefaultParent()),b.x,b.y),e=a.editor.graph.view,c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);
null!=f.parentNode&&(l.destroy(),f.parentNode.removeChild(f));a.hideDialog()});c.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(t)};this.container=c};
}finally{var e=new mxMorphing(l);e.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=a&&a()}));e.startAnimation()}},v=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(b,a,e,c,g){v.apply(this,arguments);n()};l.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};l.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),
function(){null!=f.parentNode&&(l.destroy(),f.parentNode.removeChild(f));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&c.appendChild(u);var t=mxUtils.button(mxResources.get("insert"),function(){l.clearCellOverlays();var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(l.getModel().getChildren(l.getDefaultParent()),b.x,b.y),e=a.editor.graph.view,c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);
null!=f.parentNode&&(l.destroy(),f.parentNode.removeChild(f));a.hideDialog()});c.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(u)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(a,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h2");mxUtils.write(c,mxResources.get("backgroundImage"));c.style.marginTop="0px";d.appendChild(c);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var c=a.editor.graph.backgroundImage,h=document.createElement("input");h.setAttribute("type","text");h.style.marginTop="4px";h.style.marginBottom="4px";h.style.width="350px";h.value=
@ -5937,37 +5937,37 @@ q(c4&63)},k=new XMLHttpRequest;k.open("GET",c+function(b){r="";for(d=0;d<b.lengt
g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,h.x,h.y,c.width,c.height,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(e.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())};c.src=e.target.result},e.onerror=function(b){a.handleError(b)}):(a.spinner.stop(),a.handleError(e))};k.onerror=function(b){a.handleError(b)};k.send()}}else if("list"==e){if(0<c.length){var g=a.editor.graph,
n=new mxCell(c[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");n.vertex=!0;k=g.getPreferredSizeForCell(n);null!=k&&n.geometry.width<k.width+10&&(n.geometry.width=k.width+10);if(1<c.length)for(var d=1;d<c.length;d++)if("--"==c[d])k=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
k.vertex=!0,n.geometry.height+=k.geometry.height,n.insert(k);else if(0<c[d].length&&";"!=c[d].charAt(0)){var f=new mxCell(c[d],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");f.vertex=!0;k=g.getPreferredSizeForCell(f);null!=k&&f.geometry.width<k.width&&(f.geometry.width=k.width);n.geometry.width=Math.max(n.geometry.width,f.geometry.width);n.geometry.height+=
f.geometry.height;n.insert(f)}g.setSelectionCells(g.importCells([n],h.x,h.y));g.scrollCellToVisible(g.getSelectionCell())}}else{for(var f=function(b){var a=l[b];null==a&&(a=new mxCell(b,new mxGeometry(0,0,80,30)),a.vertex=!0,l[b]=a,u.push(a));return a},l={},u=[],d=0;d<c.length;d++)if(";"!=c[d].charAt(0)){var m=c[d].split("->");if(2==m.length){var z=f(m[0]),m=f(m[1]),F=new mxCell("",new mxGeometry);F.edge=!0;z.insertEdge(F,!0);m.insertEdge(F,!1);u.push(F)}}if(0<u.length){c=document.createElement("div");
c.style.visibility="hidden";document.body.appendChild(c);g=new Graph(c);g.getModel().beginUpdate();try{u=g.importCells(u);for(d=0;d<u.length;d++)g.getModel().isVertex(u[d])&&(k=g.getPreferredSizeForCell(u[d]),u[d].geometry.width=Math.max(u[d].geometry.width,k.width),u[d].geometry.height=Math.max(u[d].geometry.height,k.height));n=new mxFastOrganicLayout(g);n.disableEdgeStyle=!1;n.forceConstant=120;n.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();a.editor.graph.setSelectionCells(a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),
f.geometry.height;n.insert(f)}g.setSelectionCells(g.importCells([n],h.x,h.y));g.scrollCellToVisible(g.getSelectionCell())}}else{for(var f=function(b){var a=l[b];null==a&&(a=new mxCell(b,new mxGeometry(0,0,80,30)),a.vertex=!0,l[b]=a,v.push(a));return a},l={},v=[],d=0;d<c.length;d++)if(";"!=c[d].charAt(0)){var m=c[d].split("->");if(2==m.length){var z=f(m[0]),m=f(m[1]),F=new mxCell("",new mxGeometry);F.edge=!0;z.insertEdge(F,!0);m.insertEdge(F,!1);v.push(F)}}if(0<v.length){c=document.createElement("div");
c.style.visibility="hidden";document.body.appendChild(c);g=new Graph(c);g.getModel().beginUpdate();try{v=g.importCells(v);for(d=0;d<v.length;d++)g.getModel().isVertex(v[d])&&(k=g.getPreferredSizeForCell(v[d]),v[d].geometry.width=Math.max(v[d].geometry.width,k.width),v[d].geometry.height=Math.max(v[d].geometry.height,k.height));n=new mxFastOrganicLayout(g);n.disableEdgeStyle=!1;n.forceConstant=120;n.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();a.editor.graph.setSelectionCells(a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),
h.x,h.y));a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();c.parentNode.removeChild(c)}}}function c(){return"list"==b.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"plantUmlPng"==b.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
"plantUmlSvg"==b.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->c\nc->a\n"}var h=a.editor.graph.getFreeInsertPoint(),l=document.createElement("div");l.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height="354px";m.style.marginBottom=
"16px";var b=document.createElement("select"),e=document.createElement("option");e.setAttribute("value","list");e.setAttribute("selected","selected");mxUtils.write(e,mxResources.get("list"));b.appendChild(e);e=document.createElement("option");e.setAttribute("value","diagram");mxUtils.write(e,mxResources.get("diagram"));b.appendChild(e);e=document.createElement("option");e.setAttribute("value","plantUmlSvg");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var g=document.createElement("option");
g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");/.*\.draw\.io$/.test(window.location.hostname)&&Graph.fileSupport&&!a.isOffline()&&(b.appendChild(e),b.appendChild(g));var k=c();m.value=k;l.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(b){b.stopPropagation();b.preventDefault()},!1),m.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=
b.dataTransfer.files[0];var a=new FileReader;a.onload=function(b){m.value=b.target.result};a.readAsText(b)}},!1));l.appendChild(b);mxEvent.addListener(b,"change",function(){var b=c();if(0==m.value.length||m.value==k)k=b,m.value=k});e=mxUtils.button(mxResources.get("close"),function(){m.value==k?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);g=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();
d(m.value,b.value)});l.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||l.appendChild(e);this.container=l},NewDialog=function(a,f,d,c){function h(){if(c)d||a.hideDialog(),c(t,n.value);else{var b=n.value;if(null!=b&&0<b.length){var e=a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null;a.pickFolder(e,function(e){a.createFile(b,t,null!=u&&0<u.length?u:null,null,function(){a.hideDialog()},null,e)},e!=App.MODE_GOOGLE)}}}function l(b,
a,e){null!=v&&(v.style.backgroundColor="transparent",v.style.border="1px solid transparent");t=a;u=e;v=b;v.style.backgroundColor="#e6eff8";v.style.border="1px solid #ccd9ea"}function m(b,a,e,c,g){var k=document.createElement("div");k.className="geTemplate";k.style.height="140px";k.style.width="140px";null!=c&&0<c.length&&k.setAttribute("title",c);if(null!=b&&0<b.length){b.substring(0,b.length-4);k.style.backgroundImage="url("+TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png)";k.style.backgroundPosition=
d(m.value,b.value)});l.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||l.appendChild(e);this.container=l},NewDialog=function(a,f,d,c){function h(){if(c)d||a.hideDialog(),c(u,n.value);else{var b=n.value;if(null!=b&&0<b.length){var e=a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null;a.pickFolder(e,function(e){a.createFile(b,u,null!=v&&0<v.length?v:null,null,function(){a.hideDialog()},null,e)},e!=App.MODE_GOOGLE)}}}function l(b,
a,e){null!=t&&(t.style.backgroundColor="transparent",t.style.border="1px solid transparent");u=a;v=e;t=b;t.style.backgroundColor="#e6eff8";t.style.border="1px solid #ccd9ea"}function m(b,a,e,c,g){var k=document.createElement("div");k.className="geTemplate";k.style.height="140px";k.style.width="140px";null!=c&&0<c.length&&k.setAttribute("title",c);if(null!=b&&0<b.length){b.substring(0,b.length-4);k.style.backgroundImage="url("+TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png)";k.style.backgroundPosition=
"center center";k.style.backgroundRepeat="no-repeat";var d=!1;mxEvent.addListener(k,"click",function(e){q.setAttribute("disabled","disabled");k.style.backgroundColor="transparent";k.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+b,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(q.removeAttribute("disabled"),l(k,b.getText(),a),d&&h())}))});mxEvent.addListener(k,"dblclick",function(b){d=!0})}else k.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+
mxResources.get(e)+"</td></tr></table>",g&&l(k),mxEvent.addListener(k,"click",function(b){l(k)}),mxEvent.addListener(k,"dblclick",function(b){h()});p.appendChild(k)}function b(){function b(){for(var b=!0;a<D.length&&(b||0!=mxUtils.mod(a,30));)b=D[a++],m(b.url,b.libs,b.title,b.tooltip,b.select),b=!1}var a=0;mxEvent.addListener(p,"scroll",function(a){p.scrollTop+p.clientHeight>=p.scrollHeight&&(b(),mxEvent.consume(a))});var e=null,c;for(c in w){var g=document.createElement("div"),q=mxResources.get(c),
k=w[c];null==q&&(q=c.substring(0,1).toUpperCase()+c.substring(1));18<q.length&&(q=q.substring(0,18)+"&hellip;");g.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";g.setAttribute("title",q+" ("+k.length+")");mxUtils.write(g,g.getAttribute("title"));x.appendChild(g);null==e&&(e=g,e.style.backgroundColor="#ebf2f9");(function(c,q){mxEvent.addListener(g,"click",function(){e!=q&&(e.style.backgroundColor="",e=q,e.style.backgroundColor=
"#ebf2f9",p.scrollTop=0,p.innerHTML="",a=0,D=w[c],b())})})(c,g)}b()}d=null!=d?d:!0;var e=document.createElement("div");e.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="46px";e.appendChild(g);var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="40px";k.style.height="40px";k.style.marginRight="10px";k.style.paddingBottom="4px";k.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":
a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!f&&d&&g.appendChild(k);d&&mxUtils.write(g,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");k=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?k=a.drive.extension:
a.mode==App.MODE_DROPBOX&&null!=a.dropbox?k=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?k=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub&&(k=a.gitHub.extension);var n=document.createElement("input");n.setAttribute("value",a.defaultFilename+k);n.style.marginRight="20px";n.style.marginLeft="10px";n.style.width=f?"220px":"450px";this.init=function(){d&&(n.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",
!1,null))};d&&g.appendChild(n);var u=null,t=null,v=null,q=mxUtils.button(mxResources.get("create"),function(){h()});q.className="geBtn gePrimaryBtn";var p=document.createElement("div");p.style.border="1px solid #d3d3d3";p.style.position="absolute";p.style.left="160px";p.style.right="34px";p.style.top=d?"72px":"40px";p.style.bottom="76px";p.style.margin="6px 0 0 -1px";p.style.padding="6px";p.style.overflow="auto";var x=document.createElement("div");x.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
!1,null))};d&&g.appendChild(n);var v=null,u=null,t=null,q=mxUtils.button(mxResources.get("create"),function(){h()});q.className="geBtn gePrimaryBtn";var p=document.createElement("div");p.style.border="1px solid #d3d3d3";p.style.position="absolute";p.style.left="160px";p.style.right="34px";p.style.top=d?"72px":"40px";p.style.bottom="76px";p.style.margin="6px 0 0 -1px";p.style.padding="6px";p.style.overflow="auto";var x=document.createElement("div");x.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
d||(x.style.top="40px");var w={},A=1;w.basic=[{title:"blankDiagram",select:!0}];var D=w.basic;if(!f){e.appendChild(x);e.appendChild(p);var y=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!y){y=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var e=a.getAttribute("url");if(null!=e){var c=e.indexOf("/"),e=e.substring(0,c),c=w[e];null==c&&(A++,c=[],w[e]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
tooltip:a.getAttribute("url")})}}a=a.nextSibling}b()}})}mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&h()});g=document.createElement("div");g.style.marginTop=f?"4px":"16px";g.style.textAlign="right";g.style.position="absolute";g.style.left="40px";g.style.bottom="30px";g.style.right="40px";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});k.className="geBtn";a.editor.cancelFirst&&g.appendChild(k);if(!f&&!a.isOffline()&&d&&null==c){var B=mxUtils.button(mxResources.get("help"),
function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});B.className="geBtn";g.appendChild(B)}f||"1"==urlParams.embed||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(n.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},
mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),f.className="geBtn",g.appendChild(f));g.appendChild(q);a.editor.cancelFirst||null!=c||g.appendChild(k);e.appendChild(g);this.container=e},CreateDialog=function(a,f,d,c,h,l,m,b,e,g,k,n){function u(b,e,c,g){function q(){mxEvent.addListener(k,"click",function(){var b=c;if(m){var e=p.value,g=e.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>g){var b=null!=b?b:A.value,q="";b==App.MODE_GOOGLE?q=a.drive.extension:b==App.MODE_GITHUB?q=
a.gitHub.extension:b==App.MODE_DROPBOX?q=a.dropbox.extension:b==App.MODE_ONEDRIVE?q=a.oneDrive.extension:b==App.MODE_DEVICE&&(q=".xml");0<=g&&(e=e.substring(0,g));p.value=e+q}}t(c)})}var k=document.createElement("a");k.style.overflow="hidden";var d=document.createElement("img");d.src=b;d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="60px";d.style.height="60px";d.style.paddingBottom="6px";k.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";k.className="geBaseButton";
k.style.position="relative";k.style.margin="4px";k.style.padding="8px 8px 10px 8px";k.style.whiteSpace="nowrap";k.appendChild(d);mxClient.IS_QUIRKS&&(k.style.cssFloat="left",k.style.zoom="1");k.style.color="gray";k.style.fontSize="11px";var v=document.createElement("div");k.appendChild(v);mxUtils.write(v,e);if(null!=g&&null==a[g]){d.style.visibility="hidden";mxUtils.setOpacity(v,10);var h=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,
top:"40%",zIndex:2E9});h.spin(k);var l=window.setTimeout(function(){null==a[g]&&(h.stop(),k.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(l),mxUtils.setOpacity(v,100),d.style.visibility="",h.stop(),q())}))}else q();x.appendChild(k);++w==n&&(mxUtils.br(x),w=0)}function t(b){var e=p.value;if(null==b||null!=e&&0<e.length)a.hideDialog(),d(e,b)}m=null!=m?m:!0;b=null!=b?b:!0;n=null!=n?n:3;var v=document.createElement("div");null==
c&&a.addLanguageMenu(v);var q=document.createElement("h2");mxUtils.write(q,h||mxResources.get("create"));q.style.marginTop="0px";q.style.marginBottom="24px";v.appendChild(q);mxUtils.write(v,mxResources.get("filename")+":");var p=document.createElement("input");p.setAttribute("value",f);p.style.width="280px";p.style.marginLeft="10px";p.style.marginBottom="20px";this.init=function(){p.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,
null)};v.appendChild(p);mxUtils.br(v);var x=document.createElement("div");x.style.textAlign="center";var w=0;x.style.marginTop="6px";v.appendChild(x);var A=document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(h,mxResources.get("googleDrive")),A.appendChild(h),u(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
"drive")),null!=a.gitHub&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_GITHUB),mxUtils.write(h,mxResources.get("github")),A.appendChild(h),u(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.DropboxClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(h,mxResources.get("dropbox")),A.appendChild(h),a.mode==App.MODE_DROPBOX&&h.setAttribute("selected","selected"),u(IMAGE_PATH+
"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),"function"===typeof window.OneDriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(h,mxResources.get("oneDrive")),A.appendChild(h),a.mode==App.MODE_ONEDRIVE&&h.setAttribute("selected","selected"),u(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&
!mxClient.IS_IOS)h=document.createElement("option"),h.setAttribute("value",App.MODE_DEVICE),mxUtils.write(h,mxResources.get("device")),A.appendChild(h),a.mode!=App.MODE_DEVICE&&b||h.setAttribute("selected","selected"),k&&u(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);b&&isLocalStorage&&"0"!=urlParams.browser&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_BROWSER),mxUtils.write(b,mxResources.get("browser")),A.appendChild(b),a.mode==App.MODE_BROWSER&&
b.setAttribute("selected","selected"),u(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="center";null!=g&&(h=mxUtils.button(mxResources.get("help"),function(){window.open(g)}),h.className="geBtn",b.appendChild(h));h=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});h.className="geBtn";a.editor.cancelFirst&&
b.appendChild(h);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){t(null)}),q.className="geBtn",b.appendChild(q));e&&(e=mxUtils.button(mxResources.get("openInNewWindow"),function(){t("_blank")}),e.className="geBtn",b.appendChild(e));mxClient.IS_IOS||(l=mxUtils.button(l||mxResources.get("create"),function(){t(k?"download":App.MODE_DEVICE)}),l.className="geBtn gePrimaryBtn",b.appendChild(l));a.editor.cancelFirst||b.appendChild(h);mxEvent.addListener(p,"keypress",function(b){13==
b.keyCode?t(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});v.appendChild(b);this.container=v},PopupDialog=function(a,f,d,c,h){h=null!=h?h:!0;var l=document.createElement("div");l.style.textAlign="left";mxUtils.write(l,mxResources.get("fileOpenLocation"));mxUtils.br(l);mxUtils.br(l);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=c&&c()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";l.appendChild(m);
mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),f.className="geBtn",g.appendChild(f));g.appendChild(q);a.editor.cancelFirst||null!=c||g.appendChild(k);e.appendChild(g);this.container=e},CreateDialog=function(a,f,d,c,h,l,m,b,e,g,k,n){function v(b,e,c,g){function q(){mxEvent.addListener(k,"click",function(){var b=c;if(m){var e=p.value,g=e.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>g){var b=null!=b?b:A.value,q="";b==App.MODE_GOOGLE?q=a.drive.extension:b==App.MODE_GITHUB?q=
a.gitHub.extension:b==App.MODE_DROPBOX?q=a.dropbox.extension:b==App.MODE_ONEDRIVE?q=a.oneDrive.extension:b==App.MODE_DEVICE&&(q=".xml");0<=g&&(e=e.substring(0,g));p.value=e+q}}u(c)})}var k=document.createElement("a");k.style.overflow="hidden";var d=document.createElement("img");d.src=b;d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="60px";d.style.height="60px";d.style.paddingBottom="6px";k.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";k.className="geBaseButton";
k.style.position="relative";k.style.margin="4px";k.style.padding="8px 8px 10px 8px";k.style.whiteSpace="nowrap";k.appendChild(d);mxClient.IS_QUIRKS&&(k.style.cssFloat="left",k.style.zoom="1");k.style.color="gray";k.style.fontSize="11px";var t=document.createElement("div");k.appendChild(t);mxUtils.write(t,e);if(null!=g&&null==a[g]){d.style.visibility="hidden";mxUtils.setOpacity(t,10);var h=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,
top:"40%",zIndex:2E9});h.spin(k);var l=window.setTimeout(function(){null==a[g]&&(h.stop(),k.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(l),mxUtils.setOpacity(t,100),d.style.visibility="",h.stop(),q())}))}else q();x.appendChild(k);++w==n&&(mxUtils.br(x),w=0)}function u(b){var e=p.value;if(null==b||null!=e&&0<e.length)a.hideDialog(),d(e,b)}m=null!=m?m:!0;b=null!=b?b:!0;n=null!=n?n:3;var t=document.createElement("div");null==
c&&a.addLanguageMenu(t);var q=document.createElement("h2");mxUtils.write(q,h||mxResources.get("create"));q.style.marginTop="0px";q.style.marginBottom="24px";t.appendChild(q);mxUtils.write(t,mxResources.get("filename")+":");var p=document.createElement("input");p.setAttribute("value",f);p.style.width="280px";p.style.marginLeft="10px";p.style.marginBottom="20px";this.init=function(){p.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,
null)};t.appendChild(p);mxUtils.br(t);var x=document.createElement("div");x.style.textAlign="center";var w=0;x.style.marginTop="6px";t.appendChild(x);var A=document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(h,mxResources.get("googleDrive")),A.appendChild(h),v(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
"drive")),null!=a.gitHub&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_GITHUB),mxUtils.write(h,mxResources.get("github")),A.appendChild(h),v(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.DropboxClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(h,mxResources.get("dropbox")),A.appendChild(h),a.mode==App.MODE_DROPBOX&&h.setAttribute("selected","selected"),v(IMAGE_PATH+
"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),"function"===typeof window.OneDriveClient&&(h=document.createElement("option"),h.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(h,mxResources.get("oneDrive")),A.appendChild(h),a.mode==App.MODE_ONEDRIVE&&h.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&
!mxClient.IS_IOS)h=document.createElement("option"),h.setAttribute("value",App.MODE_DEVICE),mxUtils.write(h,mxResources.get("device")),A.appendChild(h),a.mode!=App.MODE_DEVICE&&b||h.setAttribute("selected","selected"),k&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);b&&isLocalStorage&&"0"!=urlParams.browser&&(b=document.createElement("option"),b.setAttribute("value",App.MODE_BROWSER),mxUtils.write(b,mxResources.get("browser")),A.appendChild(b),a.mode==App.MODE_BROWSER&&
b.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="center";null!=g&&(h=mxUtils.button(mxResources.get("help"),function(){window.open(g)}),h.className="geBtn",b.appendChild(h));h=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});h.className="geBtn";a.editor.cancelFirst&&
b.appendChild(h);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){u(null)}),q.className="geBtn",b.appendChild(q));e&&(e=mxUtils.button(mxResources.get("openInNewWindow"),function(){u("_blank")}),e.className="geBtn",b.appendChild(e));mxClient.IS_IOS||(l=mxUtils.button(l||mxResources.get("create"),function(){u(k?"download":App.MODE_DEVICE)}),l.className="geBtn gePrimaryBtn",b.appendChild(l));a.editor.cancelFirst||b.appendChild(h);mxEvent.addListener(p,"keypress",function(b){13==
b.keyCode?u(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});t.appendChild(b);this.container=t},PopupDialog=function(a,f,d,c,h){h=null!=h?h:!0;var l=document.createElement("div");l.style.textAlign="left";mxUtils.write(l,mxResources.get("fileOpenLocation"));mxUtils.br(l);mxUtils.br(l);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=c&&c()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";l.appendChild(m);
mxUtils.br(l);var b=mxUtils.button(mxResources.get("openInNewWindow"),function(){h&&a.hideDialog();null!=d&&d();window.open(f)});b.className="geBtn gePrimaryBtn";b.style.width=m.style.width;l.appendChild(b);mxUtils.br(l);mxUtils.br(l);mxUtils.write(l,mxResources.get("allowPopups"));this.container=l},ImageDialog=function(a,f,d,c,h,l){l=null!=l?l:!0;var m=a.editor.graph,b=document.createElement("div");mxUtils.write(b,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";
f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";mxClient.IS_VML||(f.style.paddingRight="20px");var e=document.createElement("input");e.setAttribute("value",d);e.setAttribute("type","text");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.marginTop="6px";e.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";
e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+
@ -5976,24 +5976,24 @@ Math.round(Number(q.height)*k))},function(){a.spinner.stop();c(null);a.showError
var c=b.parentNode,g=null;mxEvent.addListener(c,"dragleave",function(b){null!=g&&(g.parentNode.removeChild(g),g=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==g&&(!mxClient.IS_IE||10<document.documentMode)&&(g=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=g&&(g.parentNode.removeChild(g),g=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,
0,0,a.maxImageSize,function(b,a,e,c,g,q){k(b)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var e=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(e)&&k(decodeURIComponent(e))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign=
"right";f=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});f.className="geBtn";a.editor.cancelFirst&&d.appendChild(f);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(e.value=b.url));e.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,
"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(b,a,e,c,g,d){k(b)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()},!0)});var u=mxUtils.button(mxResources.get("open"),function(){n.click()});u.className="geBtn";d.appendChild(u)}}"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(u=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
a.imageSearchPicker=b.setCallback(function(b){ImageDialog.filePicked(b)}).build()}a.imageSearchPicker.setVisible(!0);a.movePickersToTop()}),u.className="geBtn",d.appendChild(u),null!=a.drive&&"1"==urlParams.photos&&(u=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
a.photoPicker=b.setCallback(function(b){ImageDialog.filePicked(b)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),u.className="geBtn",d.appendChild(u)));mxEvent.addListener(e,"keypress",function(b){13==b.keyCode&&k(e.value)});u=mxUtils.button(mxResources.get("apply"),function(){k(e.value)});u.className="geBtn gePrimaryBtn";d.appendChild(u);a.editor.cancelFirst||d.appendChild(f);Graph.fileSupport&&(d.style.marginTop="120px",b.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",
"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(b,a,e,c,g,d){k(b)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()},!0)});var v=mxUtils.button(mxResources.get("open"),function(){n.click()});v.className="geBtn";d.appendChild(v)}}"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(v=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
a.imageSearchPicker=b.setCallback(function(b){ImageDialog.filePicked(b)}).build()}a.imageSearchPicker.setVisible(!0);a.movePickersToTop()}),v.className="geBtn",d.appendChild(v),null!=a.drive&&"1"==urlParams.photos&&(v=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
a.photoPicker=b.setCallback(function(b){ImageDialog.filePicked(b)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),v.className="geBtn",d.appendChild(v)));mxEvent.addListener(e,"keypress",function(b){13==b.keyCode&&k(e.value)});v=mxUtils.button(mxResources.get("apply"),function(){k(e.value)});v.className="geBtn gePrimaryBtn";d.appendChild(v);a.editor.cancelFirst||d.appendChild(f);Graph.fileSupport&&(d.style.marginTop="120px",b.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",
b.style.backgroundPosition="center 65%",b.style.backgroundRepeat="no-repeat",f=document.createElement("div"),f.style.position="absolute",f.style.width="420px",f.style.top="58%",f.style.textAlign="center",f.style.fontSize="18px",f.style.color="#a0c3ff",mxUtils.write(f,mxResources.get("dragImagesHere")),b.appendChild(f));b.appendChild(d);this.container=b},LinkDialog=function(a,f,d,c,h){function l(b,a,e){e=mxUtils.button("",e);e.className="geBtn";e.setAttribute("title",a);a=document.createElement("img");
a.style.height="26px";a.style.width="26px";a.setAttribute("src",b);e.style.minWidth="42px";e.style.verticalAlign="middle";e.appendChild(a);p.appendChild(e)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||(b.style.paddingRight="20px");var e=
document.createElement("input");e.setAttribute("placeholder",mxResources.get("dragUrlsHere"));e.setAttribute("type","text");e.style.marginTop="6px";e.style.width="400px";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";var g=document.createElement("div");g.setAttribute("title",mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height=
"14px";g.style.cursor="pointer";g.style.display=mxClient.IS_VML?"inline":"inline-block";g.style.top=(mxClient.IS_VML?0:3)+"px";g.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){e.value="";e.focus()});var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";
n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var u=document.createElement("select");u.style.width="380px";if(h&&null!=a.pages){null!=f&&a.editor.graph.isPageLink(f)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(e.setAttribute("value",f),k.setAttribute("checked","checked"),k.defaultChecked=!0);e.style.width="380px";b.appendChild(k);b.appendChild(e);b.appendChild(g);mxUtils.br(b);b.appendChild(n);h=!1;for(g=0;g<a.pages.length;g++){var t=
document.createElement("option");mxUtils.write(t,a.pages[g].getName()||mxResources.get("pageWithNumber",[g+1]));t.setAttribute("value","data:page/id,"+a.pages[g].getId());f==t.getAttribute("value")&&(t.setAttribute("selected","selected"),h=!0);u.appendChild(t)}if(!h&&n.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");u.appendChild(v);mxEvent.addListener(u,
"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)})}b.appendChild(u)}else e.setAttribute("value",f),b.appendChild(e),b.appendChild(g);m.appendChild(b);var q=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==u.value?u.value:f:e.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){n.checked?u.focus():(e.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",
!1,null));mxEvent.addListener(u,"focus",function(){k.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(e,"focus",function(){n.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var b=m.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(e){null==
n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var v=document.createElement("select");v.style.width="380px";if(h&&null!=a.pages){null!=f&&a.editor.graph.isPageLink(f)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(e.setAttribute("value",f),k.setAttribute("checked","checked"),k.defaultChecked=!0);e.style.width="380px";b.appendChild(k);b.appendChild(e);b.appendChild(g);mxUtils.br(b);b.appendChild(n);h=!1;for(g=0;g<a.pages.length;g++){var u=
document.createElement("option");mxUtils.write(u,a.pages[g].getName()||mxResources.get("pageWithNumber",[g+1]));u.setAttribute("value","data:page/id,"+a.pages[g].getId());f==u.getAttribute("value")&&(u.setAttribute("selected","selected"),h=!0);v.appendChild(u)}if(!h&&n.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");v.appendChild(t);mxEvent.addListener(v,
"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}b.appendChild(v)}else e.setAttribute("value",f),b.appendChild(e),b.appendChild(g);m.appendChild(b);var q=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==v.value?v.value:f:e.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){n.checked?v.focus():(e.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",
!1,null));mxEvent.addListener(v,"focus",function(){k.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(e,"focus",function(){n.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});if(Graph.fileSupport){var b=m.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(e){null==
c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(e.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),k.setAttribute("checked","checked"),k.checked=!0,q.click());b.stopPropagation();b.preventDefault()}),!1)}};var p=document.createElement("div");p.style.marginTop=
"20px";p.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&p.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(b){if(b.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=b.docs;var a=b.docs[0].url;"application/mxe"==b.docs[0].mimeType||"application/vnd.jgraph.mxfile"==b.docs[0].mimeType?(a=DriveClient.prototype.oldAppHostname,a="https://"+a+"/#G"+
b.docs[0].id):"application/mxr"==b.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==b.docs[0].mimeType?(a=DriveClient.prototype.newAppHostname,a="https://"+a+"/#G"+b.docs[0].id):"application/vnd.google-apps.folder"==b.docs[0].mimeType&&(a="https://drive.google.com/#folders/"+b.docs[0].id);e.value=a;e.focus()}else LinkDialog.selectedDocs=null;e.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&l(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),
function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(e).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(b){LinkDialog.filePicked(b)}).build()}a.linkPicker.setVisible(!0);a.movePickersToTop()}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&l(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(b){e.value=b[0].link;
e.focus()}})});null!=a.oneDrive&&l(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(b){e.value=b.value[0].webUrl;e.focus()},!0)});null!=a.gitHub&&l(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(b){if(null!=b){b=b.split("/");var a=b[0],c=b[1],g=b[2];b=b.slice(3,b.length).join("/");e.value="https://github.com/"+a+"/"+c+"/blob/"+g+"/"+b;e.focus()}})});mxEvent.addListener(e,"keypress",function(b){13==b.keyCode&&
(a.hideDialog(),c(n.checked?u.value:e.value,LinkDialog.selectedDocs))});p.appendChild(q);a.editor.cancelFirst||p.appendChild(d);m.appendChild(p);this.container=m},AboutDialog=function(a){var f=document.createElement("div");f.style.marginTop="6px";f.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.style.width="170px";d.style.height="219px";d.setAttribute("src",IMAGE_PATH+"/logo-flat.png");f.appendChild(d);
(a.hideDialog(),c(n.checked?v.value:e.value,LinkDialog.selectedDocs))});p.appendChild(q);a.editor.cancelFirst||p.appendChild(d);m.appendChild(p);this.container=m},AboutDialog=function(a){var f=document.createElement("div");f.style.marginTop="6px";f.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.style.width="170px";d.style.height="219px";d.setAttribute("src",IMAGE_PATH+"/logo-flat.png");f.appendChild(d);
mxUtils.br(f);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";f.appendChild(d);mxUtils.br(f);mxUtils.br(f);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2017 <a href="https://www.jgraph.com/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';f.appendChild(d);mxEvent.addListener(f,"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&a.hideDialog()});this.container=f},FeedbackDialog=function(a){var f=
document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";f.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");f.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var h=mxUtils.button(mxResources.get("sendMessage"),function(){var b=
(m.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+e.value+b),function(b){a.spinner.stop();
@ -6003,42 +6003,42 @@ mxUtils.write(b," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(b);
d.style.marginTop="26px";d.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst?(d.appendChild(b),d.appendChild(h)):(d.appendChild(h),d.appendChild(b));f.appendChild(d);this.container=f};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,f){var d=document.createElement("div"),c=document.createElement("h3");c.style.marginTop="0px";mxUtils.write(c,mxResources.get("revisionHistory"));d.appendChild(c);var h=document.createElement("div");h.style.position="absolute";h.style.overflow="auto";h.style.width="170px";h.style.height="378px";d.appendChild(h);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height=
"376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);d.appendChild(l);var m=new Graph(l);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var b=0,e=null,g=0,k=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b&&null!=e&&null!=e[g]?e[g].getAttribute("name"):"pagenumber"==b?g+1:k.apply(this,arguments)};m.getLinkForCell=function(){return null};Editor.MathJaxRender&&
m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var n=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),t=null,v=null,q=null,p=null,x=mxUtils.button("",function(){null!=q&&m.zoomIn()});x.className="geSprite geSprite-zoomin";x.setAttribute("title",mxResources.get("zoomIn"));
m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var n=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),v=a.getCurrentFile(),u=null,t=null,q=null,p=null,x=mxUtils.button("",function(){null!=q&&m.zoomIn()});x.className="geSprite geSprite-zoomin";x.setAttribute("title",mxResources.get("zoomIn"));
x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var w=mxUtils.button("",function(){null!=q&&m.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var A=mxUtils.button("",function(){null!=q&&(m.maxFitScale=8,m.fit(8),m.center())});A.className=
"geSprite geSprite-fit";A.setAttribute("title",mxResources.get("fit"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var D=mxUtils.button("",function(){null!=q&&(m.zoomActual(),m.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var y=
document.createElement("div");y.style.position="absolute";y.style.textAlign="right";y.style.color="gray";y.style.marginTop="10px";y.style.backgroundColor="transparent";y.style.top="440px";y.style.right="32px";y.style.maxWidth="380px";y.style.cursor="default";var B=mxUtils.button(mxResources.get("download"),function(){if(null!=q){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,e=mxUtils.getXml(q.documentElement);a.isLocalFileSave()?a.saveLocalFile(e,b,"text/xml"):
(e="undefined"===typeof pako?"&xml="+encodeURIComponent(e):"&data="+encodeURIComponent(a.editor.graph.compress(e)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+e)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var C=mxUtils.button(mxResources.get("restore"),function(){null!=q&&null!=p&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();
(e="undefined"===typeof pako?"&xml="+encodeURIComponent(e):"&data="+encodeURIComponent(a.editor.graph.compress(e)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+e)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var C=mxUtils.button(mxResources.get("restore"),function(){null!=q&&null!=p&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&v.save(!0,function(b){a.spinner.stop();
a.replaceFileData(p);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});C.className="geBtn";C.setAttribute("disabled","disabled");var z=document.createElement("select");z.setAttribute("disabled","disabled");z.style.maxWidth="80px";z.style.position="relative";z.style.top="-2px";z.style.verticalAlign="bottom";z.style.marginRight="6px";z.style.display="none";var F=null;mxEvent.addListener(z,"change",function(b){null!=
F&&(F(b),mxEvent.consume(b))});var L=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=q&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(q.documentElement)),window.openWindow(a.getUrl()))});L.className="geBtn";L.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("show"),function(){null!=v&&window.open(v.getUrl())});G.className="geBtn gePrimaryBtn";G.setAttribute("disabled","disabled");c=document.createElement("div");
c.style.position="absolute";c.style.top="482px";c.style.width="640px";c.style.textAlign="right";var E=document.createElement("div");E.className="geToolbarContainer";E.style.backgroundColor="transparent";E.style.padding="2px";E.style.border="none";E.style.left="199px";E.style.top="442px";var M=null;if(null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile)l.style.display="none",E.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"));
F&&(F(b),mxEvent.consume(b))});var L=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=q&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(q.documentElement)),window.openWindow(a.getUrl()))});L.className="geBtn";L.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("show"),function(){null!=t&&window.open(t.getUrl())});G.className="geBtn gePrimaryBtn";G.setAttribute("disabled","disabled");c=document.createElement("div");
c.style.position="absolute";c.style.top="482px";c.style.width="640px";c.style.textAlign="right";var E=document.createElement("div");E.className="geToolbarContainer";E.style.backgroundColor="transparent";E.style.padding="2px";E.style.border="none";E.style.left="199px";E.style.top="442px";var M=null;if(null==v||null==a.drive&&v.constructor==window.DriveFile||null==a.dropbox&&v.constructor==window.DropboxFile)l.style.display="none",E.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"));
else if(null!=f&&0<f.length){l.style.cursor="move";var H=document.createElement("table");H.style.border="1px solid lightGray";H.style.borderCollapse="collapse";H.style.borderSpacing="0px";H.style.width="100%";var J=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(b=mxUtils.indexOf(a.pages,a.currentPage));for(var K=f.length-1;0<=K;K--){var N=function(c){var k=new Date(c.modifiedDate),d=null;if(0<=k.getTime()){var h=function(c){n.stop();var f=mxUtils.parseXml(c),
v=a.editor.extractGraphModel(f.documentElement,!0);if(null!=v){var h=function(b){null!=b&&(b=t(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},t=function(b){var a=b.getAttribute("background");if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";l.style.backgroundColor=a;(new mxCodec(b.ownerDocument)).decode(b,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return b};z.style.display="none";z.innerHTML="";q=f;p=c;e=parseSelectFunction=null;g=0;if("mxfile"==
v.nodeName){f=v.getElementsByTagName("diagram");e=[];for(c=0;c<f.length;c++)e.push(f[c]);g=Math.min(b,e.length-1);0<e.length&&h(e[g]);if(1<e.length)for(z.removeAttribute("disabled"),z.style.display="",c=0;c<e.length;c++)f=document.createElement("option"),mxUtils.write(f,e[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),f.setAttribute("value",c),c==g&&f.setAttribute("selected","selected"),z.appendChild(f);F=function(){g=b=parseInt(z.value);h(e[b])}}else t(v);y.innerHTML="";mxUtils.write(y,
k.toLocaleDateString()+" "+k.toLocaleTimeString());y.setAttribute("title",d.getAttribute("title"));x.removeAttribute("disabled");w.removeAttribute("disabled");A.removeAttribute("disabled");D.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),B.removeAttribute("disabled"),G.removeAttribute("disabled"),L.removeAttribute("disabled"));mxUtils.setOpacity(x,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(D,60)}else z.style.display=
t=a.editor.extractGraphModel(f.documentElement,!0);if(null!=t){var h=function(b){null!=b&&(b=u(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},u=function(b){var a=b.getAttribute("background");if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";l.style.backgroundColor=a;(new mxCodec(b.ownerDocument)).decode(b,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return b};z.style.display="none";z.innerHTML="";q=f;p=c;e=parseSelectFunction=null;g=0;if("mxfile"==
t.nodeName){f=t.getElementsByTagName("diagram");e=[];for(c=0;c<f.length;c++)e.push(f[c]);g=Math.min(b,e.length-1);0<e.length&&h(e[g]);if(1<e.length)for(z.removeAttribute("disabled"),z.style.display="",c=0;c<e.length;c++)f=document.createElement("option"),mxUtils.write(f,e[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),f.setAttribute("value",c),c==g&&f.setAttribute("selected","selected"),z.appendChild(f);F=function(){g=b=parseInt(z.value);h(e[b])}}else u(t);y.innerHTML="";mxUtils.write(y,
k.toLocaleDateString()+" "+k.toLocaleTimeString());y.setAttribute("title",d.getAttribute("title"));x.removeAttribute("disabled");w.removeAttribute("disabled");A.removeAttribute("disabled");D.removeAttribute("disabled");null!=v&&v.isRestricted()||(a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),B.removeAttribute("disabled"),G.removeAttribute("disabled"),L.removeAttribute("disabled"));mxUtils.setOpacity(x,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(D,60)}else z.style.display=
"none",z.innerHTML="",y.innerHTML="",mxUtils.write(y,mxResources.get("errorLoadingFile"))},d=document.createElement("tr");d.style.borderBottom="1px solid lightGray";d.style.fontSize="12px";d.style.cursor="pointer";var E=document.createElement("td");E.style.padding="6px";E.style.whiteSpace="nowrap";c==f[f.length-1]?mxUtils.write(E,mxResources.get("current")):k.toDateString()===T?mxUtils.write(E,k.toLocaleTimeString()):mxUtils.write(E,k.toLocaleDateString()+" "+k.toLocaleTimeString());d.appendChild(E);
d.setAttribute("title",k.toLocaleDateString()+" "+k.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(b){v!=c&&(n.stop(),null!=t&&(t.style.backgroundColor=""),v=c,t=d,t.style.backgroundColor="#ebf2f9",p=q=null,y.removeAttribute("title"),y.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",m.getModel().clear(),C.setAttribute("disabled","disabled"),B.setAttribute("disabled",
"disabled"),x.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),mxUtils.setOpacity(x,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(D,20),n.spin(l),c.getXml(function(b){v==c&&h(b)},function(b){n.stop();z.style.display="none";z.innerHTML="";y.innerHTML="";mxUtils.write(y,
d.setAttribute("title",k.toLocaleDateString()+" "+k.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(b){t!=c&&(n.stop(),null!=u&&(u.style.backgroundColor=""),t=c,u=d,u.style.backgroundColor="#ebf2f9",p=q=null,y.removeAttribute("title"),y.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",m.getModel().clear(),C.setAttribute("disabled","disabled"),B.setAttribute("disabled",
"disabled"),x.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),mxUtils.setOpacity(x,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(D,20),n.spin(l),c.getXml(function(b){t==c&&h(b)},function(b){n.stop();z.style.display="none";z.innerHTML="";y.innerHTML="";mxUtils.write(y,
mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(d,"dblclick",function(b){G.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);J.appendChild(d)}return d}(f[K]);null!=N&&K==f.length-1&&(M=N)}H.appendChild(J);h.appendChild(H)}else l.style.display="none",E.style.display="none",mxUtils.write(h,mxResources.get("noRevisions"));this.init=function(){null!=M&&M.click()};h=mxUtils.button(mxResources.get("close"),
function(){a.hideDialog()});h.className="geBtn";E.appendChild(z);E.appendChild(x);E.appendChild(w);E.appendChild(D);E.appendChild(A);a.editor.cancelFirst?(c.appendChild(h),c.appendChild(B),c.appendChild(L),c.appendChild(C),c.appendChild(G)):(c.appendChild(B),c.appendChild(L),c.appendChild(C),c.appendChild(G),c.appendChild(h));d.appendChild(c);d.appendChild(E);d.appendChild(y);this.container=d},DraftDialog=function(a,f,d,c,h,l,m){var b=document.createElement("div"),e=document.createElement("div");
e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";mxUtils.write(e,f);b.appendChild(e);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.marginTop="10px";g.style.width="640px";g.style.top="46px";g.style.bottom="74px";g.style.overflow="hidden";mxEvent.disableContextMenu(g);b.appendChild(g);var k=new Graph(g);k.setEnabled(!1);k.setPanning(!0);k.panningHandler.ignoreCell=!0;k.panningHandler.useLeftButtonForPanning=!0;
k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;f=mxUtils.parseXml(d);var n=a.editor.extractGraphModel(f.documentElement,!0),u=0,t=null,v=k.getGlobalVariable;k.getGlobalVariable=function(b){return"page"==b&&null!=t&&null!=t[u]?t[u].getAttribute("name"):"pagenumber"==b?u+1:v.apply(this,arguments)};k.getLinkForCell=function(){return null};f=mxUtils.button("",function(){k.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";
k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;f=mxUtils.parseXml(d);var n=a.editor.extractGraphModel(f.documentElement,!0),v=0,u=null,t=k.getGlobalVariable;k.getGlobalVariable=function(b){return"page"==b&&null!=u&&null!=u[v]?u[v].getAttribute("name"):"pagenumber"==b?v+1:t.apply(this,arguments)};k.getLinkForCell=function(){return null};f=mxUtils.button("",function(){k.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";
f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);d=mxUtils.button("",function(){k.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);e=mxUtils.button("",function(){k.maxFitScale=8;k.fit(8);k.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin=
"2px";mxUtils.setOpacity(e,60);var q=mxUtils.button("",function(){k.zoomActual();k.center()});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline="none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);h=mxUtils.button(m||mxResources.get("discard"),h);h.className="geBtn";var p=document.createElement("select");p.style.maxWidth="80px";p.style.position="relative";p.style.top="-2px";p.style.verticalAlign="bottom";p.style.marginRight=
"6px";p.style.display="none";c=mxUtils.button(l||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.width="640px";l.style.textAlign="right";m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=b){var a=b.getAttribute("background");
if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";g.style.backgroundColor=a;(new mxCodec(b.ownerDocument)).decode(b,k.getModel());k.maxFitScale=1;k.fit(8);k.center()}}function e(e){null!=e&&(e=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(e))).documentElement));return e}mxEvent.addListener(p,"change",function(b){u=parseInt(p.value);e(t[u]);mxEvent.consume(b)});if("mxfile"==n.nodeName){var c=n.getElementsByTagName("diagram");t=[];for(var q=0;q<c.length;q++)t.push(c[q]);0<t.length&&
e(t[u]);if(1<t.length)for(p.style.display="",q=0;q<t.length;q++)c=document.createElement("option"),mxUtils.write(c,t[q].getAttribute("name")||mxResources.get("pageWithNumber",[q+1])),c.setAttribute("value",q),q==u&&c.setAttribute("selected","selected"),p.appendChild(c)}else b(n)};m.appendChild(p);m.appendChild(f);m.appendChild(d);m.appendChild(q);m.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});f.className="geBtn";a.editor.cancelFirst?(l.appendChild(f),l.appendChild(h),
l.appendChild(c)):(l.appendChild(c),l.appendChild(h),l.appendChild(f));b.appendChild(l);b.appendChild(m);this.container=b},FindWindow=function(a,f,d,c,h){function l(){var a=b.model.getDescendants(b.model.getRoot()),c=n.value.toLowerCase(),k=u.checked?new RegExp(c):null,d=null;e!=c&&(e=c,g=null);var f=null==g;if(b.isEnabled()&&0<c.length)for(var v=0;v<a.length;v++){var h=b.view.getState(a[v]);if(null!=h&&null!=h.cell.value&&(f||null==d)&&(b.model.isVertex(h.cell)||b.model.isEdge(h.cell))){b.isHtmlLabel(h.cell)?
(t.innerHTML=b.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([t])):label=b.getLabel(h.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var l;if(!(l=null==k&&label.substring(0,c.length)===c)&&(l=null!=k)&&!(l=k.test(label)))a:{l=k;var m=h.cell;if("object"===typeof m.value&&null!=m.value.attributes)for(var m=m.value.attributes,z=0;z<m.length;z++)if("label"!=m[z].nodeName&&l.test(m[z].nodeValue.toLowerCase())){l=!0;break a}l=!1}if(l)if(f){d=h;break}else null==
if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";g.style.backgroundColor=a;(new mxCodec(b.ownerDocument)).decode(b,k.getModel());k.maxFitScale=1;k.fit(8);k.center()}}function e(e){null!=e&&(e=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(e))).documentElement));return e}mxEvent.addListener(p,"change",function(b){v=parseInt(p.value);e(u[v]);mxEvent.consume(b)});if("mxfile"==n.nodeName){var c=n.getElementsByTagName("diagram");u=[];for(var q=0;q<c.length;q++)u.push(c[q]);0<u.length&&
e(u[v]);if(1<u.length)for(p.style.display="",q=0;q<u.length;q++)c=document.createElement("option"),mxUtils.write(c,u[q].getAttribute("name")||mxResources.get("pageWithNumber",[q+1])),c.setAttribute("value",q),q==v&&c.setAttribute("selected","selected"),p.appendChild(c)}else b(n)};m.appendChild(p);m.appendChild(f);m.appendChild(d);m.appendChild(q);m.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});f.className="geBtn";a.editor.cancelFirst?(l.appendChild(f),l.appendChild(h),
l.appendChild(c)):(l.appendChild(c),l.appendChild(h),l.appendChild(f));b.appendChild(l);b.appendChild(m);this.container=b},FindWindow=function(a,f,d,c,h){function l(){var a=b.model.getDescendants(b.model.getRoot()),c=n.value.toLowerCase(),k=v.checked?new RegExp(c):null,d=null;e!=c&&(e=c,g=null);var f=null==g;if(b.isEnabled()&&0<c.length)for(var t=0;t<a.length;t++){var h=b.view.getState(a[t]);if(null!=h&&null!=h.cell.value&&(f||null==d)&&(b.model.isVertex(h.cell)||b.model.isEdge(h.cell))){b.isHtmlLabel(h.cell)?
(u.innerHTML=b.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([u])):label=b.getLabel(h.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var l;if(!(l=null==k&&label.substring(0,c.length)===c)&&(l=null!=k)&&!(l=k.test(label)))a:{l=k;var m=h.cell;if("object"===typeof m.value&&null!=m.value.attributes)for(var m=m.value.attributes,z=0;z<m.length;z++)if("label"!=m[z].nodeName&&l.test(m[z].nodeValue.toLowerCase())){l=!0;break a}l=!1}if(l)if(f){d=h;break}else null==
d&&(d=h)}f=f||h==g}null!=d?(g=d,b.setSelectionCell(g.cell),b.scrollCellToVisible(g.cell)):b.clearSelection();return!b.isEnabled()||0==c.length||null!=d}var m=a.actions.get("find"),b=a.editor.graph,e=null,g=null,k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.style.height="100%";var n=document.createElement("input");n.setAttribute("placeholder",mxResources.get("find"));n.setAttribute("type","text");n.style.marginTop="4px";n.style.marginBottom=
"6px";n.style.width="170px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";k.appendChild(n);var u=document.createElement("input");u.setAttribute("type","checkbox");k.appendChild(u);mxUtils.write(k,mxResources.get("regularExpression"));var t=document.createElement("div");mxUtils.br(k);var v=mxUtils.button(mxResources.get("reset"),function(){n.value="";n.style.backgroundColor="";e=g=null;n.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight=
"4px";v.style.backgroundColor="#f5f5f5";v.style.backgroundImage="none";v.className="geBtn";k.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{n.style.backgroundColor=l()?"":"#ffcfcf"}catch(q){a.handleError(q)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.style.backgroundColor="#4d90fe";v.style.backgroundImage="none";v.className="geBtn gePrimaryBtn";k.appendChild(v);mxEvent.addListener(n,"keyup",function(b){if(91==b.keyCode||17==b.keyCode)mxEvent.consume(b);
"6px";n.style.width="170px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";k.appendChild(n);var v=document.createElement("input");v.setAttribute("type","checkbox");k.appendChild(v);mxUtils.write(k,mxResources.get("regularExpression"));var u=document.createElement("div");mxUtils.br(k);var t=mxUtils.button(mxResources.get("reset"),function(){n.value="";n.style.backgroundColor="";e=g=null;n.focus()});t.setAttribute("title",mxResources.get("reset"));t.style.marginTop="6px";t.style.marginRight=
"4px";t.style.backgroundColor="#f5f5f5";t.style.backgroundImage="none";t.className="geBtn";k.appendChild(t);t=mxUtils.button(mxResources.get("find"),function(){try{n.style.backgroundColor=l()?"":"#ffcfcf"}catch(q){a.handleError(q)}});t.setAttribute("title",mxResources.get("find")+" (Enter)");t.style.marginTop="6px";t.style.backgroundColor="#4d90fe";t.style.backgroundImage="none";t.className="geBtn gePrimaryBtn";k.appendChild(t);mxEvent.addListener(n,"keyup",function(b){if(91==b.keyCode||17==b.keyCode)mxEvent.consume(b);
else if(27==b.keyCode)m.funct();else if(e!=n.value.toLowerCase()||13==b.keyCode)try{n.style.backgroundColor=l()?"":"#ffcfcf"}catch(p){n.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(k,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(m.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),k,f,d,c,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(n.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):b.container.focus()}))},TagsWindow=function(a,f,d,c,h){function l(a){a=null!=a?a:b.model.getDescendants(b.model.getRoot());for(var c=k.value.split(" "),g=[],p=0;p<a.length;p++)if(b.model.isVertex(a[p])||b.model.isEdge(a[p])){var d=null!=a[p].value&&"object"==typeof a[p].value?mxUtils.trim(a[p].value.getAttribute(e)||
""):"",n=!0;if(0<d.length)for(var d=d.toLowerCase().split(" "),f=0;f<c.length&&n;f++)var h=mxUtils.trim(c[f]).toLowerCase(),n=n&&(0==h.length||0<=mxUtils.indexOf(d,h));else n=0==mxUtils.trim(k.value).length;n&&g.push(a[p])}return g}function m(a,e){b.model.beginUpdate();try{for(var c=0;c<a.length;c++)b.model.setVisible(a[c],e)}finally{b.model.endUpdate()}}var b=a.editor.graph,e="tags",g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height=
"100%";var k=document.createElement("input");k.setAttribute("placeholder",mxResources.get("allTags"));k.setAttribute("type","text");k.style.marginTop="4px";k.style.width="240px";k.style.fontSize="12px";k.style.borderRadius="4px";k.style.padding="6px";g.appendChild(k);mxEvent.addListener(k,"dblclick",function(){var b=new FilenameDialog(a,e,mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&(e=b)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});
k.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(g);var n=mxUtils.button(mxResources.get("hide"),function(){m(l(),!1)});n.setAttribute("title",mxResources.get("hide"));n.style.marginTop="8px";n.style.marginRight="4px";n.style.backgroundColor="#f5f5f5";n.style.backgroundImage="none";n.className="geBtn";g.appendChild(n);n=mxUtils.button(mxResources.get("show"),function(){var a=l();m(a,!0);b.setSelectionCells(a)});n.setAttribute("title",mxResources.get("show"));n.style.marginTop=
"8px";n.style.marginRight="4px";n.style.backgroundColor="#f5f5f5";n.style.backgroundImage="none";n.className="geBtn";g.appendChild(n);var u=a.actions.get("tags"),n=mxUtils.button(mxResources.get("close"),function(){u.funct()});n.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");n.style.marginTop="8px";n.style.backgroundColor="#4d90fe";n.style.backgroundImage="none";n.className="geBtn gePrimaryBtn";g.appendChild(n);mxEvent.addListener(k,"keyup",function(b){13!=b.keyCode&&27!=b.keyCode||
u.funct()});this.window=new mxWindow(mxResources.get("tags"),g,f,d,c,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(k.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):b.container.focus()}))},AuthDialog=function(a,f,d,c){var h=document.createElement("div");h.style.textAlign=
"8px";n.style.marginRight="4px";n.style.backgroundColor="#f5f5f5";n.style.backgroundImage="none";n.className="geBtn";g.appendChild(n);var v=a.actions.get("tags"),n=mxUtils.button(mxResources.get("close"),function(){v.funct()});n.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");n.style.marginTop="8px";n.style.backgroundColor="#4d90fe";n.style.backgroundImage="none";n.className="geBtn gePrimaryBtn";g.appendChild(n);mxEvent.addListener(k,"keyup",function(b){13!=b.keyCode&&27!=b.keyCode||
v.funct()});this.window=new mxWindow(mxResources.get("tags"),g,f,d,c,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(k.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):b.container.focus()}))},AuthDialog=function(a,f,d,c){var h=document.createElement("div");h.style.textAlign=
"center";var l=document.createElement("p");l.style.fontSize="16pt";l.style.padding="0px";l.style.margin="0px";l.style.color="gray";mxUtils.write(l,mxResources.get("authorizationRequired"));var m="Unknown",b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.marginRight="10px";f==a.drive?(m=mxResources.get("googleDrive"),b.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==a.dropbox?(m=mxResources.get("dropbox"),b.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
f==a.oneDrive?(m=mxResources.get("oneDrive"),b.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==a.gitHub&&(m=mxResources.get("github"),b.src=IMAGE_PATH+"/github-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var e=document.createElement("input");e.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){c(e.checked)});m.insertBefore(b,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";h.appendChild(l);
h.appendChild(a);h.appendChild(m);d&&(d=document.createElement("p"),d.style.marginTop="20px",d.appendChild(e),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberMe")),d.appendChild(l),h.appendChild(d),e.checked=!0,e.defaultChecked=!0,mxEvent.addListener(l,"click",function(b){e.checked=!e.checked;mxEvent.consume(b)}));this.container=h},MoreShapesDialog=function(a,f,d){d=null!=d?d:a.sidebar.entries;var c=document.createElement("div");if(f){f=document.createElement("div");
@ -6048,9 +6048,9 @@ e.cloneNode(!1);q.style.fontWeight="bold";q.style.backgroundColor="#e5e5e5";q.st
b||"INPUT"!=mxEvent.getSource(b).nodeName)null!=c.imageCallback?c.imageCallback(l):null!=c.image?l.innerHTML='<img border="0" src="'+c.image+'"/>':(l.innerHTML="<br>",mxUtils.write(l,mxResources.get("noPreview"))),null!=m&&(m.style.backgroundColor=""),m=q,m.style.backgroundColor="#ebf2f9",null!=b&&mxEvent.consume(b)};mxEvent.addListener(q,"click",d);mxEvent.addListener(q,"dblclick",function(b){p.checked=!p.checked;mxEvent.consume(b)});b.push(function(){return p.checked?c.id:null});0==g&&0==k&&d()})(c.entries[k])})(d[g]);
c.style.padding="30px";c.appendChild(f);c.appendChild(h);c.appendChild(l);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=f.style.width,d.style.paddingTop="12px");var k=document.createElement("input");k.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=
document.createElement("span"),f.style.paddingRight="20px",f.appendChild(k),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(f,"click",function(b){mxEvent.getSource(b)!=k&&(k.checked=!k.checked,mxEvent.consume(b))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),d.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),
function(){a.hideDialog();for(var e=[],c=0;c<b.length;c++){var g=b[c].apply(this,arguments);null!=g&&e.push(g)}a.sidebar.showEntries(e.join(";"),k.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var u=document.createElement("table"),t=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var v=document.createElement("tr");u.style.width="100%";f=document.createElement("td");var n=document.createElement("td"),q=document.createElement("td"),p=mxUtils.bind(this,function(b,
e,c){var g=document.createElement("input");g.type="checkbox";u.appendChild(g);g.checked=a.sidebar.isEntryVisible(c);var q=document.createElement("span");mxUtils.write(q,e);e=document.createElement("div");e.style.display="block";e.appendChild(g);e.appendChild(q);mxEvent.addListener(q,"click",function(b){g.checked=!g.checked;mxEvent.consume(b)});b.appendChild(e);return function(){return g.checked?c:null}});v.appendChild(f);v.appendChild(n);v.appendChild(q);t.appendChild(v);u.appendChild(t);for(var b=
[],x=0,g=0;g<d.length;g++)for(t=0;t<d[g].entries.length;t++)x++;for(var w=[f,n,q],A=0,g=0;g<d.length;g++)(function(a){for(var e=0;e<a.entries.length;e++){var c=a.entries[e];b.push(p(w[Math.floor(A/(x/3))],c.title,c.id));A++}})(d[g]);c.appendChild(u);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";k=document.createElement("input");isLocalStorage&&(k.setAttribute("type","checkbox"),k.checked=!0,k.defaultChecked=!0,d.appendChild(k),f=document.createElement("span"),
function(){a.hideDialog();for(var e=[],c=0;c<b.length;c++){var g=b[c].apply(this,arguments);null!=g&&e.push(g)}a.sidebar.showEntries(e.join(";"),k.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var v=document.createElement("table"),u=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var t=document.createElement("tr");v.style.width="100%";f=document.createElement("td");var n=document.createElement("td"),q=document.createElement("td"),p=mxUtils.bind(this,function(b,
e,c){var g=document.createElement("input");g.type="checkbox";v.appendChild(g);g.checked=a.sidebar.isEntryVisible(c);var q=document.createElement("span");mxUtils.write(q,e);e=document.createElement("div");e.style.display="block";e.appendChild(g);e.appendChild(q);mxEvent.addListener(q,"click",function(b){g.checked=!g.checked;mxEvent.consume(b)});b.appendChild(e);return function(){return g.checked?c:null}});t.appendChild(f);t.appendChild(n);t.appendChild(q);u.appendChild(t);v.appendChild(u);for(var b=
[],x=0,g=0;g<d.length;g++)for(u=0;u<d[g].entries.length;u++)x++;for(var w=[f,n,q],A=0,g=0;g<d.length;g++)(function(a){for(var e=0;e<a.entries.length;e++){var c=a.entries[e];b.push(p(w[Math.floor(A/(x/3))],c.title,c.id));A++}})(d[g]);c.appendChild(v);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";k=document.createElement("input");isLocalStorage&&(k.setAttribute("type","checkbox"),k.checked=!0,k.defaultChecked=!0,d.appendChild(k),f=document.createElement("span"),
mxUtils.write(f," "+mxResources.get("rememberThisSetting")),d.appendChild(f),mxEvent.addListener(f,"click",function(b){k.checked=!k.checked;mxEvent.consume(b)}));c.appendChild(d);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var e=["search"],c=0;c<b.length;c++){var g=b[c].apply(this,arguments);null!=g&&e.push(g)}a.sidebar.showEntries(0<e.length?e.join(";"):"",k.checked);a.hideDialog()});n.className=
"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(f),d.appendChild(n)):(d.appendChild(n),d.appendChild(f));c.appendChild(d);this.container=c},PluginsDialog=function(a){function f(){if(0==h.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var b=0;b<h.length;b++){var e=document.createElement("span");e.style.whiteSpace="nowrap";var d=document.createElement("span");d.className="geSprite geSprite-delete";
d.style.position="relative";d.style.cursor="pointer";d.style.top="5px";d.style.marginRight="4px";d.style.display="inline-block";e.appendChild(d);mxUtils.write(e,h[b]);c.appendChild(e);mxUtils.br(c);mxEvent.addListener(d,"click",function(b){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+h[b]+'"?',function(){h.splice(b,1);f()})}}(b))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var h=mxSettings.getPlugins().slice();
@ -6058,36 +6058,36 @@ d.appendChild(c);f();var l=mxUtils.button(mxResources.get("add"),function(){var
")");a.showDialog(b.container,300,80,!0,!0);b.init()});l.className="geBtn";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";var b=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(h);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});b.className="geBtn gePrimaryBtn";var e=document.createElement("div");e.style.marginTop="14px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(m),e.appendChild(l),
e.appendChild(b)):(e.appendChild(l),e.appendChild(b),e.appendChild(m));d.appendChild(e);this.container=d},EditGeometryDialog=function(a,f){var d=a.editor.graph,c=1==f.length?d.getCellGeometry(f[0]):null,h=document.createElement("div"),l=document.createElement("table"),m=document.createElement("tbody"),b=document.createElement("tr"),e=document.createElement("td"),g=document.createElement("td");l.style.paddingLeft="6px";mxUtils.write(e,mxResources.get("left")+":");var k=document.createElement("input");
k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";this.init=function(){k.focus();k.select()};g.appendChild(k);b.appendChild(e);b.appendChild(g);m.appendChild(b);b=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";g.appendChild(n);b.appendChild(e);b.appendChild(g);m.appendChild(b);
b=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.width:"";g.appendChild(u);b.appendChild(e);b.appendChild(g);m.appendChild(b);b=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("height")+":");var t=document.createElement("input");
t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";g.appendChild(t);b.appendChild(e);b.appendChild(g);m.appendChild(b);b=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=1==f.length?mxUtils.getValue(d.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(v);b.appendChild(e);
b.appendChild(g);m.appendChild(b);l.appendChild(m);h.appendChild(l);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var b=0;b<f.length;b++){var e=d.getCellGeometry(f[b]);null!=e&&(e=e.clone(),d.isCellMovable(f[b])&&(0<mxUtils.trim(k.value).length&&(e.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(e.y=Number(n.value))),d.isCellResizable(f[b])&&(0<mxUtils.trim(u.value).length&&
(e.width=Number(u.value)),0<mxUtils.trim(t.value).length&&(e.height=Number(t.value))),d.getModel().setGeometry(f[b],e));0<mxUtils.trim(v.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(v.value),[f[b]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(h,"keypress",function(b){13==b.keyCode&&q.click()});l=document.createElement("div");l.style.marginTop="20px";l.style.textAlign="right";a.editor.cancelFirst?(l.appendChild(c),l.appendChild(q)):(l.appendChild(q),l.appendChild(c));
h.appendChild(l);this.container=h},LibraryDialog=function(a,f,d,c,h,l){function m(b){for(b=document.elementFromPoint(b.clientX,b.clientY);null!=b&&b.parentNode!=t;)b=b.parentNode;var a=null;if(null!=b)for(var e=t.firstChild,a=0;null!=e&&e!=b;)e=e.nextSibling,a++;return a}function b(e,c,g,d,f,n,h,l,x){try{if(null==c||"image/"==c.substring(0,6))if(null==e&&null!=h||null==q[e]){var u=function(){G.innerHTML="";G.style.cursor="pointer";G.style.whiteSpace="nowrap";G.style.textOverflow="ellipsis";mxUtils.write(G,
null!=M.title&&0<M.title.length?M.title:mxResources.get("untitled"));G.style.color=null==M.title||0==M.title.length?"#d0d0d0":""};t.style.backgroundImage="";v.style.display="none";var C=f,z=n;if(f>a.maxImageSize||n>a.maxImageSize){var L=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,n));f*=L;n*=L}C>z?(z=Math.round(100*z/C),C=100):(C=Math.round(100*C/z),z=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=mxClient.IS_QUIRKS?"inline":
b=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c?c.width:"";g.appendChild(v);b.appendChild(e);b.appendChild(g);m.appendChild(b);b=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("height")+":");var u=document.createElement("input");
u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.height:"";g.appendChild(u);b.appendChild(e);b.appendChild(g);m.appendChild(b);b=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=1==f.length?mxUtils.getValue(d.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(t);b.appendChild(e);
b.appendChild(g);m.appendChild(b);l.appendChild(m);h.appendChild(l);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var b=0;b<f.length;b++){var e=d.getCellGeometry(f[b]);null!=e&&(e=e.clone(),d.isCellMovable(f[b])&&(0<mxUtils.trim(k.value).length&&(e.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(e.y=Number(n.value))),d.isCellResizable(f[b])&&(0<mxUtils.trim(v.value).length&&
(e.width=Number(v.value)),0<mxUtils.trim(u.value).length&&(e.height=Number(u.value))),d.getModel().setGeometry(f[b],e));0<mxUtils.trim(t.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[f[b]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(h,"keypress",function(b){13==b.keyCode&&q.click()});l=document.createElement("div");l.style.marginTop="20px";l.style.textAlign="right";a.editor.cancelFirst?(l.appendChild(c),l.appendChild(q)):(l.appendChild(q),l.appendChild(c));
h.appendChild(l);this.container=h},LibraryDialog=function(a,f,d,c,h,l){function m(b){for(b=document.elementFromPoint(b.clientX,b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var a=null;if(null!=b)for(var e=u.firstChild,a=0;null!=e&&e!=b;)e=e.nextSibling,a++;return a}function b(e,c,g,d,f,n,h,l,x){try{if(null==c||"image/"==c.substring(0,6))if(null==e&&null!=h||null==q[e]){var v=function(){G.innerHTML="";G.style.cursor="pointer";G.style.whiteSpace="nowrap";G.style.textOverflow="ellipsis";mxUtils.write(G,
null!=M.title&&0<M.title.length?M.title:mxResources.get("untitled"));G.style.color=null==M.title||0==M.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var C=f,z=n;if(f>a.maxImageSize||n>a.maxImageSize){var L=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,n));f*=L;n*=L}C>z?(z=Math.round(100*z/C),C=100):(C=Math.round(100*C/z),z=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=mxClient.IS_QUIRKS?"inline":
"inline-block";y.style.position="relative";y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=e){var F=document.createElement("img");F.setAttribute("src",A.convert(e));F.style.width=C+"px";F.style.height=z+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-z)/2)+"px";F.style.paddingLeft=Math.floor((100-C)/2)+"px";y.appendChild(F)}else if(null!=h){var B=a.stringToCells(a.editor.graph.decompress(h.xml));0<B.length&&(a.sidebar.createThumb(B,
100,100,y,null,!0,!1),y.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",y.firstChild.style.cursor="")}var E=document.createElement("img");E.setAttribute("src",Editor.closeImage);E.setAttribute("border","0");E.setAttribute("title",mxResources.get("delete"));E.setAttribute("align","top");E.style.paddingTop="4px";E.style.marginLeft="-22px";E.style.cursor="pointer";mxEvent.addListener(E,"dragstart",function(b){mxEvent.consume(b)});null==e&&null!=h&&(E.style.position="relative");(function(b,
a,e){mxEvent.addListener(E,"click",function(c){q[a]=null;for(var g=0;g<k.length;g++)if(null!=k[g].data&&k[g].data==a||null!=k[g].xml&&null!=e&&k[g].xml==e.xml){k.splice(g,1);break}y.parentNode.removeChild(b);0==k.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(c)});mxEvent.addListener(E,"dblclick",function(b){mxEvent.consume(b)})})(y,e,h);y.appendChild(E);y.style.marginBottom="30px";var G=document.createElement("div");G.style.position="absolute";
G.style.boxSizing="border-box";G.style.bottom="-18px";G.style.left="10px";G.style.right="10px";G.style.backgroundColor="#ffffff";G.style.overflow="hidden";G.style.textAlign="center";var M=null;null!=e?(M={data:e,w:f,h:n,title:x},null!=l&&(M.aspect=l),q[e]=F,k.push(M)):null!=h&&(h.aspect="fixed",k.push(h),M=h);mxEvent.addListener(G,"keydown",function(b){13==b.keyCode&&null!=w&&(w(),w=null,mxEvent.consume(b))});u();y.appendChild(G);mxEvent.addListener(G,"mousedown",function(b){"true"!=G.getAttribute("contentEditable")&&
mxEvent.consume(b)});B=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=new FilenameDialog(a,M.title||"",mxResources.get("ok"),function(b){null!=b&&(M.title=b,u())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=G.getAttribute("contentEditable")){null!=w&&(w(),w=null);if(null==M.title||0==M.title.length)G.innerHTML="";G.style.textOverflow="";G.style.whiteSpace=
"";G.style.cursor="text";G.style.color="";G.setAttribute("contentEditable","true");G.focus();document.execCommand("selectAll",!1,null);w=function(){G.removeAttribute("contentEditable");G.style.cursor="pointer";M.title=G.innerHTML;u()};mxEvent.consume(b)}};mxEvent.addListener(G,"click",B);mxEvent.addListener(y,"dblclick",B);t.appendChild(y);mxEvent.addListener(y,"dragstart",function(b){null==e&&null!=h&&(E.style.visibility="hidden",G.style.visibility="hidden");mxClient.IS_FF&&null!=h.xml&&b.dataTransfer.setData("Text",
a,e){mxEvent.addListener(E,"click",function(c){q[a]=null;for(var g=0;g<k.length;g++)if(null!=k[g].data&&k[g].data==a||null!=k[g].xml&&null!=e&&k[g].xml==e.xml){k.splice(g,1);break}y.parentNode.removeChild(b);0==k.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(c)});mxEvent.addListener(E,"dblclick",function(b){mxEvent.consume(b)})})(y,e,h);y.appendChild(E);y.style.marginBottom="30px";var G=document.createElement("div");G.style.position="absolute";
G.style.boxSizing="border-box";G.style.bottom="-18px";G.style.left="10px";G.style.right="10px";G.style.backgroundColor="#ffffff";G.style.overflow="hidden";G.style.textAlign="center";var M=null;null!=e?(M={data:e,w:f,h:n,title:x},null!=l&&(M.aspect=l),q[e]=F,k.push(M)):null!=h&&(h.aspect="fixed",k.push(h),M=h);mxEvent.addListener(G,"keydown",function(b){13==b.keyCode&&null!=w&&(w(),w=null,mxEvent.consume(b))});v();y.appendChild(G);mxEvent.addListener(G,"mousedown",function(b){"true"!=G.getAttribute("contentEditable")&&
mxEvent.consume(b)});B=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=new FilenameDialog(a,M.title||"",mxResources.get("ok"),function(b){null!=b&&(M.title=b,v())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=G.getAttribute("contentEditable")){null!=w&&(w(),w=null);if(null==M.title||0==M.title.length)G.innerHTML="";G.style.textOverflow="";G.style.whiteSpace=
"";G.style.cursor="text";G.style.color="";G.setAttribute("contentEditable","true");G.focus();document.execCommand("selectAll",!1,null);w=function(){G.removeAttribute("contentEditable");G.style.cursor="pointer";M.title=G.innerHTML;v()};mxEvent.consume(b)}};mxEvent.addListener(G,"click",B);mxEvent.addListener(y,"dblclick",B);u.appendChild(y);mxEvent.addListener(y,"dragstart",function(b){null==e&&null!=h&&(E.style.visibility="hidden",G.style.visibility="hidden");mxClient.IS_FF&&null!=h.xml&&b.dataTransfer.setData("Text",
h.xml);p=m(b);mxClient.IS_GC&&(y.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(y.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(y,30);E.style.visibility="";G.style.visibility=""},0)});mxEvent.addListener(y,"dragend",function(b){"hidden"==E.style.visibility&&(E.style.visibility="",G.style.visibility="");p=null;mxUtils.setOpacity(y,100);mxUtils.setPrefixedStyle(y.style,"transform",null)})}else D||(D=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=
!1;try{if(a.spinner.stop(),C=mxUtils.parseXml(e),"mxlibrary"==C.documentElement.nodeName){z=JSON.parse(mxUtils.getTextContent(C.documentElement));if(null!=z&&0<z.length)for(var H=0;H<z.length;H++)null!=z[H].xml?b(null,null,0,0,0,0,z[H]):b(z[H].data,null,0,0,z[H].w,z[H].h,null,"fixed",z[H].title);f=!0}else if("mxfile"==C.documentElement.nodeName){for(var J=C.documentElement.getElementsByTagName("diagram"),H=0;H<J.length;H++){var z=mxUtils.getTextContent(J[H]),B=a.stringToCells(a.editor.graph.decompress(z)),
S=a.editor.graph.getBoundingBoxFromGeometry(B);b(null,null,0,0,0,0,{xml:z,w:S.width,h:S.height})}f=!0}}catch(X){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(X){}return null}function e(b){b.dataTransfer.dropEffect=null!=p?"move":"copy";b.stopPropagation();b.preventDefault()}function g(e){e.stopPropagation();e.preventDefault();D=!1;x=m(e);if(null!=p)null!=x&&x<t.children.length?(k.splice(x>p?x-1:x,0,k.splice(p,1)[0]),t.insertBefore(t.children[p],t.children[x])):
(k.push(k.splice(p,1)[0]),t.appendChild(t.children[p]));else if(0<e.dataTransfer.files.length)a.importFiles(e.dataTransfer.files,0,0,a.maxImageSize,y(e));else if(0<=mxUtils.indexOf(e.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(e.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){b(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}e.stopPropagation();e.preventDefault()}
var k=[];d=document.createElement("div");d.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";d.appendChild(n);mxUtils.write(n,mxResources.get("filename")+":");null==f&&(f=a.defaultLibraryName+".xml");var u=document.createElement("input");u.setAttribute("value",f);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width="500px";null==h||h.isRenamable()||u.setAttribute("disabled","true");this.init=function(){if(null==h||h.isRenamable())u.focus(),
mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};n.appendChild(u);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");
var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));d.appendChild(v);var q={},p=null,x=null,w=null;f=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=w&&(w(),w=null,mxEvent.consume(b))};mxEvent.addListener(t,"mousedown",f);mxEvent.addListener(t,"pointerdown",f);mxEvent.addListener(t,"touchstart",
f);var A=new mxUrlConverter,D=!1;if(null!=c)for(f=0;f<c.length;f++)n=c[f],b(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(t,"dragleave",function(b){v.style.cursor="";for(var a=mxEvent.getSource(b);null!=a;){if(a==t||a==v){b.stopPropagation();b.preventDefault();break}a=a.parentNode}});var y=function(e){return function(c,g,q,k,d,p,f,n,v){null!=v&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,v.name)?a.parseFile(v,mxUtils.bind(this,function(c){4==c.readyState&&
(a.spinner.stop(),200<=c.status&&299>=c.status&&(b(c.responseText,g,q,k,d,p,f,"fixed",mxEvent.isAltDown(e)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(b(c,g,q,k,d,p,f,"fixed",mxEvent.isAltDown(e)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",e);mxEvent.addListener(t,"drop",g);mxEvent.addListener(v,"dragover",e);mxEvent.addListener(v,"drop",g);d.appendChild(t);c=document.createElement("div");
c.style.textAlign="right";c.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);window.chrome&&chrome.app&&chrome.app.runtime?u.setAttribute("disabled","disabled"):(n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k),e=u.value;/(\.xml)$/i.test(e)||(e+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml",null,null,!0):
(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")}),n.setAttribute("id","btnDownload"),n.className="geBtn",c.appendChild(n));var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B,"change",function(b){D=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,e,c,g,q,k,d,p,f){y(b)(a,e,c,g,q,k,d,p,f);B.value=""});t.scrollTop=
t.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=w&&(w(),w=null);B.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=w&&(w(),w=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,e,c){D=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var g=a.indexOf(",");0<g&&(a=a.substring(0,g)+";base64,"+a.substring(g+1))}b(a,null,0,0,e,c);t.scrollTop=t.scrollHeight}})});
n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,e,c,g){a.saveLibrary(b,e,c,g)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=w&&(w(),w=null);this.saveBtnClickHandler(u.value,k,h,l)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n);a.editor.cancelFirst||c.appendChild(f);d.appendChild(c);this.container=d},EditShapeDialog=function(a,f,d,c,h){c=null!=c?c:300;h=null!=h?h:120;var l,
S=a.editor.graph.getBoundingBoxFromGeometry(B);b(null,null,0,0,0,0,{xml:z,w:S.width,h:S.height})}f=!0}}catch(X){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(X){}return null}function e(b){b.dataTransfer.dropEffect=null!=p?"move":"copy";b.stopPropagation();b.preventDefault()}function g(e){e.stopPropagation();e.preventDefault();D=!1;x=m(e);if(null!=p)null!=x&&x<u.children.length?(k.splice(x>p?x-1:x,0,k.splice(p,1)[0]),u.insertBefore(u.children[p],u.children[x])):
(k.push(k.splice(p,1)[0]),u.appendChild(u.children[p]));else if(0<e.dataTransfer.files.length)a.importFiles(e.dataTransfer.files,0,0,a.maxImageSize,y(e));else if(0<=mxUtils.indexOf(e.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(e.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){b(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}e.stopPropagation();e.preventDefault()}
var k=[];d=document.createElement("div");d.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";d.appendChild(n);mxUtils.write(n,mxResources.get("filename")+":");null==f&&(f=a.defaultLibraryName+".xml");var v=document.createElement("input");v.setAttribute("value",f);v.style.marginRight="20px";v.style.marginLeft="10px";v.style.width="500px";null==h||h.isRenamable()||v.setAttribute("disabled","true");this.init=function(){if(null==h||h.isRenamable())v.focus(),
mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};n.appendChild(v);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");
var t=document.createElement("div");t.style.position="absolute";t.style.width="640px";t.style.top="260px";t.style.textAlign="center";t.style.fontSize="22px";t.style.color="#a0c3ff";mxUtils.write(t,mxResources.get("dragImagesHere"));d.appendChild(t);var q={},p=null,x=null,w=null;f=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=w&&(w(),w=null,mxEvent.consume(b))};mxEvent.addListener(u,"mousedown",f);mxEvent.addListener(u,"pointerdown",f);mxEvent.addListener(u,"touchstart",
f);var A=new mxUrlConverter,D=!1;if(null!=c)for(f=0;f<c.length;f++)n=c[f],b(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(u,"dragleave",function(b){t.style.cursor="";for(var a=mxEvent.getSource(b);null!=a;){if(a==u||a==t){b.stopPropagation();b.preventDefault();break}a=a.parentNode}});var y=function(e){return function(c,g,q,k,d,p,f,n,t){null!=t&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,t.name)?a.parseFile(t,mxUtils.bind(this,function(c){4==c.readyState&&
(a.spinner.stop(),200<=c.status&&299>=c.status&&(b(c.responseText,g,q,k,d,p,f,"fixed",mxEvent.isAltDown(e)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(b(c,g,q,k,d,p,f,"fixed",mxEvent.isAltDown(e)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",e);mxEvent.addListener(u,"drop",g);mxEvent.addListener(t,"dragover",e);mxEvent.addListener(t,"drop",g);d.appendChild(u);c=document.createElement("div");
c.style.textAlign="right";c.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);window.chrome&&chrome.app&&chrome.app.runtime?v.setAttribute("disabled","disabled"):(n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(k),e=v.value;/(\.xml)$/i.test(e)||(e+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml",null,null,!0):
(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")}),n.setAttribute("id","btnDownload"),n.className="geBtn",c.appendChild(n));var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B,"change",function(b){D=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,e,c,g,q,k,d,p,f){y(b)(a,e,c,g,q,k,d,p,f);B.value=""});u.scrollTop=
u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=w&&(w(),w=null);B.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=w&&(w(),w=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,e,c){D=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var g=a.indexOf(",");0<g&&(a=a.substring(0,g)+";base64,"+a.substring(g+1))}b(a,null,0,0,e,c);u.scrollTop=u.scrollHeight}})});
n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,e,c,g){a.saveLibrary(b,e,c,g)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=w&&(w(),w=null);this.saveBtnClickHandler(v.value,k,h,l)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n);a.editor.cancelFirst||c.appendChild(f);d.appendChild(c);this.container=d},EditShapeDialog=function(a,f,d,c,h){c=null!=c?c:300;h=null!=h?h:120;var l,
m,b=document.createElement("table"),e=document.createElement("tbody");b.style.cellPadding="4px";l=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,d);l.appendChild(m);e.appendChild(l);l=document.createElement("tr");m=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=c-200+"px";g.style.height=h+"px";this.textarea=g;this.init=function(){g.focus();
g.scrollTop=0};m.appendChild(g);l.appendChild(m);m=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=h+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);m.appendChild(d);var k=new Graph(d);k.setEnabled(!1);var n=a.editor.graph.cloneCells([f])[0];k.addCells([n]);d=k.view.getState(n);var u="";null!=d.shape&&null!=d.shape.stencil&&(u=mxUtils.getPrettyXml(d.shape.stencil.desc));
mxUtils.write(g,u||"");d=k.getGraphBounds();h=Math.min(160/d.width,(h-40)/d.height);k.view.scaleAndTranslate(h,20/h-d.x,20/h-d.y);l.appendChild(m);e.appendChild(l);l=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),
function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),d.className="geBtn",m.appendChild(d));var t=function(b,e,c){var q=g.value,k=mxUtils.parseXml(q),q=mxUtils.getPrettyXml(k.documentElement),k=k.documentElement.getElementsByTagName("parsererror");if(null!=k&&0<k.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),k=!b.model.contains(e),!c||k||q!=u){q=a.editor.graph.compress(q);b.getModel().beginUpdate();
try{if(k){var d=a.editor.graph.getInsertPoint();e.geometry.x=d.x;e.geometry.y=d.y;b.addCell(e)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+q+")",[e])}catch(D){throw D;}finally{b.getModel().endUpdate()}k&&b.setSelectionCell(e)}};d=mxUtils.button(mxResources.get("preview"),function(){t(k,n,!1)});d.className="geBtn";m.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,f,!0)});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(h);
g.scrollTop=0};m.appendChild(g);l.appendChild(m);m=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=h+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);m.appendChild(d);var k=new Graph(d);k.setEnabled(!1);var n=a.editor.graph.cloneCells([f])[0];k.addCells([n]);d=k.view.getState(n);var v="";null!=d.shape&&null!=d.shape.stencil&&(v=mxUtils.getPrettyXml(d.shape.stencil.desc));
mxUtils.write(g,v||"");d=k.getGraphBounds();h=Math.min(160/d.width,(h-40)/d.height);k.view.scaleAndTranslate(h,20/h-d.x,20/h-d.y);l.appendChild(m);e.appendChild(l);l=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),
function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),d.className="geBtn",m.appendChild(d));var u=function(b,e,c){var q=g.value,k=mxUtils.parseXml(q),q=mxUtils.getPrettyXml(k.documentElement),k=k.documentElement.getElementsByTagName("parsererror");if(null!=k&&0<k.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),k=!b.model.contains(e),!c||k||q!=v){q=a.editor.graph.compress(q);b.getModel().beginUpdate();
try{if(k){var d=a.editor.graph.getInsertPoint();e.geometry.x=d.x;e.geometry.y=d.y;b.addCell(e)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+q+")",[e])}catch(D){throw D;}finally{b.getModel().endUpdate()}k&&b.setSelectionCell(e)}};d=mxUtils.button(mxResources.get("preview"),function(){u(k,n,!1)});d.className="geBtn";m.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,f,!0)});d.className="geBtn gePrimaryBtn";m.appendChild(d);a.editor.cancelFirst||m.appendChild(h);
l.appendChild(m);e.appendChild(l);b.appendChild(e);this.container=b},CustomDialog=function(a,f,d,c,h,l){var m=document.createElement("div");m.appendChild(f);f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="right";var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});b.className="geBtn";a.editor.cancelFirst&&f.appendChild(b);if(!a.isOffline()&&null!=l){var e=mxUtils.button(mxResources.get("help"),function(){window.open(l)});e.className="geBtn";
f.appendChild(e)}h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});f.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(b);m.appendChild(f);this.cancelBtn=b;this.okButton=h;this.container=m};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
@ -6103,80 +6103,80 @@ var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(a,e)}
a=0;a<b.plugins.length;a++)mxscript(b.plugins[a])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&(Editor.prototype.editBlankUrl+="&dev=1",Editor.prototype.editBlankFallbackUrl+="&dev=1");var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var e=b.getElementsByTagName("parsererror");if(null!=e&&0<e.length){var e=e[0],c=e.getElementsByTagName("div");
null!=c&&0<c.length&&(e=c[0]);throw{message:mxUtils.getTextContent(e)};}if("mxGraphModel"==b.nodeName){e=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=e&&""!=e)e!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[e]:mxUtils.load(STYLE_PATH+"/"+e+".xml").getDocumentElement(),null!=c&&(g=new mxCodec(c.ownerDocument),g.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
null!=c){var g=new mxCodec(c.ownerDocument);g.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=e;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");e=b.getAttribute("backgroundImage");null!=e?(e=JSON.parse(e),this.graph.setBackgroundImage(new mxImage(e.src,e.width,e.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(b){b=null!=b?b:!0;var a=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&a.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&a.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));a.setAttribute("math",this.graph.mathEnabled?"1":"0");a.setAttribute("shadow",this.graph.shadowVisible?
"1":"0");return a};Editor.prototype.isDataSvg=function(b){try{var a=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=a&&(null!=a&&"<"!=a.charAt(0)&&"%"!=a.charAt(0)&&(a=unescape(window.atob?atob(a):Base64.decode(cont,a))),null!=a&&"%"==a.charAt(0)&&(a=decodeURIComponent(a)),null!=a&&0<a.length)){var e=mxUtils.parseXml(a).documentElement;return"mxfile"==e.nodeName||"mxGraphModel"==e.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(b,a){if(null!=b&&"undefined"!==
typeof pako){var e=b.ownerDocument.getElementsByTagName("div"),c=[];if(null!=e&&0<e.length)for(var g=0;g<e.length;g++)if("mxgraph"==e[g].getAttribute("class")){c.push(e[g]);break}0<c.length&&(e=c[0].getAttribute("data-mxgraph"),null!=e?(c=JSON.parse(e),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),b=c.documentElement)):(c=c[0].getElementsByTagName("div"),0<c.length&&(e=mxUtils.getTextContent(c[0]),e=this.graph.decompress(e),0<e.length&&(c=mxUtils.parseXml(e),b=c.documentElement))))}if(null!=b&&
"svg"==b.nodeName)if(e=b.getAttribute("content"),null!=e&&"<"!=e.charAt(0)&&"%"!=e.charAt(0)&&(e=unescape(window.atob?atob(e):Base64.decode(cont,e))),null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e)),null!=e&&0<e.length)b=mxUtils.parseXml(e).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||a||(c=null,"diagram"==b.nodeName?c=b:"mxfile"==b.nodeName&&(e=b.getElementsByTagName("diagram"),0<e.length&&(c=e[Math.max(0,Math.min(e.length-1,urlParams.page||0))])),null!=c&&
(e=this.graph.decompress(mxUtils.getTextContent(c)),null!=e&&0<e.length&&(b=mxUtils.parseXml(e).documentElement)));null==b||"mxGraphModel"==b.nodeName||a&&"mxfile"==b.nodeName||(b=null);return b};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(b,e){b=null!=b?b:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,
messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(e||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};
Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var a=Editor.prototype.init;Editor.prototype.init=function(){a.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var g=
document.createElement("script");g.type="text/javascript";g.src=b;c[0].parentNode.appendChild(g)}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;var e=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
function(b,a,c,g){void 0!==a?e.push(a.replace(/\\'/g,"'")):void 0!==c?e.push(c.replace(/\\"/g,'"')):void 0!==g&&e.push(g);return""});/,\s*$/.test(b)&&e.push("");return e};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,e){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(b){b=null!=b?b:!0;var e=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&e.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&e.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));e.setAttribute("math",this.graph.mathEnabled?"1":"0");e.setAttribute("shadow",this.graph.shadowVisible?
"1":"0");return e};Editor.prototype.isDataSvg=function(b){try{var e=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=e&&(null!=e&&"<"!=e.charAt(0)&&"%"!=e.charAt(0)&&(e=unescape(window.atob?atob(e):Base64.decode(cont,e))),null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e)),null!=e&&0<e.length)){var a=mxUtils.parseXml(e).documentElement;return"mxfile"==a.nodeName||"mxGraphModel"==a.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(b,e){if(null!=b&&"undefined"!==
typeof pako){var a=b.ownerDocument.getElementsByTagName("div"),c=[];if(null!=a&&0<a.length)for(var g=0;g<a.length;g++)if("mxgraph"==a[g].getAttribute("class")){c.push(a[g]);break}0<c.length&&(a=c[0].getAttribute("data-mxgraph"),null!=a?(c=JSON.parse(a),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),b=c.documentElement)):(c=c[0].getElementsByTagName("div"),0<c.length&&(a=mxUtils.getTextContent(c[0]),a=this.graph.decompress(a),0<a.length&&(c=mxUtils.parseXml(a),b=c.documentElement))))}if(null!=b&&
"svg"==b.nodeName)if(a=b.getAttribute("content"),null!=a&&"<"!=a.charAt(0)&&"%"!=a.charAt(0)&&(a=unescape(window.atob?atob(a):Base64.decode(cont,a))),null!=a&&"%"==a.charAt(0)&&(a=decodeURIComponent(a)),null!=a&&0<a.length)b=mxUtils.parseXml(a).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||e||(c=null,"diagram"==b.nodeName?c=b:"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),0<a.length&&(c=a[Math.max(0,Math.min(a.length-1,urlParams.page||0))])),null!=c&&
(a=this.graph.decompress(mxUtils.getTextContent(c)),null!=a&&0<a.length&&(b=mxUtils.parseXml(a).documentElement)));null==b||"mxGraphModel"==b.nodeName||e&&"mxfile"==b.nodeName||(b=null);return b};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(b,a){b=null!=b?b:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,
messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(a||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};
Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var e=Editor.prototype.init;Editor.prototype.init=function(){e.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,a){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var g=
document.createElement("script");g.type="text/javascript";g.src=b;c[0].parentNode.appendChild(g)}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;var a=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
function(b,e,c,g){void 0!==e?a.push(e.replace(/\\'/g,"'")):void 0!==c?a.push(c.replace(/\\"/g,'"')):void 0!==g&&a.push(g);return""});/,\s*$/.test(b)&&a.push("");return a};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,a){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
mxSettings.save()}}if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var b=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed?b.apply(this,arguments):this.clear()};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=e.apply(this,arguments);var a=this.editorUi;
if(a.editor.graph.isEnabled()){var c=a.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return a.editor.autosave},function(b){a.editor.setAutosave(b)},{install:function(b){this.listener=function(){b(a.editor.autosave)};a.editor.addListener("autosaveChanged",this.listener)},destroy:function(){a.editor.removeListener(this.listener)}}),b.appendChild(c))}return b};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},
{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
g.apply(this,arguments)};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var e=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));e.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");e.style.marginBottom="2px";e.style.width="100px";e.style.marginRight="2px";b.appendChild(e);e=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("pasteStyle").funct()}));e.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");e.style.marginBottom="2px";e.style.width="100px";b.appendChild(e);mxUtils.br(b);return k.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(b){function e(b){function e(b){var e=mxUtils.button("",function(e){c.getModel().beginUpdate();try{var a=c.getSelectionCells();for(e=0;e<a.length;e++){for(var g=c.getModel().getStyle(a[e]),
d=0;d<k.length;d++)g=mxUtils.removeStylename(g,k[d]);null!=b?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,b.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,b.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,b.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,null));c.getModel().setStyle(a[e],g)}}finally{c.getModel().endUpdate()}});e.style.width=
"36px";e.style.height="30px";e.style.margin="0px 6px 6px 0px";null!=b?(null!=b.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?e.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":e.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":e.style.backgroundColor=b.fill,e.style.border="1px solid "+b.stroke):(e.style.backgroundColor="#ffffff",e.style.border="1px solid #000000");
g.appendChild(e)}g.innerHTML="";for(var a=0;a<b.length;a++)0<a&&0==mxUtils.mod(a,4)&&mxUtils.br(g),e(b[a])}function a(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="normal";g.style.paddingLeft="24px";g.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(g);
g.apply(this,arguments)};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var a=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));a.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");a.style.marginBottom="2px";a.style.width="100px";a.style.marginRight="2px";b.appendChild(a);a=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("pasteStyle").funct()}));a.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");a.style.marginBottom="2px";a.style.width="100px";b.appendChild(a);mxUtils.br(b);return k.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(b){function a(b){function a(b){var a=mxUtils.button("",function(a){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(a=0;a<e.length;a++){for(var g=c.getModel().getStyle(e[a]),
d=0;d<k.length;d++)g=mxUtils.removeStylename(g,k[d]);null!=b?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,b.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,b.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,b.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,null));c.getModel().setStyle(e[a],g)}}finally{c.getModel().endUpdate()}});a.style.width=
"36px";a.style.height="30px";a.style.margin="0px 6px 6px 0px";null!=b?(null!=b.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":a.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":a.style.backgroundColor=b.fill,a.style.border="1px solid "+b.stroke):(a.style.backgroundColor="#ffffff",a.style.border="1px solid #000000");
g.appendChild(a)}g.innerHTML="";for(var e=0;e<b.length;e++)0<e&&0==mxUtils.mod(e,4)&&mxUtils.br(g),a(b[e])}function e(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="normal";g.style.paddingLeft="24px";g.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(g);
var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var d=document.createElement("div");d.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);e(this.defaultColorSchemes[this.editorUi.currentScheme])}));var f=document.createElement("div");f.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(b.appendChild(d),b.appendChild(f));mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);e(this.defaultColorSchemes[this.editorUi.currentScheme])}));a(d);a(f);e(this.defaultColorSchemes[this.editorUi.currentScheme]);return b};StyleFormatPanel.prototype.addEditOps=function(b){var e=this.format.getSelectionState(),a=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(a=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),a.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),a.style.width="202px",a.style.marginBottom="2px",b.appendChild(a));var c=this.editorUi.editor.graph,g=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(e=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("editShape").funct()})),e.setAttribute("title",mxResources.get("editShape")),e.style.marginBottom="2px",null==a?e.style.width="202px":(a.style.width="100px",e.style.width="100px",e.style.marginLeft="2px"),b.appendChild(e)):e.image&&(e=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),e.setAttribute("title",mxResources.get("editImage")),e.style.marginBottom="2px",null==a?e.style.width="202px":
(a.style.width="100px",e.style.width="100px",e.style.marginLeft="2px"),b.appendChild(e));return b}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function b(b){e=b;if(mxClient.IS_QUIRKS||
7==document.documentMode||8==document.documentMode)e=mxUtils.clone(b)}n.apply(this,arguments);var e=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){e=null});this.isMouseInsertPoint=function(){return null!=e};var a=this.getInsertPoint;this.getInsertPoint=function(){return null!=e?this.getPointForEvent(e):a.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=
function(b){var e=this.graph.view.getState(b),e=null!=e?e.style:this.graph.getCellStyle(b);if("undefined"!=typeof mxRackContainer&&"rack"==e.childLayout){var a=new mxStackLayout(this.graph,!1);a.setChildGeometry=function(b,e){e.height=Math.max(e.height,20);if(1<e.height/20){var a=e.height%20;e.height+=10<a?20-a:-a}this.graph.getModel().setGeometry(b,e)};a.fill=!0;a.unitSize=mxRackContainer.unitSize|20;a.marginLeft=e.marginLeft||0;a.marginRight=e.marginRight||0;a.marginTop=e.marginTop||0;a.marginBottom=
e.marginBottom||0;a.resizeParent=!1;return a}return c.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(b){return null!=b&&"data:page/"==b.substring(0,10)};Graph.prototype.addSvgShadow=function(b,e,a){a=null!=a?a:!1;var c=b.ownerDocument,g=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");g.setAttribute("id",
mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);a(this.defaultColorSchemes[this.editorUi.currentScheme])}));var f=document.createElement("div");f.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(b.appendChild(d),b.appendChild(f));mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);a(this.defaultColorSchemes[this.editorUi.currentScheme])}));e(d);e(f);a(this.defaultColorSchemes[this.editorUi.currentScheme]);return b};StyleFormatPanel.prototype.addEditOps=function(b){var a=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(e=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),e.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),e.style.width="202px",e.style.marginBottom="2px",b.appendChild(e));var c=this.editorUi.editor.graph,g=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(a=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("editShape").funct()})),a.setAttribute("title",mxResources.get("editShape")),a.style.marginBottom="2px",null==e?a.style.width="202px":(e.style.width="100px",a.style.width="100px",a.style.marginLeft="2px"),b.appendChild(a)):a.image&&(a=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),a.setAttribute("title",mxResources.get("editImage")),a.style.marginBottom="2px",null==e?a.style.width="202px":
(e.style.width="100px",a.style.width="100px",a.style.marginLeft="2px"),b.appendChild(a));return b}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function b(b){a=b;if(mxClient.IS_QUIRKS||
7==document.documentMode||8==document.documentMode)a=mxUtils.clone(b)}n.apply(this,arguments);var a=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){a=null});this.isMouseInsertPoint=function(){return null!=a};var e=this.getInsertPoint;this.getInsertPoint=function(){return null!=a?this.getPointForEvent(a):e.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=
function(b){var a=this.graph.view.getState(b),a=null!=a?a.style:this.graph.getCellStyle(b);if("undefined"!=typeof mxRackContainer&&"rack"==a.childLayout){var e=new mxStackLayout(this.graph,!1);e.setChildGeometry=function(b,a){a.height=Math.max(a.height,20);if(1<a.height/20){var e=a.height%20;a.height+=10<e?20-e:-e}this.graph.getModel().setGeometry(b,a)};e.fill=!0;e.unitSize=mxRackContainer.unitSize|20;e.marginLeft=a.marginLeft||0;e.marginRight=a.marginRight||0;e.marginTop=a.marginTop||0;e.marginBottom=
a.marginBottom||0;e.resizeParent=!1;return e}return c.apply(this,arguments)}};var v=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){v.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(b){return null!=b&&"data:page/"==b.substring(0,10)};Graph.prototype.addSvgShadow=function(b,a,e){e=null!=e?e:!1;var c=b.ownerDocument,g=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");g.setAttribute("id",
this.shadowId);var k=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation","1.7");k.setAttribute("result","blur");g.appendChild(k);k=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx","3");k.setAttribute("dy","3");k.setAttribute("result","offsetBlur");g.appendChild(k);k=null!=c.createElementNS?
c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");k.setAttribute("flood-color","#3D4574");k.setAttribute("flood-opacity","0.4");k.setAttribute("result","offsetColor");g.appendChild(k);k=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feComposite"):c.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");g.appendChild(k);k=null!=c.createElementNS?
c.createElementNS(mxConstants.NS_SVG,"feBlend"):c.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");g.appendChild(k);k=b.getElementsByTagName("defs");0==k.length?(c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=k[0];c.appendChild(g);a||((e||b.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(b.getAttribute("width")))||
(b.setAttribute("width",parseInt(b.getAttribute("width"))+6),b.setAttribute("height",parseInt(b.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(b,e){mxClient.IS_SVG&&(e=null!=e?e:!0,(this.shadowVisible=b)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),e&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var b=
this.model.getChildCount(this.model.root),e,a=0;do e=this.model.getChildAt(this.model.root,a);while(a++<b&&"1"==mxUtils.getValue(this.getCellStyle(e),"locked","0"));null!=e&&this.setDefaultParent(e)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];
c.createElementNS(mxConstants.NS_SVG,"feBlend"):c.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");g.appendChild(k);k=b.getElementsByTagName("defs");0==k.length?(c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=k[0];c.appendChild(g);e||((a||b.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(b.getAttribute("width")))||
(b.setAttribute("width",parseInt(b.getAttribute("width"))+6),b.setAttribute("height",parseInt(b.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(b,a){mxClient.IS_SVG&&(a=null!=a?a:!0,(this.shadowVisible=b)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),a&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var b=
this.model.getChildCount(this.model.root),a,e=0;do a=this.model.getChildAt(this.model.root,e);while(e++<b&&"1"==mxUtils.getValue(this.getCellStyle(a),"locked","0"));null!=a&&this.setDefaultParent(a)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];
mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=
[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=
[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.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(b){var e=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?e="mxgraph.er":"sysML"==b.substring(0,5)&&(e="mxgraph.sysml"));return e};
var t=mxMarker.createMarker;mxMarker.createMarker=function(b,e,a,c,g,k,d,f,n,h){if(null!=a&&null==mxMarker.markers[a]){var q=this.getPackageForType(a);null!=q&&mxStencilRegistry.getStencil(q)}return t.apply(this,arguments)};PrintDialog.prototype.create=function(b,e){function a(){u.value=Math.max(1,Math.min(f,Math.max(parseInt(u.value),parseInt(t.value))));t.value=Math.max(1,Math.min(f,Math.min(parseInt(u.value),parseInt(t.value))))}function c(e){function a(e,a,g){var d=e.getGraphBounds(),k=0,f=0,
n=V.get(),q=1/e.pageScale,p=J.checked;if(p)var q=parseInt(O.value),h=parseInt(R.value),q=Math.min(n.height*h/(d.height/e.view.scale),n.width*q/(d.width/e.view.scale));else q=parseInt(H.value)/(100*e.pageScale),isNaN(q)&&(c=1/e.pageScale,H.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*c);n.height=Math.ceil(n.height*c);q*=c;!p&&e.pageVisible?(d=e.getPageLayout(),k-=d.x*n.width,f-=d.y*n.height):p=!0;if(null==a){a=PrintDialog.createPrintPreview(e,q,n,0,k,f,p);a.pageSelector=
!1;a.mathEnabled=!1;var l=a.writeHead;a.writeHead=function(e){l.apply(this,arguments);null!=b.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(b.editor.fontCss),e.writeln("</style>"))};if("undefined"!==typeof MathJax){var t=a.renderPage;a.renderPage=function(b,e,a,c,g,d){var k=t.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}a.open(null,null,g,!0)}else{n=e.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";a.backgroundColor=
n;a.autoOrigin=p;a.appendGraph(e,q,k,f,g,!0)}return a}var c=parseInt(S.value)/100;isNaN(c)&&(c=1,S.value="100 %");var c=.75*c,d=t.value,k=u.value,f=!h.checked,n=null;f&&(f=d==q&&k==q);if(!f&&null!=b.pages&&b.pages.length){var p=0,f=b.pages.length-1;h.checked||(p=parseInt(d)-1,f=parseInt(k)-1);for(var l=p;l<=f;l++){var m=b.pages[l],d=m==b.currentPage?g:null;if(null==d){var d=b.createTemporaryGraph(g.getStylesheet()),k=!0,p=!1,v=null,x=null;null==m.viewState&&null==m.mapping&&null==m.root&&b.updatePageRoot(m);
null!=m.viewState?(k=m.viewState.pageVisible,p=m.viewState.mathEnabled,v=m.viewState.background,x=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(p="0"!=m.mapping.diagramMap.get("mathEnabled"),v=m.mapping.diagramMap.get("background"),x=m.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);d.background=v;d.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;d.pageVisible=k;d.mathEnabled=p;var w=d.getGlobalVariable;d.getGlobalVariable=
function(b){return"page"==b?m.getName():"pagenumber"==b?l+1:w.apply(this,arguments)};document.body.appendChild(d.container);b.updatePageRoot(m);d.model.setRoot(m.root)}n=a(d,n,l!=f);d!=g&&d.container.parentNode.removeChild(d.container)}}else n=a(g);n.mathEnabled&&(f=n.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
f.writeln("TeX: {"),f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),e&&(f.writeln("MathJax.Hub.Queue(function () {"),f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),f.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));
n.closeDocument();!n.mathEnabled&&e&&PrintDialog.printPreview(n)}var g=b.editor.graph,k=document.createElement("div"),d=document.createElement("h3");d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,e||mxResources.get("print"));k.appendChild(d);var f=1,q=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";
h.setAttribute("value","all");h.setAttribute("type","radio");h.setAttribute("name","pages-printdialog");n.appendChild(h);d=document.createElement("span");mxUtils.write(d,mxResources.get("printAllPages"));n.appendChild(d);mxUtils.br(n);var l=h.cloneNode(!0);h.setAttribute("checked","checked");l.setAttribute("value","range");n.appendChild(l);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+":");n.appendChild(d);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";
t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.style.width="50px";n.appendChild(t);d=document.createElement("span");mxUtils.write(d,mxResources.get("to"));n.appendChild(d);var u=t.cloneNode(!0);n.appendChild(u);mxEvent.addListener(t,"focus",function(){l.checked=!0});mxEvent.addListener(u,"focus",function(){l.checked=!0});mxEvent.addListener(t,"change",a);mxEvent.addListener(u,"change",a);if(null!=b.pages&&(f=b.pages.length,null!=b.currentPage))for(d=0;d<b.pages.length;d++)if(b.currentPage==
b.pages[d]){q=d+1;t.value=q;u.value=q;break}t.setAttribute("max",f);u.setAttribute("max",f);1<f&&k.appendChild(n);var m=document.createElement("div");m.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");m.appendChild(v);d=document.createElement("span");mxUtils.write(d,mxResources.get("adjustTo"));m.appendChild(d);var H=document.createElement("input");H.style.cssText=
"margin:0 8px 0 8px;";H.setAttribute("value","100 %");H.style.width="50px";m.appendChild(H);mxEvent.addListener(H,"focus",function(){v.checked=!0});k.appendChild(m);var n=n.cloneNode(!1),J=v.cloneNode(!0);J.setAttribute("value","fit");v.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";d.appendChild(J);n.appendChild(d);m=document.createElement("table");m.style.display="inline-block";var T=document.createElement("tbody"),
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(b){var a=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?a="mxgraph.er":"sysML"==b.substring(0,5)&&(a="mxgraph.sysml"));return a};
var u=mxMarker.createMarker;mxMarker.createMarker=function(b,a,e,c,g,k,d,f,n,h){if(null!=e&&null==mxMarker.markers[e]){var q=this.getPackageForType(e);null!=q&&mxStencilRegistry.getStencil(q)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(b,a){function e(){v.value=Math.max(1,Math.min(f,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(f,Math.min(parseInt(v.value),parseInt(u.value))))}function c(a){function e(a,e,g){var d=a.getGraphBounds(),k=0,f=0,
n=V.get(),q=1/a.pageScale,p=J.checked;if(p)var q=parseInt(O.value),h=parseInt(R.value),q=Math.min(n.height*h/(d.height/a.view.scale),n.width*q/(d.width/a.view.scale));else q=parseInt(H.value)/(100*a.pageScale),isNaN(q)&&(c=1/a.pageScale,H.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*c);n.height=Math.ceil(n.height*c);q*=c;!p&&a.pageVisible?(d=a.getPageLayout(),k-=d.x*n.width,f-=d.y*n.height):p=!0;if(null==e){e=PrintDialog.createPrintPreview(a,q,n,0,k,f,p);e.pageSelector=
!1;e.mathEnabled=!1;var l=e.writeHead;e.writeHead=function(a){l.apply(this,arguments);null!=b.editor.fontCss&&(a.writeln('<style type="text/css">'),a.writeln(b.editor.fontCss),a.writeln("</style>"))};if("undefined"!==typeof MathJax){var u=e.renderPage;e.renderPage=function(b,a,e,c,g,d){var k=u.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}e.open(null,null,g,!0)}else{n=a.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";e.backgroundColor=
n;e.autoOrigin=p;e.appendGraph(a,q,k,f,g,!0)}return e}var c=parseInt(S.value)/100;isNaN(c)&&(c=1,S.value="100 %");var c=.75*c,d=u.value,k=v.value,f=!h.checked,n=null;f&&(f=d==q&&k==q);if(!f&&null!=b.pages&&b.pages.length){var p=0,f=b.pages.length-1;h.checked||(p=parseInt(d)-1,f=parseInt(k)-1);for(var l=p;l<=f;l++){var t=b.pages[l],d=t==b.currentPage?g:null;if(null==d){var d=b.createTemporaryGraph(g.getStylesheet()),k=!0,p=!1,m=null,x=null;null==t.viewState&&null==t.mapping&&null==t.root&&b.updatePageRoot(t);
null!=t.viewState?(k=t.viewState.pageVisible,p=t.viewState.mathEnabled,m=t.viewState.background,x=t.viewState.backgroundImage):null!=t.mapping&&null!=t.mapping.diagramMap&&(p="0"!=t.mapping.diagramMap.get("mathEnabled"),m=t.mapping.diagramMap.get("background"),x=t.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);d.background=m;d.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;d.pageVisible=k;d.mathEnabled=p;var w=d.getGlobalVariable;d.getGlobalVariable=
function(b){return"page"==b?t.getName():"pagenumber"==b?l+1:w.apply(this,arguments)};document.body.appendChild(d.container);b.updatePageRoot(t);d.model.setRoot(t.root)}n=e(d,n,l!=f);d!=g&&d.container.parentNode.removeChild(d.container)}}else n=e(g);n.mathEnabled&&(f=n.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
f.writeln("TeX: {"),f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),a&&(f.writeln("MathJax.Hub.Queue(function () {"),f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),f.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));
n.closeDocument();!n.mathEnabled&&a&&PrintDialog.printPreview(n)}var g=b.editor.graph,k=document.createElement("div"),d=document.createElement("h3");d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,a||mxResources.get("print"));k.appendChild(d);var f=1,q=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";
h.setAttribute("value","all");h.setAttribute("type","radio");h.setAttribute("name","pages-printdialog");n.appendChild(h);d=document.createElement("span");mxUtils.write(d,mxResources.get("printAllPages"));n.appendChild(d);mxUtils.br(n);var l=h.cloneNode(!0);h.setAttribute("checked","checked");l.setAttribute("value","range");n.appendChild(l);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+":");n.appendChild(d);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";
u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";n.appendChild(u);d=document.createElement("span");mxUtils.write(d,mxResources.get("to"));n.appendChild(d);var v=u.cloneNode(!0);n.appendChild(v);mxEvent.addListener(u,"focus",function(){l.checked=!0});mxEvent.addListener(v,"focus",function(){l.checked=!0});mxEvent.addListener(u,"change",e);mxEvent.addListener(v,"change",e);if(null!=b.pages&&(f=b.pages.length,null!=b.currentPage))for(d=0;d<b.pages.length;d++)if(b.currentPage==
b.pages[d]){q=d+1;u.value=q;v.value=q;break}u.setAttribute("max",f);v.setAttribute("max",f);1<f&&k.appendChild(n);var t=document.createElement("div");t.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");t.appendChild(m);d=document.createElement("span");mxUtils.write(d,mxResources.get("adjustTo"));t.appendChild(d);var H=document.createElement("input");H.style.cssText=
"margin:0 8px 0 8px;";H.setAttribute("value","100 %");H.style.width="50px";t.appendChild(H);mxEvent.addListener(H,"focus",function(){m.checked=!0});k.appendChild(t);var n=n.cloneNode(!1),J=m.cloneNode(!0);J.setAttribute("value","fit");m.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";d.appendChild(J);n.appendChild(d);t=document.createElement("table");t.style.display="inline-block";var T=document.createElement("tbody"),
K=document.createElement("tr"),N=K.cloneNode(!0),Q=document.createElement("td"),I=Q.cloneNode(!0),W=Q.cloneNode(!0),P=Q.cloneNode(!0),Y=Q.cloneNode(!0),U=Q.cloneNode(!0);Q.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Q,mxResources.get("fitTo"));var O=document.createElement("input");O.style.cssText="margin:0 8px 0 8px;";O.setAttribute("value","1");O.setAttribute("min","1");O.setAttribute("type","number");O.style.width="40px";I.appendChild(O);d=document.createElement("span");mxUtils.write(d,
mxResources.get("fitToSheetsAcross"));W.appendChild(d);mxUtils.write(P,mxResources.get("fitToBy"));var R=O.cloneNode(!0);Y.appendChild(R);mxEvent.addListener(O,"focus",function(){J.checked=!0});mxEvent.addListener(R,"focus",function(){J.checked=!0});d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsDown"));U.appendChild(d);K.appendChild(Q);K.appendChild(I);K.appendChild(W);N.appendChild(P);N.appendChild(Y);N.appendChild(U);T.appendChild(K);T.appendChild(N);m.appendChild(T);
n.appendChild(m);k.appendChild(n);n=document.createElement("div");d=document.createElement("div");d.style.fontWeight="bold";d.style.marginBottom="12px";mxUtils.write(d,mxResources.get("paperSize"));n.appendChild(d);d=document.createElement("div");d.style.marginBottom="12px";var V=PageSetupDialog.addPageFormatPanel(d,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(d);d=document.createElement("span");mxUtils.write(d,mxResources.get("pageScale"));n.appendChild(d);
var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","100 %");S.style.width="60px";n.appendChild(S);k.appendChild(n);d=document.createElement("div");d.style.cssText="text-align:right;margin:62px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&d.appendChild(n);b.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),
m.className="geBtn",d.appendChild(m));PrintDialog.previewEnabled&&(m=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)}),m.className="geBtn",d.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});m.className="geBtn gePrimaryBtn";d.appendChild(m);b.editor.cancelFirst||d.appendChild(n);k.appendChild(d);this.container=k}})();(function(){EditorUi.VERSION="6.9.6";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;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=
mxResources.get("fitToSheetsAcross"));W.appendChild(d);mxUtils.write(P,mxResources.get("fitToBy"));var R=O.cloneNode(!0);Y.appendChild(R);mxEvent.addListener(O,"focus",function(){J.checked=!0});mxEvent.addListener(R,"focus",function(){J.checked=!0});d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsDown"));U.appendChild(d);K.appendChild(Q);K.appendChild(I);K.appendChild(W);N.appendChild(P);N.appendChild(Y);N.appendChild(U);T.appendChild(K);T.appendChild(N);t.appendChild(T);
n.appendChild(t);k.appendChild(n);n=document.createElement("div");d=document.createElement("div");d.style.fontWeight="bold";d.style.marginBottom="12px";mxUtils.write(d,mxResources.get("paperSize"));n.appendChild(d);d=document.createElement("div");d.style.marginBottom="12px";var V=PageSetupDialog.addPageFormatPanel(d,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(d);d=document.createElement("span");mxUtils.write(d,mxResources.get("pageScale"));n.appendChild(d);
var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","100 %");S.style.width="60px";n.appendChild(S);k.appendChild(n);d=document.createElement("div");d.style.cssText="text-align:right;margin:62px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&d.appendChild(n);b.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),
t.className="geBtn",d.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)}),t.className="geBtn",d.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});t.className="geBtn gePrimaryBtn";d.appendChild(t);b.editor.cancelFirst||d.appendChild(n);k.appendChild(d);this.container=k}})();(function(){EditorUi.VERSION="6.9.7";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;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.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas"),e=new Image;e.onload=function(){try{b.getContext("2d").drawImage(e,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
null!=a&&6<a.length}catch(n){}};e.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(k){}try{b=document.createElement("canvas");b.width=b.height=1;var a=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==a.match("image/jpeg")}catch(k){}})();
EditorUi.prototype.getLocalData=function(b,e){e(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,e,a){localStorage.setItem(b,e);a()};EditorUi.prototype.removeLocalData=function(b,e){localStorage.removeItem(b);e()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};
EditorUi.prototype.movePickersToTop=function(){for(var b=document.getElementsByTagName("div"),e=0;e<b.length;e++)"picker modal-dialog picker-dialog"==b[e].className&&(b[e].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(b,e,a){a=null!=a?a:24;var c=new Spinner({lines:12,
length:a,width:Math.round(a/3),radius:Math.round(a/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=c.spin;c.spin=function(a,d){var k=!1;this.active||(g.call(this,a),this.active=!0,null!=d&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=
2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=d+"...",a.appendChild(k),c.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,b-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,e+70-k.offsetHeight/2))+
"px")),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(a,d)}));this.stop();return b}),k=!0);return k};var d=c.stop;c.stop=function(){d.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(b,e,a){function c(b,e){var a=d;d+=e;return b.substring(a,d)}function g(b){b=c(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<
8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var d=0;if(c(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=a&&a();else if(c(b,4),"IHDR"!=c(b,4))null!=a&&a();else{c(b,17);do{a=g(b);var f=c(b,4);if(null!=e&&e(d-8,f,a))break;value=c(b,a);c(b,4);if("IEND"==f)break}while(a)}};EditorUi.prototype.isCompatibleString=function(b){try{var e=mxUtils.parseXml(b),a=this.editor.extractGraphModel(e.documentElement,!0);return null!=a&&0==a.getElementsByTagName("parsererror").length}catch(k){}return!1};
var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),h=this.editor.extractGraphModel(f.documentElement,null!=this.pages),e=null!=h?mxUtils.getXml(h):""}catch(t){}return e};EditorUi.prototype.validateFileData=
function(b){if(null!=b&&0<b.length){var e=b.indexOf('<meta charset="utf-8">');0<=e&&(b=b.slice(0,e)+'<meta charset="utf-8"/>'+b.slice(e+23-1,b.length))}return b};EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var e=null!=b?this.editor.extractGraphModel(b,!0):null;null!=e&&(b=e);if(null!=b){e=this.editor.graph;e.model.beginUpdate();try{var a=null!=this.pages?this.pages.slice():null,c=b.getElementsByTagName("diagram");
if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var d=c.length-1;0<=d;d--){var f=this.updatePageRoot(new DiagramPage(c[d]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[d+1]));e.model.execute(new ChangePage(this,f,0==d?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),
this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=a)for(d=0;d<a.length;d++)e.model.execute(new ChangePage(this,a[d],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,e,a,c,d,f,h,l,q,p){e=null!=e?e:this.editor.graph;d=null!=d?d:!1;q=null!=q?q:!0;var g,k=null;null==a||
a.getMode()==App.MODE_DEVICE||a.getMode()==App.MODE_BROWSER?g="_blank":k=g=c;if(null==b)return"";var n=b;if("mxfile"!=n.nodeName.toLowerCase()){var t=e.zapGremlins(mxUtils.getXml(b)),n=e.compress(t);if(e.decompress(n)!=t)return t;t=b.ownerDocument.createElement("diagram");mxUtils.setTextContent(t,n);n=b.ownerDocument.createElement("mxfile");n.appendChild(t)}p?(n=n.cloneNode(!0),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.setAttribute("userAgent",
navigator.userAgent),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("editor","www.draw.io"),b=null!=a?a.getMode():this.mode,null!=b&&n.setAttribute("type",b));b=mxUtils.getXml(n);if(!f&&!d&&(h||null!=a&&/(\.html)$/i.test(a.getTitle())))b=this.getHtml2(mxUtils.getXml(n),e,null!=a?a.getTitle():null,g,k);else if(f||!d&&null!=a&&/(\.svg)$/i.test(a.getTitle()))null==a||a.getMode()!=App.MODE_DEVICE&&a.getMode()!=App.MODE_BROWSER||(c=null),b=this.getEmbeddedSvg(b,e,c,null,l,q,k);return b};EditorUi.prototype.getXmlFileData=
function(b,e){b=null!=b?b:!0;e=null!=e?e:!1;var a=this.editor.getGraphXml(b);if(b&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(a)));mxUtils.setTextContent(this.currentPage.node,c);a=this.fileNode.cloneNode(!1);if(e)a.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var f=this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=f&&f.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),
f.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[d].node,c),f.needsUpdate=!1);a.appendChild(this.pages[d].node)}}return a};EditorUi.prototype.getFileData=function(b,a,c,d,f,h,l,m){f=null!=f?f:!0;l=null!=l?l:this.getXmlFileData(f,null!=h?h:!1);h=this.editor.graph;var e=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(a||!b&&null!=e&&/(\.svg)$/i.test(e.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());
var g=h.getGlobalVariable,k=this.pages[0];h.getGlobalVariable=function(b){return"page"==b?k.getName():"pagenumber"==b?1:g.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(k.root)}b=this.createFileData(l,h,e,window.location.href,b,a,c,d,f,m);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return b};EditorUi.prototype.getHtml=function(b,a,c,d,f,h){h=null!=h?h:!0;var e=null,g="https://www.draw.io/js/embed-static.min.js";if(null!=a){var e=h?a.getGraphBounds():
1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas"),a=new Image;a.onload=function(){try{b.getContext("2d").drawImage(a,0,0);var e=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
null!=e&&6<e.length}catch(n){}};a.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(k){}try{b=document.createElement("canvas");b.width=b.height=1;var c=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(k){}})();
EditorUi.prototype.getLocalData=function(b,a){a(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,a,c){localStorage.setItem(b,a);c()};EditorUi.prototype.removeLocalData=function(b,a){localStorage.removeItem(b);a()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};
EditorUi.prototype.movePickersToTop=function(){for(var b=document.getElementsByTagName("div"),a=0;a<b.length;a++)"picker modal-dialog picker-dialog"==b[a].className&&(b[a].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(b,a,c){c=null!=c?c:24;var e=new Spinner({lines:12,
length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=e.spin;e.spin=function(c,d){var k=!1;this.active||(g.call(this,c),this.active=!0,null!=d&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=
2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,a+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=d+"...",c.appendChild(k),e.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,b-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,a+70-k.offsetHeight/2))+
"px")),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(c,d)}));this.stop();return b}),k=!0);return k};var d=e.stop;e.stop=function(){d.call(this);this.active=!1;null!=e.status&&(e.status.parentNode.removeChild(e.status),e.status=null)};e.pause=function(){return function(){}};return e};EditorUi.parsePng=function(b,a,c){function e(b,a){var e=d;d+=a;return b.substring(e,d)}function g(b){b=e(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<
8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var d=0;if(e(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(e(b,4),"IHDR"!=e(b,4))null!=c&&c();else{e(b,17);do{c=g(b);var f=e(b,4);if(null!=a&&a(d-8,f,c))break;value=e(b,c);e(b,4);if("IEND"==f)break}while(c)}};EditorUi.prototype.isCompatibleString=function(b){try{var a=mxUtils.parseXml(b),c=this.editor.extractGraphModel(a.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(k){}return!1};
var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),h=this.editor.extractGraphModel(f.documentElement,null!=this.pages),e=null!=h?mxUtils.getXml(h):""}catch(u){}return e};EditorUi.prototype.validateFileData=
function(b){if(null!=b&&0<b.length){var a=b.indexOf('<meta charset="utf-8">');0<=a&&(b=b.slice(0,a)+'<meta charset="utf-8"/>'+b.slice(a+23-1,b.length))}return b};EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b){a=this.editor.graph;a.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=b.getElementsByTagName("diagram");
if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var h=this.updatePageRoot(new DiagramPage(d[f]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[f+1]));a.model.execute(new ChangePage(this,h,0==f?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),
this.currentPage.setName(mxResources.get("pageWithNumber",[1])),a.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)a.model.execute(new ChangePage(this,c[f],null))}finally{a.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,a,c,d,f,h,l,t,q,p){a=null!=a?a:this.editor.graph;f=null!=f?f:!1;q=null!=q?q:!0;var e,g=null;null==c||
c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?e="_blank":g=e=d;if(null==b)return"";var k=b;if("mxfile"!=k.nodeName.toLowerCase()){var n=a.zapGremlins(mxUtils.getXml(b)),k=a.compress(n);if(a.decompress(k)!=n)return n;n=b.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,k);k=b.ownerDocument.createElement("mxfile");k.appendChild(n)}p?(k=k.cloneNode(!0),k.removeAttribute("userAgent"),k.removeAttribute("version"),k.removeAttribute("editor"),k.removeAttribute("type")):(k.setAttribute("userAgent",
navigator.userAgent),k.setAttribute("version",EditorUi.VERSION),k.setAttribute("editor","www.draw.io"),b=null!=c?c.getMode():this.mode,null!=b&&k.setAttribute("type",b));b=mxUtils.getXml(k);if(!h&&!f&&(l||null!=c&&/(\.html)$/i.test(c.getTitle())))b=this.getHtml2(mxUtils.getXml(k),a,null!=c?c.getTitle():null,e,g);else if(h||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),b=this.getEmbeddedSvg(b,a,d,null,t,q,g);return b};EditorUi.prototype.getXmlFileData=
function(b,a){b=null!=b?b:!0;a=null!=a?a:!1;var e=this.editor.getGraphXml(b);if(b&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(e)));mxUtils.setTextContent(this.currentPage.node,c);e=this.fileNode.cloneNode(!1);if(a)e.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var f=this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=f&&f.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),
f.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[d].node,c),f.needsUpdate=!1);e.appendChild(this.pages[d].node)}}return e};EditorUi.prototype.getFileData=function(b,a,c,d,f,h,l,t){f=null!=f?f:!0;l=null!=l?l:this.getXmlFileData(f,null!=h?h:!1);h=this.editor.graph;var e=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(a||!b&&null!=e&&/(\.svg)$/i.test(e.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());
var g=h.getGlobalVariable,k=this.pages[0];h.getGlobalVariable=function(b){return"page"==b?k.getName():"pagenumber"==b?1:g.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(k.root)}b=this.createFileData(l,h,e,window.location.href,b,a,c,d,f,t);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return b};EditorUi.prototype.getHtml=function(b,a,c,d,f,h){h=null!=h?h:!0;var e=null,g="https://www.draw.io/js/embed-static.min.js";if(null!=a){var e=h?a.getGraphBounds():
a.getBoundingBox(a.getSelectionCells()),k=a.view.scale;h=Math.floor(e.x/k-a.view.translate.x);k=Math.floor(e.y/k-a.view.translate.y);e=a.background;null==f&&(a=this.getBasenames().join(";"),0<a.length&&(g="https://www.draw.io/embed.js?s="+a));b.setAttribute("x0",h);b.setAttribute("y0",k)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=d&&b.setAttribute("edit",d));null!=
f&&(f=f.replace(/&/g,"&amp;"));b=null!=b?this.editor.graph.zapGremlins(mxUtils.getXml(b)):"";d=this.editor.graph.compress(b);this.editor.graph.decompress(d)!=b&&(d=encodeURIComponent(b));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=f?
'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=e&&e!=mxConstants.NONE?' style="background-color:'+e+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+
@ -6187,33 +6187,33 @@ f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![end
a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||
/(\.svg)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));return b};EditorUi.prototype.downloadFile=function(b,a,c,d,f,h){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(),g=e+"."+b;if("xml"==b){var k='<?xml version="1.0" encoding="UTF-8"?>\n'+(a?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,f));this.saveData(g,b,k,"text/xml")}else if("html"==b)k=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(g,b,k,"text/html");
else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?g=e+".png":"jpeg"==b&&(g=e+".jpg"),this.saveRequest(g,b,mxUtils.bind(this,function(a,e){try{var c=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var g=this.createDownloadRequest(a,b,d,e);this.editor.graph.pageVisible=c;return g}catch(z){this.handleError(z)}}));else{var n=null,l=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):
this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==b){var m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);var u=this.editor.graph.getSvg(m,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(u);this.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();l('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==b){var m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);var v=this.editor.graph.getSvg(m,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(v);this.convertImages(v,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();l('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
mxUtils.getXml(b))})))}else g=e+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();l(b)}),d)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(b,a,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=a);var g="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==a&&(e="1",a="png",null!=this.pages&&null!=this.currentPage))for(var k=
0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){g="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+a+g+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=b?"&filename="+encodeURIComponent(b):""))};EditorUi.prototype.setMode=function(b,a){this.mode=b};EditorUi.prototype.fileLoaded=function(b){var a=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=b)try{this.setCurrentFile(b);
b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();b.open();this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.undoManager.clear();this.updateUi();null==b.realtime&&(b.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("readOnly"))));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),
this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus());this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));a=!0;if(this.enableLogging&&!this.isOffline()&&null!=b.getMode())try{var f=new Image,h=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f.src=h+"/log?msg=storageMode:"+encodeURIComponent(b.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(t){}if(this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&
null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){null!=window.console&&console.log("error in fileLoaded:",b,t);if(this.enableLogging&&!this.isOffline())try{f=new Image,h=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",f.src=h+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=
t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(v){}this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return a};EditorUi.prototype.restoreLibraries=function(){};
this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus());this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));a=!0;if(this.enableLogging&&!this.isOffline()&&null!=b.getMode())try{var f=new Image,h=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f.src=h+"/log?msg=storageMode:"+encodeURIComponent(b.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(u){}if(this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&
null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){null!=window.console&&console.log("error in fileLoaded:",b,u);if(this.enableLogging&&!this.isOffline())try{f=new Image,h=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",f.src=h+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=
u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(t){}this.handleError(u,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return a};EditorUi.prototype.restoreLibraries=function(){};
EditorUi.prototype.saveLibrary=function(b,a,c,d,f,h,l){};EditorUi.prototype.toggleScratchpad=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad)};EditorUi.prototype.createLibraryDataFromImages=function(b){var a=mxUtils.createXmlDocument(),c=a.createElement("mxlibrary");mxUtils.setTextContent(c,
JSON.stringify(b));a.appendChild(c);return mxUtils.getXml(a)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var a=this.sidebar.palettes[b];if(null!=a){for(var c=0;c<a.length;c++)a[c].parentNode.removeChild(a[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=
function(b){var a=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:a.firstChild.nextSibling.nextSibling;var c=a.lastChild,d=c.previousSibling;a.insertBefore(c,b);a.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(b){var a=mxUtils.parseXml(b.getData());if("mxlibrary"==a.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(a.documentElement));this.libraryLoaded(b,
c,a.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,a,c){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var e=this.sidebar.palettes[b.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var d=null,g=mxUtils.bind(this,function(a,e){if(0==a.length&&
b.isEditable())null==d&&(d=document.createElement("div"),mxUtils.setPrefixedStyle(d.style,"borderRadius","6px"),d.style.border="3px dotted lightGray",d.style.textAlign="center",d.style.padding="8px",d.style.color="#B3B3B3",mxUtils.write(d,mxResources.get("dragElementsHere"))),e.appendChild(d);else for(var c=0;c<a.length;c++){var g=a[c],f=g.data;if(null!=f){var f=this.convertDataUri(f),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==g.aspect&&(k+="aspect=fixed;");
e.appendChild(this.sidebar.createVertexTemplate(k+"image="+f,g.w,g.h,"",g.title||"",!1,!1,!1))}else null!=g.xml&&(f=this.stringToCells(this.editor.graph.decompress(g.xml)),0<f.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(f,g.w,g.h,g.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:b.getTitle();var f=this.sidebar.addPalette(b.getHash(),c,!0,mxUtils.bind(this,function(b){g(a,b)}));this.repositionLibrary(e);var h=f.parentNode.previousSibling;c=h.getAttribute("title");null!=c&&0<c.length&&
c,a.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,a,c){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var e=this.sidebar.palettes[b.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var d=null,g=mxUtils.bind(this,function(a,c){if(0==a.length&&
b.isEditable())null==d&&(d=document.createElement("div"),mxUtils.setPrefixedStyle(d.style,"borderRadius","6px"),d.style.border="3px dotted lightGray",d.style.textAlign="center",d.style.padding="8px",d.style.color="#B3B3B3",mxUtils.write(d,mxResources.get("dragElementsHere"))),c.appendChild(d);else for(var e=0;e<a.length;e++){var g=a[e],f=g.data;if(null!=f){var f=this.convertDataUri(f),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==g.aspect&&(k+="aspect=fixed;");
c.appendChild(this.sidebar.createVertexTemplate(k+"image="+f,g.w,g.h,"",g.title||"",!1,!1,!1))}else null!=g.xml&&(f=this.stringToCells(this.editor.graph.decompress(g.xml)),0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,g.w,g.h,g.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:b.getTitle();var f=this.sidebar.addPalette(b.getHash(),c,!0,mxUtils.bind(this,function(b){g(a,b)}));this.repositionLibrary(e);var h=f.parentNode.previousSibling;c=h.getAttribute("title");null!=c&&0<c.length&&
".scratchpad"!=b.title&&h.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+c);var q=document.createElement("div");q.style.position="absolute";q.style.right="0px";q.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(q.style.backgroundColor="inherit");h.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("align","top");p.setAttribute("border","0");p.className=
"geButton";p.style.marginRight="1px";p.style.marginTop="-1px";q.appendChild(p);var l=null;mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){if(!mxEvent.isConsumed(a)){var e=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e();mxEvent.consume(a)}}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(b){mxEvent.getSource(b)==f?f.setAttribute("title",mxResources.get("libraryTooltip")):
f.removeAttribute("title")}));if(b.isEditable()){var m=this.editor.graph,A=mxUtils.bind(this,function(e){this.showLibraryDialog(b.getTitle(),f,a,b,b.getMode());mxEvent.consume(e)}),D=mxUtils.bind(this,function(e){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=p.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",q.insertBefore(C,
q.firstChild),h.style.paddingRight=18*q.childNodes.length+"px",this.saveLibrary(b.getTitle(),a,b,b.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),h.style.paddingRight=18*q.childNodes.length+"px")})):null==l&&(l=p.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),q.insertBefore(l,q.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(e){this.saveLibrary(b.getTitle(),a,b,b.getMode(),b.constructor==
LocalLibrary,!0,function(){null==l||b.isModified()||(h.style.paddingRight=18*q.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(e)})),h.style.paddingRight=18*q.childNodes.length+"px")}),y=mxUtils.bind(this,function(b,e,c,g){b=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(b)));for(var k=0;k<b.length;k++){var q=m.getCellGeometry(b[k]);null!=q&&q.translate(-e.x,-e.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(b,e.width,e.height,g||"",!0,!1,!1));b={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
w:e.width,h:e.height};null!=g&&(b.title=g);a.push(b);D(c);null!=d&&null!=d.parentNode&&0<a.length&&(d.parentNode.removeChild(d),d=null)}),B=mxUtils.bind(this,function(b){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(b),m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var a=m.getSelectionCells(),e=m.view.getBounds(a),c=m.view.scale;e.x/=c;e.y/=c;e.width/=c;e.height/=c;e.x-=m.view.translate.x;
e.y-=m.view.translate.y;y(a,e)}mxEvent.consume(b)});f.style.border="3px solid transparent";mxEvent.addGestureListeners(f,function(){},mxUtils.bind(this,function(b){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=d?d.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)",f.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),
"geButton";p.style.marginRight="1px";p.style.marginTop="-1px";q.appendChild(p);var l=null;mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){if(!mxEvent.isConsumed(a)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(a)}}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(b){mxEvent.getSource(b)==f?f.setAttribute("title",mxResources.get("libraryTooltip")):
f.removeAttribute("title")}));if(b.isEditable()){var m=this.editor.graph,A=mxUtils.bind(this,function(c){this.showLibraryDialog(b.getTitle(),f,a,b,b.getMode());mxEvent.consume(c)}),D=mxUtils.bind(this,function(c){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=p.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",q.insertBefore(C,
q.firstChild),h.style.paddingRight=18*q.childNodes.length+"px",this.saveLibrary(b.getTitle(),a,b,b.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),h.style.paddingRight=18*q.childNodes.length+"px")})):null==l&&(l=p.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),q.insertBefore(l,q.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(b.getTitle(),a,b,b.getMode(),b.constructor==
LocalLibrary,!0,function(){null==l||b.isModified()||(h.style.paddingRight=18*q.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(c)})),h.style.paddingRight=18*q.childNodes.length+"px")}),y=mxUtils.bind(this,function(b,c,e,g){b=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(b)));for(var k=0;k<b.length;k++){var q=m.getCellGeometry(b[k]);null!=q&&q.translate(-c.x,-c.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(b,c.width,c.height,g||"",!0,!1,!1));b={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
w:c.width,h:c.height};null!=g&&(b.title=g);a.push(b);D(e);null!=d&&null!=d.parentNode&&0<a.length&&(d.parentNode.removeChild(d),d=null)}),B=mxUtils.bind(this,function(b){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(b),m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var a=m.getSelectionCells(),c=m.view.getBounds(a),e=m.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=m.view.translate.x;
c.y-=m.view.translate.y;y(a,c)}mxEvent.consume(b)});f.style.border="3px solid transparent";mxEvent.addGestureListeners(f,function(){},mxUtils.bind(this,function(b){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=d?d.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)",f.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),
null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(b))}),mxUtils.bind(this,function(b){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(f.style.border="3px solid transparent",null!=d&&(d.style.border="3px dotted lightGray"),f.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,B(b),mxEvent.consume(b))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(b){m.isMouseDown&&
null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="visible",f.style.border="3px solid transparent",f.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"),null!=d&&(d.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(b){null!=d?d.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)";
b.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(b){f.style.border="3px solid transparent";f.style.cursor="";null!=d&&(d.style.border="3px dotted lightGray");0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(e,c,k,q,p,n,h,l,m){if(null!=e&&"image/"==c.substring(0,6))e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
this.convertDataUri(e),e=[new mxCell("",new mxGeometry(0,0,p,n),e)],e[0].vertex=!0,y(e,new mxRectangle(0,0,p,n),b,mxEvent.isAltDown(b)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," ")),null!=d&&null!=d.parentNode&&0<a.length&&(d.parentNode.removeChild(d),d=null);else{var t=!1,u=mxUtils.bind(this,function(e,c){if(null!=e&&"text/xml"==c){var k=mxUtils.parseXml(e);if("mxlibrary"==k.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(k.documentElement));g(q,f);a=a.concat(q);D(b);
this.spinner.stop();t=!0}catch(V){}else if("mxfile"==k.documentElement.nodeName)try{for(var p=k.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var q=mxUtils.getTextContent(p[k]),n=this.stringToCells(this.editor.graph.decompress(q)),h=this.editor.graph.getBoundingBoxFromGeometry(n);y(n,new mxRectangle(0,0,h.width,h.height),b)}t=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=d&&null!=d.parentNode&&0<a.length&&(d.parentNode.removeChild(d),d=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,h)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?u(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(e,c)}}));b.stopPropagation();b.preventDefault()})),
b.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(b){f.style.border="3px solid transparent";f.style.cursor="";null!=d&&(d.style.border="3px dotted lightGray");0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,e,k,q,p,n,h,l,m){if(null!=c&&"image/"==e.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,n),c)],c[0].vertex=!0,y(c,new mxRectangle(0,0,p,n),b,mxEvent.isAltDown(b)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," ")),null!=d&&null!=d.parentNode&&0<a.length&&(d.parentNode.removeChild(d),d=null);else{var u=!1,t=mxUtils.bind(this,function(c,e){if(null!=c&&"text/xml"==e){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(k.documentElement));g(q,f);a=a.concat(q);D(b);
this.spinner.stop();u=!0}catch(V){}else if("mxfile"==k.documentElement.nodeName)try{for(var p=k.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var q=mxUtils.getTextContent(p[k]),n=this.stringToCells(this.editor.graph.decompress(q)),h=this.editor.graph.getBoundingBoxFromGeometry(n);y(n,new mxRectangle(0,0,h.width,h.height),b)}u=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=d&&null!=d.parentNode&&0<a.length&&(d.parentNode.removeChild(d),d=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,h)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?t(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(c,e)}}));b.stopPropagation();b.preventDefault()})),
mxEvent.addListener(f,"dragleave",function(b){null!=d?d.style.border="3px dotted lightGray":(f.style.border="3px solid transparent",f.style.cursor="");b.stopPropagation();b.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",IMAGE_PATH+"/edit.gif");p.setAttribute("title",mxResources.get("edit"));q.insertBefore(p,q.firstChild);mxEvent.addListener(p,"click",A);mxEvent.addListener(f,"dblclick",function(b){mxEvent.getSource(b)==f&&A(b)});p=p.cloneNode(!1);p.setAttribute("src",Editor.plusImage);
p.setAttribute("title",mxResources.get("add"));q.insertBefore(p,q.firstChild);this.isOffline()||".scratchpad"!=b.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(b){window.open("https://desk.draw.io/support/solutions/articles/16000042367");mxEvent.consume(b)})),q.insertBefore(c,q.firstChild));var C=null;mxEvent.addListener(p,
"click",B)}h.appendChild(q);h.style.paddingRight=18*q.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=
@ -6224,12 +6224,12 @@ EditorUi.prototype.showLibraryDialog=function(b,a,c,d,f){b=new LibraryDialog(thi
a.className="geTitle";a.style.height="100%";a.style.paddingTop="9px";mxUtils.write(a,mxResources.get("moreShapes")+"...");mxEvent.addListener(a,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(a);return b};EditorUi.prototype.handleError=function(b,a,c){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=null!=b&&null!=b.error?b.error:b;if(null!=d||null!=a){b=mxUtils.htmlEntities(mxResources.get("unknownError"));
var g=mxResources.get("ok"),f=null;a=null!=a?a:mxResources.get("error");if(null!=d)if(null!=d.retry&&(g=mxResources.get("cancel"),f=function(){e();d.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&d.type==gapi.drive.realtime.ErrorType.FORBIDDEN)b=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==d.code||404==d.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&d.type==
gapi.drive.realtime.ErrorType.NOT_FOUND){b=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var h=window.location.hash;null!=h&&"#G"==h.substring(0,2)&&(h=h.substring(2),b+=' <a href="https://drive.google.com/open?id='+h+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else d.code==App.ERROR_TIMEOUT?b=mxUtils.htmlEntities(mxResources.get("timeout")):d.code==App.ERROR_BUSY?b=mxUtils.htmlEntities(mxResources.get("busy")):null!=d.message?b=mxUtils.htmlEntities(d.message):
null!=d.response&&null!=d.response.error&&(b=mxUtils.htmlEntities(d.response.error));this.showError(a,b,g,c,f)}else null!=c&&c()};EditorUi.prototype.showError=function(b,a,c,d,f,h,l){b=new ErrorDialog(this,b,a,c,d,f,h,l);this.showDialog(b.container,340,150,!0,!1);b.init()};EditorUi.prototype.alert=function(b,a){var e=new ErrorDialog(this,null,b,mxResources.get("ok"),a);this.showDialog(e.container,340,100,!0,!1);e.init()};EditorUi.prototype.confirm=function(b,a,c,d,f){var e=null!=this.spinner&&null!=
null!=d.response&&null!=d.response.error&&(b=mxUtils.htmlEntities(d.response.error));this.showError(a,b,g,c,f)}else null!=c&&c()};EditorUi.prototype.showError=function(b,a,c,d,f,h,l){b=new ErrorDialog(this,b,a,c,d,f,h,l);this.showDialog(b.container,340,150,!0,!1);b.init()};EditorUi.prototype.alert=function(b,a){var c=new ErrorDialog(this,null,b,mxResources.get("ok"),a);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(b,a,c,d,f){var e=null!=this.spinner&&null!=
this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,b,function(){e();null!=a&&a()},function(){e();null!=c&&c()},d,f)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(b){this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};EditorUi.prototype.isExportToCanvas=
function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};EditorUi.prototype.createImageDataUri=function(b,a,c){var e=b.toDataURL("image/"+c);if(6>=e.length||e==b.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=a&&(e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(a))));return e};
EditorUi.prototype.saveCanvas=function(b,a,c){var e="jpeg"==c?"jpg":c,d=this.getBaseFilename()+"."+e;b=this.createImageDataUri(b,a,c);this.saveData(d,e,b.substring(b.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};
EditorUi.prototype.doSaveLocalFile=function(b,a,c,d,f){if(window.Blob&&navigator.msSaveOrOpenBlob)b=d?this.base64ToBlob(b,c):new Blob([b],{type:c}),navigator.msSaveOrOpenBlob(b,a);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(b,!0):(c.document.write(b),c.document.close(),c.document.execCommand("SaveAs",!0,a),c.close());else if(mxClient.IS_IOS)a=new TextareaDialog(this,a+":",b,null,null,mxResources.get("close")),a.textarea.style.width="600px",a.textarea.style.height=
"380px",this.showDialog(a.container,620,460,!0,!0),a.init(),document.execCommand("selectall",!1,null);else{var e=document.createElement("a"),g=!mxClient.IS_SF&&"undefined"!==typeof e.download;if(g||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(b,c):new Blob([b],{type:c}));g?e.download=a:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(v){}}else this.createEchoRequest(b,
"380px",this.showDialog(a.container,620,460,!0,!0),a.init(),document.execCommand("selectall",!1,null);else{var e=document.createElement("a"),g=!mxClient.IS_SF&&"undefined"!==typeof e.download;if(g||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(b,c):new Blob([b],{type:c}));g?e.download=a:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(t){}}else this.createEchoRequest(b,
a,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,a,c,d,f,h){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=h?"&base64="+h:"")+(null!=a?"&filename="+encodeURIComponent(a):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,a){a=a||"";for(var c=atob(b),e=c.length,d=Math.ceil(e/1024),f=Array(d),h=0;h<d;++h){for(var l=1024*h,q=Math.min(l+1024,e),p=Array(q-l),m=0;l<q;++m,++l)p[m]=
c[l].charCodeAt(0);f[h]=new Uint8Array(p)}return new Blob(f,{type:a})};EditorUi.prototype.saveLocalFile=function(b,a,c,d,f,h){h=null!=h?h:!1;f="vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG)f=window.open("about:blank"),null==f?mxUtils.popup(b,!0):(f.document.write(mxUtils.htmlEntities(b,!1)),f.document.close());else if(mxClient.IS_EDGE||
11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(b,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+b:";charset=utf8,"+encodeURIComponent(b))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+b:";charset=utf8,"+encodeURIComponent(b))),null==f&&mxUtils.popup(b,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(b,a,c,d):null!=a&&0<a.length&&this.pickFolder(e,mxUtils.bind(this,function(f){try{this.exportFile(b,
@ -6255,26 +6255,26 @@ g.appendChild(h);var p=this.getCurrentFile();null==c&&null!=p&&p.constructor==wi
this.addLinkSection(e),m=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 D=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,y=y=this.addCheckbox(e,mxResources.get("allPages"),g,!g),B=this.addCheckbox(e,mxResources.get("layers"),!0),
C=this.addCheckbox(e,mxResources.get("lightbox"),!0),z=this.addEditButton(e,C),F=z.getEditInput();F.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled");F.checked&&C.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,m.checked,A.value,l.getTarget(),l.getColor(),D.checked,y.checked,
B.checked,C.checked,z.getLink())}),null,b,a);this.showDialog(b.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,a,c,d,f,h){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,b||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);var k=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";b=0;if(null!=
k&&k.constructor==window.DriveFile&&!a){b=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.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"));p.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));
n.style.marginTop="12px";n.className="geBtn";p.appendChild(n);e.appendChild(p);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"));p.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(b){this.spinner.stop();b=new ErrorDialog(this,
null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var l=null,m=null;if(null!=c||null!=d)b+=30,mxUtils.write(e,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",e.appendChild(l),mxUtils.write(e,mxResources.get("height")+
":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",e.appendChild(m),mxUtils.br(e);var u=this.addLinkSection(e,h);c=null!=this.pages&&1<this.pages.length;var y=null;if(null==k||k.constructor!=window.DriveFile||a)y=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var B=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addEditButton(e,B),z=C.getEditInput(),F=this.addCheckbox(e,mxResources.get("layers"),
!0);F.style.marginLeft=z.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="8px";mxEvent.addListener(B,"change",function(){B.checked?(F.removeAttribute("disabled"),z.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&B.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){f(u.getTarget(),u.getColor(),null==y?
!0:y.checked,B.checked,C.getLink(),F.checked,null!=l?l.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),g);this.showDialog(a.container,340,246+b,!0,!0);null!=l?(l.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,a,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));
k&&k.constructor==window.DriveFile&&!a){b=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));p.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));
l.style.marginTop="12px";l.className="geBtn";p.appendChild(l);e.appendChild(p);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));p.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,
null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var n=null,m=null;if(null!=c||null!=d)b+=30,mxUtils.write(e,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",e.appendChild(n),mxUtils.write(e,mxResources.get("height")+
":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",e.appendChild(m),mxUtils.br(e);var v=this.addLinkSection(e,h);c=null!=this.pages&&1<this.pages.length;var y=null;if(null==k||k.constructor!=window.DriveFile||a)y=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var B=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addEditButton(e,B),z=C.getEditInput(),F=this.addCheckbox(e,mxResources.get("layers"),
!0);F.style.marginLeft=z.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="8px";mxEvent.addListener(B,"change",function(){B.checked?(F.removeAttribute("disabled"),z.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&B.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){f(v.getTarget(),v.getColor(),null==y?
!0:y.checked,B.checked,C.getLink(),F.checked,null!=n?n.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),g);this.showDialog(a.container,340,246+b,!0,!0);null!=n?(n.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,a,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");b=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,b,a);this.showDialog(b.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(b,
a,c,d,f,h,l,m){l=null!=l?l:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=this.editor.graph,k="jpeg"==m?170:280,n=document.createElement("h3");mxUtils.write(n,b);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";e.appendChild(n);mxUtils.write(e,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=
this.lastExportZoom||"100%";e.appendChild(t);mxUtils.write(e,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";e.appendChild(u);mxUtils.br(e);var v=this.addCheckbox(e,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background,null,null,"jpeg"!=m),B=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),
C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");h&&(e.appendChild(C),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),k+=26);g.isSelectionEmpty()?C.setAttribute("disabled","disabled"):(C.setAttribute("checked","checked"),C.defaultChecked=!0);var z=this.addCheckbox(e,mxResources.get("shadow"),g.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");a&&(e.appendChild(F),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),k+=26);var L=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=m),G=null!=this.pages&&1<this.pages.length,E=this.addCheckbox(e,G?mxResources.get("allPages"):"",G,!G,null,"jpeg"!=m);E.style.marginLeft="24px";E.style.marginBottom="16px";G||(E.style.visibility="hidden");mxEvent.addListener(L,"change",function(){L.checked&&
G?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")});l&&G||E.setAttribute("disabled","disabled");b=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=t.value;f(t.value,v.checked,!B.checked,z.checked,L.checked,F.checked,u.value,C.checked,!E.checked)}),null,c,d);this.showDialog(b.container,320,k,!0,!0);t.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
function(b,a,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=a){var k=document.createElement("h3");mxUtils.write(k,a);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(k)}var h=this.addCheckbox(e,mxResources.get("fit"),!0),p=this.addCheckbox(e,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(e,c),l=this.addCheckbox(e,mxResources.get("lightbox"),!0),m=this.addEditButton(e,l),D=m.getEditInput(),
y=1<g.model.getChildCount(g.model.getRoot()),B=this.addCheckbox(e,mxResources.get("layers"),y,!y);B.style.marginLeft=D.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?(y&&B.removeAttribute("disabled"),D.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"));D.checked&&l.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});
a=new CustomDialog(this,e,mxUtils.bind(this,function(){b(h.checked,p.checked,n.checked,l.checked,m.getLink(),B.checked)}),null,mxResources.get("embed"),f);this.showDialog(a.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,a,c,d,f,h,l,m){function e(a){var e=" ",k="";d&&(e=" 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"+
function(b,a,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=a){var k=document.createElement("h3");mxUtils.write(k,a);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(k)}var h=this.addCheckbox(e,mxResources.get("fit"),!0),p=this.addCheckbox(e,mxResources.get("shadow"),g.shadowVisible&&d,!d),l=this.addCheckbox(e,c),n=this.addCheckbox(e,mxResources.get("lightbox"),!0),m=this.addEditButton(e,n),D=m.getEditInput(),
y=1<g.model.getChildCount(g.model.getRoot()),B=this.addCheckbox(e,mxResources.get("layers"),y,!y);B.style.marginLeft=D.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(y&&B.removeAttribute("disabled"),D.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"));D.checked&&n.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});
a=new CustomDialog(this,e,mxUtils.bind(this,function(){b(h.checked,p.checked,l.checked,n.checked,m.getLink(),B.checked)}),null,mxResources.get("embed"),f);this.showDialog(a.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,a,c,d,f,h,l,m){function e(a){var e=" ",k="";d&&(e=" 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"+
(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",k+="cursor:pointer;");b&&(k+="max-width:100%;");var p="";c&&(p=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');l('<img src="'+a+'"'+p+(""!=k?' style="'+k+'"':"")+e+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(b){var a=d?this.getFileData(!0):null;b=this.createImageDataUri(b,a,"png");e(b)}),null,null,null,mxUtils.bind(this,function(b){m({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,a);else if(a=this.getFileData(!0),g.width*g.height<=MAX_AREA&&a.length<=MAX_REQUEST_SIZE){var k="";c&&(k="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+k+"&xml="+encodeURIComponent(a));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?e("data:image/png;base64,"+n.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(b,a,c,d,f,h,l){var e=this.editor.graph.getSvg(),g=e.getElementsByTagName("a");if(null!=g)for(var k=0;k<g.length;k++){var n=g[k].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==g[k].getAttribute("target")&&g[k].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));a&&this.editor.graph.addSvgShadow(e);if(c){var m=" ",t="";d&&(m="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"+
(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.convertImages(e,mxUtils.bind(this,function(b){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+m+"/>")}))}else t="",d&&(e.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(e.getAttribute("width")),a=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","0 0 "+b+" "+a),t+="max-width:100%;max-height:"+a+"px;",e.removeAttribute("height")),""!=t&&e.setAttribute("style",t),l(mxUtils.getXml(e))};EditorUi.prototype.timeSince=function(b){b=Math.floor((new Date-b)/1E3);var a=Math.floor(b/31536E3);if(1<a)return a+" "+mxResources.get("years");a=Math.floor(b/2592E3);if(1<a)return a+
EditorUi.prototype.createEmbedSvg=function(b,a,c,d,f,h,l){var e=this.editor.graph.getSvg(),g=e.getElementsByTagName("a");if(null!=g)for(var k=0;k<g.length;k++){var n=g[k].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==g[k].getAttribute("target")&&g[k].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));a&&this.editor.graph.addSvgShadow(e);if(c){var m=" ",u="";d&&(m="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"+
(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");b&&(u+="max-width:100%;");this.convertImages(e,mxUtils.bind(this,function(b){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=u?' style="'+u+'"':"")+m+"/>")}))}else u="",d&&(e.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),u+="cursor:pointer;"),b&&(b=parseInt(e.getAttribute("width")),a=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","0 0 "+b+" "+a),u+="max-width:100%;max-height:"+a+"px;",e.removeAttribute("height")),""!=u&&e.setAttribute("style",u),l(mxUtils.getXml(e))};EditorUi.prototype.timeSince=function(b){b=Math.floor((new Date-b)/1E3);var a=Math.floor(b/31536E3);if(1<a)return a+" "+mxResources.get("years");a=Math.floor(b/2592E3);if(1<a)return a+
" "+mxResources.get("months");a=Math.floor(b/86400);if(1<a)return a+" "+mxResources.get("days");a=Math.floor(b/3600);if(1<a)return a+" "+mxResources.get("hours");a=Math.floor(b/60);return 1<a?a+" "+mxResources.get("minutes"):1==a?a+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(b,a,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(b,a,c,d,f,h,l){l=a.background;l==mxConstants.NONE&&(l=null);a=a.getSvg(l,null,null,null,null,h);null!=b&&a.setAttribute("content",b);null!=
c&&a.setAttribute("resource",c);if(null!=f)this.convertImages(a,mxUtils.bind(this,function(b){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a)};EditorUi.prototype.exportImage=function(b,a,c,d,f,h,l,
m,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,f?this.getFileData(!0,null,null,null,c,m):null,q)}catch(w){"Invalid image"==w.message?this.downloadFile(q):this.handleError(w)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();
@ -6290,7 +6290,7 @@ c&&c({code:App.ERROR_UNKNOWN})},e,this.timeout,function(){f&&null!=c&&c({code:Ap
function(){a()});else{var c=new Image;c.onload=function(){var b=document.createElement("canvas"),e=b.getContext("2d");b.height=c.height;b.width=c.width;e.drawImage(c,0,0);a(b.toDataURL())};c.onerror=function(){a()};c.src=b}};EditorUi.prototype.importXml=function(b,a,c,d,f){a=null!=a?a:0;c=null!=c?c:0;var e=[];try{var g=this.editor.graph;if(null!=b&&0<b.length){var k=mxUtils.parseXml(b),h=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=h&&"mxfile"==h.nodeName&&null!=this.pages){var l=
h.getElementsByTagName("diagram");if(1==l.length)h=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){g.model.beginUpdate();try{for(var n=0;n<l.length;n++){var m=this.updatePageRoot(new DiagramPage(l[n])),A=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[A+1]));g.model.execute(new ChangePage(this,m,m,A))}}finally{g.model.endUpdate()}}}if(null!=h&&"mxGraphModel"===h.nodeName){var D=new mxGraphModel;(new mxCodec(h.ownerDocument)).decode(h,
D);var y=D.getChildCount(D.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{b={};for(n=0;n<y;n++){var B=D.getChildAt(D.getRoot(),n);if(1!=y||g.isCellLocked(g.getDefaultParent()))B=g.importCells([B],0,0,g.model.getRoot(),null,b)[0],C=g.model.getChildren(B),g.moveCells(C,a,c),e=e.concat(C);else var C=D.getChildren(B),e=e.concat(g.importCells(C,a,c,g.getDefaultParent(),null,b))}if(d){g.isGridEnabled()&&(a=g.snap(a),c=g.snap(c));var z=g.getBoundingBoxFromGeometry(e,!0);null!=
z&&g.moveCells(e,a-z.x,c-z.y)}}finally{g.model.endUpdate()}}}}catch(F){throw f||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}return e};EditorUi.prototype.importLucidChart=function(b,a,c,d,f){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(b,a,c,d,f)}catch(t){this.handleError(t)}finally{null!=f&&f()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("/js/diagramly/Extensions.js",
z&&g.moveCells(e,a-z.x,c-z.y)}}finally{g.model.endUpdate()}}}}catch(F){throw f||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}return e};EditorUi.prototype.importLucidChart=function(b,a,c,d,f){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(b,a,c,d,f)}catch(u){this.handleError(u)}finally{null!=f&&f()}});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.insertLucidChart=function(b,a,c,d,f){f=JSON.parse(JSON.parse(b).state);b=[];for(var e in f.Pages)b.push(f.Pages[e]);b.sort(function(b,a){return b.Properties.Order<a.Properties.Order?-1:b.Properties.Order>a.Properties.Order?1:0});if(0<b.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(b[0],a,c,d),null!=this.pages){var g=this.currentPage;for(a=1;a<b.length;a++)this.insertPage(),this.pasteLucidChart(b[a]);this.selectPage(g)}}finally{this.editor.graph.getModel().endUpdate()}}};
EditorUi.prototype.insertTextAt=function(b,a,c,d,f,h,l){h=null!=h?h:!0;l=null!=l?l:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,a,c,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var e=
this.editor.graph;if("data:image/png;base64,"==b.substring(0,22)){var g=this.extractGraphModelFromPng(b),k=this.importXml(g,a,c,h,!0);if(0<k.length)return k}if("data:image/svg+xml;"==b.substring(0,19))try{if(g=null,"data:image/svg+xml;base64,"==b.substring(0,26)?(g=b.substring(b.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(b.substring(b.indexOf(",")+1)),k=this.importXml(g,a,c,h,!0),0<k.length)return k}catch(x){}this.loadImage(b,mxUtils.bind(this,
@ -6303,16 +6303,16 @@ a)+b.substring(b.indexOf(",",a+1))),p&&g.isGridEnabled()&&(c=g.snap(c),d=g.snap(
(b=b.responseText,null!=b&&"<mxlibrary"==b.substring(0,10)?(null!=l&&".vssx"==l.toLowerCase().substring(l.length-5)&&(l=l.substring(0,l.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,b,l))):a=this.importXml(b,c,d,p));null!=m&&m(a)}}),l)):/(\.vsd)($|\?)/i.test(l)||(g=this.insertTextAt(this.validateFileData(b),c,d,!0,null,p));e||null==m||m(g);return g};EditorUi.prototype.base64Encode=function(b){for(var a="",c=0,d=b.length,f,h,l;c<d;){f=b.charCodeAt(c++)&255;if(c==d){a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>
2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);a+="==";break}h=b.charCodeAt(c++);if(c==d){a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);a+="=";break}l=b.charCodeAt(c++);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>
2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(l&192)>>6);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return a};EditorUi.prototype.importFiles=function(b,a,c,d,f,h,l,m,q,p,x,w){a=null!=a?a:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;p=null!=p?p:this.maxImageBytes;var e=null!=a&&null!=c,g=!0,k=!1;if(!mxClient.IS_CHROMEAPP&&
null!=b)for(var n=x||this.resampleThreshold,t=0;t<b.length;t++)if("image/"==b[t].type.substring(0,6)&&b[t].size>n){k=!0;break}var u=mxUtils.bind(this,function(){var k=this.editor.graph,q=k.gridSize;f=null!=f?f:mxUtils.bind(this,function(b,a,c,d,f,g,h,k,l){return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,h)),null):this.importFile(b,a,c,d,f,g,h,k,l,e,w)});h=null!=h?h:mxUtils.bind(this,function(b){k.setSelectionCells(b)});if(this.spinner.spin(document.body,
mxResources.get("loading")))for(var n=b.length,t=n,u=[],v=mxUtils.bind(this,function(b,a){u[b]=a;if(0==--t){this.spinner.stop();if(null!=m)m(u);else{var c=[];k.getModel().beginUpdate();try{for(var e=0;e<u.length;e++){var d=u[e]();null!=d&&(c=c.concat(d))}}finally{k.getModel().endUpdate()}}h(c)}}),y=0;y<n;y++)mxUtils.bind(this,function(e){var h=b[e],k=new FileReader;k.onload=mxUtils.bind(this,function(b){if(null==l||l(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var k=
b.target.result,m=k.indexOf(","),n=atob(k.substring(m+1)),t=mxUtils.parseXml(n),n=t.getElementsByTagName("svg");if(0<n.length){var n=n[0],u=w?null:n.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?v(e,mxUtils.bind(this,function(){try{if(k.substring(0,m+1),null!=t){var b=t.getElementsByTagName("svg");
if(0<b.length){var g=b[0],l=parseFloat(g.getAttribute("width")),p=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+p);else if(isNaN(l)||isNaN(p)){var x=n.split(" ");3<x.length&&(l=parseFloat(x[2]),p=parseFloat(x[3]))}k=this.createSvgDataUri(mxUtils.getXml(b[0]));var u=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,p));return f(k,h.type,a+e*q,c+e*q,Math.max(1,Math.round(l*u)),Math.max(1,Math.round(p*u)),h.name)}}}catch(Z){}return null})):
v(e,mxUtils.bind(this,function(){return f(u,"text/xml",a+e*q,c+e*q,0,0,h.name)}))}}else{n=!1;if("image/png"==h.type){var y=w?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var C=new Image;C.src=b.target.result;v(e,mxUtils.bind(this,function(){return f(y,"text/xml",a+e*q,c+e*q,C.width,C.height,h.name)}));n=!0}}n||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,
null!=b)for(var n=x||this.resampleThreshold,u=0;u<b.length;u++)if("image/"==b[u].type.substring(0,6)&&b[u].size>n){k=!0;break}var t=mxUtils.bind(this,function(){var k=this.editor.graph,q=k.gridSize;f=null!=f?f:mxUtils.bind(this,function(b,a,c,d,f,g,h,k,l){return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,h)),null):this.importFile(b,a,c,d,f,g,h,k,l,e,w)});h=null!=h?h:mxUtils.bind(this,function(b){k.setSelectionCells(b)});if(this.spinner.spin(document.body,
mxResources.get("loading")))for(var n=b.length,u=n,t=[],v=mxUtils.bind(this,function(b,a){t[b]=a;if(0==--u){this.spinner.stop();if(null!=m)m(t);else{var c=[];k.getModel().beginUpdate();try{for(var e=0;e<t.length;e++){var d=t[e]();null!=d&&(c=c.concat(d))}}finally{k.getModel().endUpdate()}}h(c)}}),y=0;y<n;y++)mxUtils.bind(this,function(e){var h=b[e],k=new FileReader;k.onload=mxUtils.bind(this,function(b){if(null==l||l(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var k=
b.target.result,m=k.indexOf(","),n=atob(k.substring(m+1)),u=mxUtils.parseXml(n),n=u.getElementsByTagName("svg");if(0<n.length){var n=n[0],t=w?null:n.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)?v(e,mxUtils.bind(this,function(){try{if(k.substring(0,m+1),null!=u){var b=u.getElementsByTagName("svg");
if(0<b.length){var g=b[0],l=parseFloat(g.getAttribute("width")),p=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox","0 0 "+l+" "+p);else if(isNaN(l)||isNaN(p)){var x=n.split(" ");3<x.length&&(l=parseFloat(x[2]),p=parseFloat(x[3]))}k=this.createSvgDataUri(mxUtils.getXml(b[0]));var t=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,p));return f(k,h.type,a+e*q,c+e*q,Math.max(1,Math.round(l*t)),Math.max(1,Math.round(p*t)),h.name)}}}catch(Z){}return null})):
v(e,mxUtils.bind(this,function(){return f(t,"text/xml",a+e*q,c+e*q,0,0,h.name)}))}}else{n=!1;if("image/png"==h.type){var y=w?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var C=new Image;C.src=b.target.result;v(e,mxUtils.bind(this,function(){return f(y,"text/xml",a+e*q,c+e*q,C.width,C.height,h.name)}));n=!0}}n||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,
function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,b.target.result,mxUtils.bind(this,function(k,l,m){v(e,mxUtils.bind(this,function(){if(null!=k&&k.length<p){var n=g&&this.isResampleImage(b.target.result,x)?Math.min(1,Math.min(d/l,d/m)):1;return f(k,h.type,a+e*q,c+e*q,Math.round(l*n),Math.round(m*n),h.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),g,d,x)})))}else f(b.target.result,h.type,a+e*q,c+e*q,240,160,h.name,function(b){v(e,function(){return b})})});/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name)?f(null,h.type,a+e*q,c+e*q,240,160,h.name,function(b){v(e,function(){return b})},h):"image"==h.type.substring(0,5)?k.readAsDataURL(h):k.readAsText(h)})(y)});k?this.confirmImageResize(function(b){g=b;u()},q):u()};EditorUi.prototype.confirmImageResize=function(b,a){a=null!=a?a:!1;var c=null!=this.spinner&&null!=this.spinner.pause?
return null}))}),g,d,x)})))}else f(b.target.result,h.type,a+e*q,c+e*q,240,160,h.name,function(b){v(e,function(){return b})})});/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name)?f(null,h.type,a+e*q,c+e*q,240,160,h.name,function(b){v(e,function(){return b})},h):"image"==h.type.substring(0,5)?k.readAsDataURL(h):k.readAsText(h)})(y)});k?this.confirmImageResize(function(b){g=b;t()},q):t()};EditorUi.prototype.confirmImageResize=function(b,a){a=null!=a?a:!1;var c=null!=this.spinner&&null!=this.spinner.pause?
this.spinner.pause():function(){},e=function(a,e){mxSettings.setResizeImages(a?e:null);mxSettings.save();c();b(e)},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null;null==d||a?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(b){e(b,!0)},function(b){e(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||
mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(b,a,c){c=null!=c?c:b.name;var e=new FormData;e.append("format","xml");e.append("upfile",b,c);var d=new XMLHttpRequest;d.open("POST",OPEN_URL);d.onreadystatechange=function(){a(d)};d.send(e)};EditorUi.prototype.isResampleImage=function(b,a){a=null!=a?a:this.resampleThreshold;return b.length>a};EditorUi.prototype.resizeImage=function(b,a,c,d,f,h){f=null!=f?f:this.maxImageSize;
var e=Math.max(1,b.width),g=Math.max(1,b.height);if(d&&this.isResampleImage(a,h))try{var k=Math.max(e/f,g/f);if(1<k){var l=Math.round(e/k),m=Math.round(g/k),n=document.createElement("canvas");n.width=l;n.height=m;n.getContext("2d").drawImage(b,0,0,l,m);var u=n.toDataURL();if(u.length<a.length){var D=document.createElement("canvas");D.width=l;D.height=m;var y=D.toDataURL();u!==y&&(a=u,e=l,g=m)}}}catch(B){}c(a,e,g)};EditorUi.prototype.crcTable=[];for(var f=0;256>f;f++)for(var d=f,c=0;8>c;c++)d=1==(d&
var e=Math.max(1,b.width),g=Math.max(1,b.height);if(d&&this.isResampleImage(a,h))try{var k=Math.max(e/f,g/f);if(1<k){var l=Math.round(e/k),m=Math.round(g/k),n=document.createElement("canvas");n.width=l;n.height=m;n.getContext("2d").drawImage(b,0,0,l,m);var v=n.toDataURL();if(v.length<a.length){var D=document.createElement("canvas");D.width=l;D.height=m;var y=D.toDataURL();v!==y&&(a=v,e=l,g=m)}}}catch(B){}c(a,e,g)};EditorUi.prototype.crcTable=[];for(var f=0;256>f;f++)for(var d=f,c=0;8>c;c++)d=1==(d&
1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[f]=d;EditorUi.prototype.updateCRC=function(b,a,c,d){for(var e=0;e<d;e++)b=EditorUi.prototype.crcTable[(b^a[c+e])&255]^b>>>8;return b};EditorUi.prototype.writeGraphModelToPng=function(b,a,c,d,f){function e(b,a){var c=k;k+=a;return b.substring(c,k)}function g(b){b=e(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function h(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+
1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(e(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(b,4),"IHDR"!=e(b,4))null!=f&&f();else{e(b,17);f=b.substring(0,k);do{var l=g(b);if("IDAT"==e(b,4)){f=b.substring(0,k-8);c=c+String.fromCharCode(0)+("zTXt"==a?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,a,0,4);d=this.updateCRC(d,c,0,c.length);f+=h(c.length)+a+c+h(d^4294967295);f+=b.substring(k-8,b.length);break}f+=b.substring(k-8,k-4+
l);d=e(b,l);e(b,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(b){var a=null;try{var c=b.substring(b.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(b,c,e){b=d.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=this.editor.graph.bytesToString(pako.inflateRaw(b.substring(e+2))).replace(/\+/g,
@ -6320,24 +6320,24 @@ l);d=e(b,l);e(b,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(f):
0<c&&(b=a.getPageById(b.substring(c+1)))&&a.selectPage(b)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph,d=c.addClickHandler;c.addClickHandler=function(a,e,f){var h=e;e=function(a,e){if(null==e){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(e=d.getAttribute("href"))}null!=e&&c.isPageLink(e)&&(b(e),mxEvent.consume(a));null!=h&&h(a,e)};d.call(this,a,e,f)};h.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:f.apply(this,arguments)};var l=c.createLinkForHint;c.createLinkForHint=function(e,d){var f=
c.isPageLink(e);if(f){var h=e.indexOf(",");0<h&&(h=a.getPageById(e.substring(h+1)),d=null!=h?h.getName():mxResources.get("pageNotFound"))}h=l.apply(this,arguments);f&&mxEvent.addListener(h,"click",function(a){b(e);mxEvent.consume(a)});return h};var m=c.labelLinkClicked;c.labelLinkClicked=function(a,e,d){var f=e.getAttribute("href");c.isPageLink(f)?(b(f),mxEvent.consume(d)):m.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=
null!=c.getTitle()?c.getTitle():b);return b};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless){var q=function(){window.setTimeout(function(){p.innerHTML="&nbsp;";p.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,
null!=c.getTitle()?c.getTitle():b);return b};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless){var q=function(){window.setTimeout(function(){p.innerHTML="&nbsp;";p.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,
!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(b){var a=this.editor.graph;if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,e=!1,d=0;d<c.types.length;d++)if("text/"===c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var h=f[index];if("file"===h.kind){if(a.isEditing())this.importFiles([h.getAsFile()],
0,0,this.maxImageSize,function(b,c,e,d,f,h){a.insertImage(b,f,h)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(J){}}),!1);var p=document.createElement("div");p.style.position="absolute";p.style.whiteSpace="nowrap";p.style.overflow="hidden";p.style.display="block";p.contentEditable=!0;mxUtils.setOpacity(p,
0,0,this.maxImageSize,function(b,c,e,d,f,h){a.insertImage(b,f,h)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(J){}}),!1);var p=document.createElement("div");p.style.position="absolute";p.style.whiteSpace="nowrap";p.style.overflow="hidden";p.style.display="block";p.contentEditable=!0;mxUtils.setOpacity(p,
0);p.style.width="1px";p.style.height="1px";p.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var a=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==a.nodeName||"TEXTAREA"==a.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||
x||(p.style.left=c.container.scrollLeft+10+"px",p.style.top=c.container.scrollTop+10+"px",c.container.appendChild(p),x=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){p.focus();document.execCommand("selectAll",!1,null)},0):(p.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var a=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=a&&17!=a&&91!=a||(x=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),
p.parentNode.removeChild(p))}),0)}));mxEvent.addListener(p,"copy",mxUtils.bind(this,function(b){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(p),q())}));mxEvent.addListener(p,"cut",mxUtils.bind(this,function(b){c.isEnabled()&&(this.copyCells(p,!0),q())}));mxEvent.addListener(p,"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(p.innerHTML="&nbsp;",p.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,p);p.innerHTML="&nbsp;"}),0))}),
!0);var w=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==p?!0:w.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var a=this.editor.graph,c=a.cellEditor.text2,e=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),
e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(c));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,c,e,d,f,h){a.insertImage(b,f,h)},function(){},function(b){return"image/"==
b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,e)),d/Math.max(1,b));a.insertImage(decodeURIComponent(c),e*d,b*d)})):document.execCommand("insertHTML",
!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){v=document.createElement("div");v.style.position="absolute";v.style.top="95px";v.style.left="250px";
v.style.width="2000px";v.style.height="30px";v.style.background="whiteSmoke";document.body.appendChild(v);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var D=document.createElement("div");D.style.position="absolute";D.style.top="95px";D.style.left="220px";D.style.width="30px";D.style.height="30px";D.style.background="whiteSmoke";document.body.appendChild(D);
this.vRuler=new mxRuler(this.editor.graph,A,!0);this.hRuler=new mxRuler(this.editor.graph,v,!1)}if("1"==urlParams.test){v=document.getElementById("geFooter");null!=v&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,
"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),v.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,a){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility=
"hidden"})));var y=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:y.apply(this,arguments)}}v=document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport){var B=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==B&&(!mxClient.IS_IE||
!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){t=document.createElement("div");t.style.position="absolute";t.style.top="95px";t.style.left="250px";
t.style.width="2000px";t.style.height="30px";t.style.background="whiteSmoke";document.body.appendChild(t);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var D=document.createElement("div");D.style.position="absolute";D.style.top="95px";D.style.left="220px";D.style.width="30px";D.style.height="30px";D.style.background="whiteSmoke";document.body.appendChild(D);
this.vRuler=new mxRuler(this.editor.graph,A,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.test){t=document.getElementById("geFooter");null!=t&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,
"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,a){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility=
"hidden"})));var y=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:y.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport){var B=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==B&&(!mxClient.IS_IE||
10<document.documentMode)&&(B=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=B&&(B.parentNode.removeChild(B),B=null);if(c.isEnabled()){var a=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,d=c.view.scale,f=a.x/d-e.x,h=a.y/d-e.y;mxEvent.isAltDown(b)&&(h=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,
f,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var g=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,a=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=a)c.setSelectionCells(this.importXml(a,f,h,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var k=b.dataTransfer.getData("text/html"),a=document.createElement("div");a.innerHTML=k;var l=null,e=a.getElementsByTagName("img");
null!=e&&1==e.length?(k=e[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(a=a.getElementsByTagName("a"),null!=a&&1==a.length&&(k=a[0].getAttribute("href")));var p=!0,m=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,h,!0,l,null,p))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;m()},mxEvent.isControlDown(b)):m()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,
function(b){var a=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,a)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",f,h,a*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(g,f,h,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
f,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,a=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=a)c.setSelectionCells(this.importXml(a,f,h,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var g=b.dataTransfer.getData("text/html"),a=document.createElement("div");a.innerHTML=g;var l=null,e=a.getElementsByTagName("img");
null!=e&&1==e.length?(g=e[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)||(l=!0)):(a=a.getElementsByTagName("a"),null!=a&&1==a.length&&(g=a[0].getAttribute("href")));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(g,f,h,!0,l,null,p))});l&&g.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,
function(b){var a=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,a)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",f,h,a*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,f,h,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
f,h,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();"undefined"!==typeof window.mxSettings&&this.installSettings()};EditorUi.prototype.installSettings=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)ColorDialog.recentColors=mxSettings.getRecentColors(),this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle(),this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle(),this.fireEvent(new mxEventObject("styleChanged",
"keys",[],"values",[],"cells",[])),this.addListener("styleChanged",mxUtils.bind(this,function(b,a){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()})),this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget()),this.fireEvent(new mxEventObject("copyConnectChanged")),this.addListener("copyConnectChanged",mxUtils.bind(this,function(b,a){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());
mxSettings.save()})),this.editor.graph.pageFormat=mxSettings.getPageFormat(),this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,a){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()})),this.editor.graph.view.gridColor=mxSettings.getGridColor(),this.addListener("gridColorChanged",mxUtils.bind(this,function(b,a){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()})),mxClient.IS_CHROMEAPP&&(this.editor.addListener("autosaveChanged",mxUtils.bind(this,
@ -6426,7 +6426,7 @@ replay:"/plugins/replay.js"};App.getStoredMode=function(){var a=null;null==a&&is
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
App.main=function(a){var f=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,d,h){try{if(a!=f&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){f=a;var e=new Image,g=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";e.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+
"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=h&&null!=h.stack?"&stack="+encodeURIComponent(h.stack):"")}}catch(t){}});"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var d=document.createElement("iframe");d.setAttribute("width",
"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=h&&null!=h.stack?"&stack="+encodeURIComponent(h.stack):"")}}catch(u){}});"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var d=document.createElement("iframe");d.setAttribute("width",
"0");d.setAttribute("height","0");d.setAttribute("src","offline.html");document.body.appendChild(d);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(a){return mxStencilRegistry.stencils[a]};mxStencilRegistry.loadStencilSet=function(a,b,c){a=a.substring(a.indexOf("/")+1);a="mxgraph."+a.substring(0,a.length-4).replace(/\//g,".");a=mxStencilRegistry.stencilSet[a];null!=a&&mxStencilRegistry.parseStencilSet(a,b,!1)};for(d=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=
d;)"shapes"==d.nodeName&&null!=d.getAttribute("name")&&(mxStencilRegistry.stencilSet[d.getAttribute("name").toLowerCase()]=d,mxStencilRegistry.parseStencilSet(d)),d=d.nextSibling}"0"==urlParams.picker||mxClient.IS_QUIRKS||8==document.documentMode||mxscript(document.location.protocol+"//www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22picker%22%2C%22version%22%3A%221%22%2C%22language%22%3A%22"+mxClient.language+"%22%7D%5D%7D");if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var d=
mxSettings.getPlugins(),c=urlParams.p;(null!=c||null!=d&&0<d.length)&&App.initPluginCallback();if(null!=c)for(var h=c.split(";"),c=0;c<h.length;c++){var l=App.pluginRegistry[h[c]];null!=l?mxscript(l):null!=window.console&&console.log("Unknown plugin:",h[c])}if(null!=d&&0<d.length&&"0"!=urlParams.plugins){h=window.location.protocol+"//"+window.location.host;l=!0;for(c=0;c<d.length&&l;c++)"/"!=d[c].charAt(0)&&d[c].substring(0,h.length)!=h&&(l=!1);if(l||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",
@ -6444,20 +6444,21 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+
"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.timeout=25E3;"1"!=urlParams.embed&&(App.prototype.menubarHeight=60);App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.basicAds=['<a title="'+mxResources.get("loveIt",["draw.io"])+'" target="_blank" href="https://twitter.com/intent/tweet?text='+encodeURIComponent(mxResources.get("loveIt",["www.draw.io"]))+'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-280)/3)+\',height=280,width=640\');return false;"\'><img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="'+
Editor.tweetImage+'"/>'+mxResources.get("loveIt",["draw.io"])+"</a>",'<a title="HTML5 JavaScript Diagramming" target="_blank" href="https://github.com/jgraph/draw.io"><img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="images/glyphicons_github.png"/>Fork us on GitHub</a>','<a title="'+mxResources.get("loveIt",["draw.io"])+'" target="_blank" href="https://www.facebook.com/sharer.php?u='+encodeURIComponent("https://www.draw.io")+'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-520)/3)+\',height=520,width=640\');return false;"\'><img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="'+
Editor.tweetImage+'"/>'+mxResources.get("loveIt",["draw.io"])+"</a>",'<a title="'+mxResources.get("loveIt",["draw.io"])+'" target="_blank" href="https://www.facebook.com/sharer.php?u='+encodeURIComponent("https://www.draw.io")+'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-520)/3)+\',height=520,width=640\');return false;"\'><img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="'+
Editor.facebookImage+'"/>'+mxResources.get("loveIt",["draw.io"])+"</a>",'<a title="draw.io Offline App" href="https://www.draw.io/app" target="_blank"><img border="0" align="absmiddle" style="margin-top:-1px;padding-right:8px;" src="images/download.png"/>draw.io Offline App</a>'];this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",
mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=
a)});a()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var f=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var b=this.getCurrentFile();null!=b&&b.constructor==DriveFile&&(b=document.getElementById("geFooterItem2"),null!=b&&(b.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));
a)});a()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var f=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var b=mxUtils.bind(this,function(){this.drive=new DriveClient(this);"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var b=this.getCurrentFile();null!=b&&b.constructor==DriveFile&&(b=document.getElementById("geFooterItem2"),null!=b&&(b.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));
this.drive.addListener("userChanged",mxUtils.bind(this,function(){null!=this.updateAd&&(this.adsHtml=this.basicAds.concat(['<a title="'+mxResources.get("loveIt",["draw.io"])+'" target="_blank" href="https://plus.google.com/share?url='+encodeURIComponent("https://www.draw.io")+'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,left=\'+((screen.width-480)/2)+\',top=\'+((screen.height-520)/3)+\',height=520,width=480\');return false;"\'><img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="images/glyphicons_google.png"/>'+
mxResources.get("loveIt",["draw.io"])+"</a>",'<a title="Google Docs Add-on" href="https://chrome.google.com/webstore/detail/drawio-diagrams/clpbjldiohnnmfmkngmaohehlnfkmoea" target="_blank"><img border="0" align="absmiddle" style="margin-top:-4px;" src="images/glyphicons_star.png"/>&nbsp;&nbsp;Google Docs Add-on</a>','<a title="Google Chrome App" href="https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla" target="_blank"><img border="0" align="absmiddle" style="margin-top:-4px;" src="images/download.png"/>&nbsp;&nbsp;Google Chrome App</a>',
'<a title="Please help us to 5 stars" href="https://chrome.google.com/webstore/detail/drawio-pro/onlkggianjhjenigcpigpjehhpplldkc/reviews" target="_blank"><img border="0" align="absmiddle" style="margin-top:-4px;" src="images/glyphicons_star.png"/>&nbsp;&nbsp;Please help us to 5 stars</a>']),this.updateAd(this.adsHtml.length-1));this.updateUserElement();this.restoreLibraries();this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?
(gapi.load("auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){"function"===
(gapi.load("auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(a){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&b()}))}))})),window.DrawGapiClientCallback=null):b()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){"function"===
typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility=
"hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();var c=document.getElementById("geFooterItem2");if(null!=c){this.basicAds.push(c.innerHTML);this.adsHtml=this.basicAds;mxUtils.setPrefixedStyle(c.style,"transition",
"all 1s ease");var h=this.adsHtml.length-1,l=null;this.updateAd=function(a){1==this.adsHtml.length&&window.clearInterval(l);0==this.adsHtml.length?null!=c.parentNode&&c.parentNode.removeChild(c):(a==h&&a++,mxUtils.setPrefixedStyle(c.style,"transform","scale(0)"),c.style.opacity="0",window.setTimeout(mxUtils.bind(this,function(){c.innerHTML=this.adsHtml[a];mxUtils.setPrefixedStyle(c.style,"transform","scale(1)");c.style.opacity="1";h=a}),1E3))};l=window.setInterval(mxUtils.bind(this,function(){this.updateAd(Math.round(Math.random()*
(this.adsHtml.length-2)))}),18E4);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.adsHtml.splice(h,1);h=null;this.updateAd(0)}));10<mxSettings.getOpenCounter()&&window.setTimeout(mxUtils.bind(this,function(){this.updateAd(0)}),15E3)}null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",
this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop=
"12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
"all 1s ease");var h=this.adsHtml.length-1,l=null,m=null;this.updateAd=function(b){null!=l&&(window.clearTimeout(l),l=null);1==this.adsHtml.length&&window.clearInterval(m);0==this.adsHtml.length?null!=c.parentNode&&c.parentNode.removeChild(c):(b==h&&b++,mxUtils.setPrefixedStyle(c.style,"transform","scale(0)"),c.style.opacity="0",window.setTimeout(mxUtils.bind(this,function(){c.innerHTML=this.adsHtml[b];mxUtils.setPrefixedStyle(c.style,"transform","scale(1)");c.style.opacity="1";h=b}),1E3))};m=window.setInterval(mxUtils.bind(this,
function(){this.updateAd(Math.round(Math.random()*(this.adsHtml.length-2)))}),18E4);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.adsHtml.splice(h,1);h=null;this.updateAd(0)}));10<mxSettings.getOpenCounter()&&(l=window.setTimeout(mxUtils.bind(this,function(){this.updateAd(0)}),15E3))}null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position=
"absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",
mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};
App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
App.prototype.checkLicense=function(){var a=this.drive.getUser(),f=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=f){var d=f.lastIndexOf("@"),c=f;0<=d&&(c=f.substring(d+1));mxUtils.post("/license","domain="+encodeURIComponent(c)+"&email="+encodeURIComponent(f)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var d=
a.getText();if(0<d.length){var f=JSON.parse(d);null!=f&&this.handleLicense(f,c)}}}catch(b){}}))}};
App.prototype.handleLicense=function(a,f){var d=document.getElementById("geFooter"),c=null;if(null!=d&&null!=a)if(c=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=c&&"never"!=c){var h=new Date(Date.parse(c)),l=Math.round((h-Date.now())/864E5);if(90>l){var m="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(f);d.style.height="100%";d.style.margin="0px";d.style.display=
@ -6471,8 +6472,8 @@ App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var
App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var f=-1,d=0;d<a.length;d++)f=f>>>8^this.crcTable[(f^a.charCodeAt(d))&255];return(f^-1)>>>0};
App.prototype.getThumbnail=function(a,f){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),h=c.getGlobalVariable,l=this.pages[0];c.getGlobalVariable=function(b){return"page"==b?l.getName():"pagenumber"==b?1:h.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(l.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
function(b){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);f(b)}),a,this.thumbImageCache,"#ffffff",function(){f()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),b=c.getGraphBounds(),e=a/b.width,e=Math.min(1,Math.min(3*a/(4*b.height),e)),g=Math.floor(b.x),k=Math.floor(b.y);m.setAttribute("width",Math.ceil(e*(b.width+4)));m.setAttribute("height",Math.ceil(e*(b.height+4)));var n=m.getContext("2d");
n.scale(e,e);n.translate(-g,-k);var u=c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";n.save();n.fillStyle=u;n.fillRect(g,k,Math.ceil(b.width+4),Math.ceil(b.height+4));n.restore();var t=new mxJsCanvas(m),v=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var q=new mxImageExport;q.drawShape=function(b,a){b.shape instanceof mxShape&&b.shape.checkBounds()&&(a.save(),a.translate(.5,.5),b.shape.paint(a),a.translate(-.5,-.5),a.restore())};q.drawText=function(b,
a){};q.drawState(c.getView().getState(c.model.root),v);v.finish(mxUtils.bind(this,function(){q.drawState(c.getView().getState(c.model.root),t);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);f(m)}));d=!0}}catch(p){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
n.scale(e,e);n.translate(-g,-k);var v=c.background;if(null==v||""==v||v==mxConstants.NONE)v="#ffffff";n.save();n.fillStyle=v;n.fillRect(g,k,Math.ceil(b.width+4),Math.ceil(b.height+4));n.restore();var u=new mxJsCanvas(m),t=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var q=new mxImageExport;q.drawShape=function(b,a){b.shape instanceof mxShape&&b.shape.checkBounds()&&(a.save(),a.translate(.5,.5),b.shape.paint(a),a.translate(-.5,-.5),a.restore())};q.drawText=function(b,
a){};q.drawState(c.getView().getState(c.model.root),t);t.finish(mxUtils.bind(this,function(){q.drawState(c.getView().getState(c.model.root),u);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);f(m)}));d=!0}}catch(p){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(f,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie="MODE="+f+"; expires="+c.toUTCString()}null!=this.appIcon&&(c=this.getCurrentFile(),f=null!=c?c.getMode():null,f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
@ -6486,7 +6487,7 @@ App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var f=document.creat
mxResources.get("close"));a.innerHTML=mxResources.get("close");f.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(a))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},2E3)},15E3)}};
App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var c=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==c||this.loadFile(c,!0)}catch(b){null!=document.body&&this.handleError(b,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=
b?b.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length)){var a=window.opener||window.parent;a!=window&&this.installMessageHandler(mxUtils.bind(this,function(b,c){if(c.source==a){"data:image/png;base64,"==b.substring(0,22)&&(b=this.extractGraphModelFromPng(b));
var e=urlParams.title,e=null!=e?decodeURIComponent(e):this.defaultFilename;this.fileLoaded(new LocalFile(this,b,e,!0));this.getCurrentFile().setModified(!this.editor.chromeless)}}))}else if(null==this.dialog)if("1"==urlParams.demo){var c=Editor.useLocalStorage;this.createFile(this.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c}else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(e){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=
var d=urlParams.title,d=null!=d?decodeURIComponent(d):this.defaultFilename;this.fileLoaded(new LocalFile(this,b,d,!0));this.getCurrentFile().setModified(!this.editor.chromeless)}}))}else if(null==this.dialog)if("1"==urlParams.demo){var c=Editor.useLocalStorage;this.createFile(this.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c}else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(e){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=
this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(this.getDiagramId());else{var d=this.getDraft(),b=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;this.createFile(this.defaultFilename,b,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=d&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var f=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&
null!=f&&0<f.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),c=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var c=urlParams.title,c=null!=c?decodeURIComponent(c):this.defaultFilename;a=
this.getServiceCount(!0);var d=4>=a?4:3,c=new CreateDialog(this,c,mxUtils.bind(this,function(b,a){if(null==a){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<b.length?b:this.defaultFilename,this.getFileData(),null,null,null,null,null,!0);Editor.useLocalStorage=c}else this.createFile(b,this.getFileData(!0),null,a)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(c.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&
@ -6521,9 +6522,9 @@ function(b){e();this.fileCreated(b,d,l,h)}),g)):c==App.MODE_GITHUB&&null!=this.g
!1,m):c==App.MODE_BROWSER?(e(),c=mxUtils.bind(this,function(){var b=new StorageFile(this,f,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,l,h)}),g)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(e(),this.fileCreated(new LocalFile(this,f,a,null==c),d,l,h))}};
App.prototype.fileCreated=function(a,f,d,c){var h=window.location.pathname;null!=f&&0<f.length&&(h+="?libs="+f);h=this.getUrl(h);a.getMode()!=App.MODE_DEVICE&&(h+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var l=a.getData(),l=0<l.length?this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+h,b=null;if(null!=l&&/\.svg$/i.test(a.getTitle())){b=this.createTemporaryGraph(this.editor.graph.getStylesheet());
document.body.appendChild(b.container);node=l;if(null!=node){var e=null;if("diagram"==node.nodeName)e=node;else if("mxfile"==node.nodeName){var g=node.getElementsByTagName("diagram");if(0<g.length){var e=g[0],k=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b?e.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:k.apply(this,arguments)}}}null!=e&&(g=b.decompress(mxUtils.getTextContent(e)),null!=g&&0<g.length&&(node=mxUtils.parseXml(g).documentElement))}g=
this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(node)}catch(t){}finally{this.editor.graph=g}}a.setData(this.createFileData(l,b,a,m));null!=b&&b.container.parentNode.removeChild(b.container);var n=mxUtils.bind(this,function(){this.spinner.stop()}),u=mxUtils.bind(this,function(){n();var b=this.getCurrentFile();null==d&&null!=b&&(d=!b.isModified()&&null==b.getMode());var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));
this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(node)}catch(u){}finally{this.editor.graph=g}}a.setData(this.createFileData(l,b,a,m));null!=b&&b.container.parentNode.removeChild(b.container);var n=mxUtils.bind(this,function(){this.spinner.stop()}),v=mxUtils.bind(this,function(){n();var b=this.getCurrentFile();null==d&&null!=b&&(d=!b.isModified()&&null==b.getMode());var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));
null!=f&&this.sidebar.showEntries(f)}),g=mxUtils.bind(this,function(){d||null==b||!b.isModified()?e():this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?g():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=c&&c(),window.openWindow(h,null,g))});a.constructor==LocalFile||a.constructor==DriveFile?
u():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){u()}),mxUtils.bind(this,function(b){n();this.handleError(b)}))}};
v():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){v()}),mxUtils.bind(this,function(b){n();this.handleError(b)}))}};
App.prototype.loadFile=function(a,f,d){this.hideDialog();var c=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var c=localStorage.getItem(a);if(null!=c)this.fileLoaded(new StorageFile(this,c,a));else throw{message:mxResources.get("fileNotFound")};}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"),
mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}));else if(null!=d)this.spinner.stop(),this.fileLoaded(d);else if("R"==a.charAt(0))this.spinner.stop(),c=decodeURIComponent(a.substring(1)),"<"!=c.charAt(0)&&(c=this.editor.graph.decompress(c)),
c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),c.getHash=function(){return a},this.fileLoaded(c);else if("U"==a.charAt(0)){var b=decodeURIComponent(a.substring(1));this.loadTemplate(b,mxUtils.bind(this,function(c){this.spinner.stop();if(null!=c&&0<c.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=b,h=b.lastIndexOf("."),l=e.lastIndexOf("/");h>l&&0<l&&(e=e.substring(l+1,h),h=b.substring(h),".png"==
@ -6602,7 +6603,7 @@ b.init()});a.actions.addAction("quickStart...",function(){window.open("https://y
this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));g=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,204,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",
function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=mxUtils.bind(this,function(){if("undefined"!==typeof VsdxExport)try{(new VsdxExport(a)).exportCurrentDiagrams()}catch(p){}});
"undefined"!==typeof VsdxExport||this.loadingVsdx||a.isOffline()?window.setTimeout(b,0):(this.loadingVsdx=!0,mxscript("/js/vsdx.min.js",b))}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=
!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width=
!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var v=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=v.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width=
"16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search",null,null,c,null,null,!1),f=document.createElement("div");
f.style.display="inline";f.innerHTML=':<form style="display:inline;margin-left:8px;"target="_blank" method="get" action="https://desk.draw.io/support/search/solutions"><input type="text" name="term" size="25"></form>';e.firstChild.nextSibling.appendChild(f);e.style.backgroundColor="whiteSmoke";e.style.cursor="default";var g=f.getElementsByTagName("form")[0],h=f.getElementsByTagName("input")[0];null!=h&&null!=g&&(mxEvent.addListener(g,"submit",function(){if(EditorUi.enableLogging)try{(new Image).src=
(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity=CONFIG&msg=helpsearch:"+encodeURIComponent(h.value)+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(y){}window.setTimeout(function(){a.menubar.hideMenu()},0)}),mxEvent.addGestureListeners(e,function(a){document.activeElement!=h&&h.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)}),window.setTimeout(function(){h.focus()},0));this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts",
@ -6650,10 +6651,10 @@ b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(
"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",
mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+
"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,
["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var t="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),v=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow=
["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var u="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),t=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow=
"auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];");a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=l;a.actions.addAction("insertRectangle",
function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},null,null,"Ctrl+K").isEnabled=l;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),
a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},null,null,"Ctrl+Shift+K").isEnabled=l;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<t.length;c++)"-"==t[c]?a.addSeparator(b):v(a,b,mxResources.get(t[c])+"...",t[c])})));this.put("openRecent",
a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},null,null,"Ctrl+Shift+K").isEnabled=l;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<u.length;c++)"-"==u[c]?a.addSeparator(b):t(a,b,mxResources.get(u[c])+"...",u[c])})));this.put("openRecent",
new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(c,d){null!=a.drive?c.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},
d):m&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&c.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?c.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):b&&c.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+"...",null,
function(){a.pickFile(App.MODE_ONEDRIVE)},d):e&&c.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);c.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},d);mxClient.IS_IOS||c.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},d);a.isOffline()||(c.addSeparator(d),c.addItem(mxResources.get("url")+"...",null,function(){var b=

View file

@ -753,9 +753,6 @@ App.prototype.init = function()
'left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-280)/3)+\',height=280,width=640\');return false;"\'>' +
'<img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="' +
Editor.tweetImage + '"/>' + mxResources.get('loveIt', ['draw.io']) + '</a>',
'<a title="HTML5 JavaScript Diagramming" target="_blank" href="https://github.com/jgraph/draw.io">' +
'<img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="images/glyphicons_github.png"/>' +
'Fork us on GitHub</a>',
'<a title="' + mxResources.get('loveIt', ['draw.io']) +
'" target="_blank" href="https://www.facebook.com/sharer.php?u=' + encodeURIComponent('https://www.draw.io') +
'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,' +
@ -1006,10 +1003,17 @@ App.prototype.init = function()
this.adsHtml = this.basicAds;
mxUtils.setPrefixedStyle(td.style, 'transition', 'all 1s ease');
var lastAd = this.adsHtml.length - 1;
var thread2 = null;
var thread = null;
this.updateAd = function(index)
{
if (thread2 != null)
{
window.clearTimeout(thread2);
thread2 = null;
}
if (this.adsHtml.length == 1)
{
window.clearInterval(thread);
@ -1056,7 +1060,7 @@ App.prototype.init = function()
if (mxSettings.getOpenCounter() > 10)
{
window.setTimeout(mxUtils.bind(this, function()
thread2 = window.setTimeout(mxUtils.bind(this, function()
{
this.updateAd(0);
}), 15000);

View file

@ -436,7 +436,7 @@
editorUi.actions.addAction('quickStart...', function()
{
window.open('https://youtu.be/Z0D96ZikMkc');
window.open('https://www.youtube.com/watch?v=Z0D96ZikMkc');
});
action = editorUi.actions.addAction('tags...', mxUtils.bind(this, function()

View file

@ -21,7 +21,7 @@
this.addEntry(dt + 'table', function()
{
var cell = new mxCell('Table', new mxGeometry(0, 0, 160, 110),
'swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;');
'swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;');
cell.vertex = true;
cell.insert(sb.cloneCell(row, 'Row 1'));
cell.insert(sb.cloneCell(row, 'Row 2'));
@ -32,7 +32,7 @@
this.addEntry(dt + 'table section subsection', function()
{
var cell = new mxCell('Section', new mxGeometry(0, 0, 140, 110),
'swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=22;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;');
'swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=22;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;');
cell.vertex = true;
cell.insert(sb.cloneCell(row, 'Row 1'));
@ -42,9 +42,9 @@
return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Section');
}),
this.addDataEntry(dt + 'table section subsection', 160, 144, 'ER Table 1',
'7VjrjqIwFH4a/m5aKs76c2EumaybTMZ5gQIVmi0tW+qq8/R7CsVL0GhGjDsTFJOee3u+84VYj0TF6knTMv+lUiY88uCRSCtlmlWxipgQno946pF7z/cR/Dz/8YgV11ZUUs2kOSfAbwL+UrFgjeaNxoI12sqshdNWS14IKkEK50qambMgkJOci3RK12phK1aGJr9bKcyV5u/gT+Fg9xgUYNZmxt9tsD+22bgQkRJK13UIQ/a7FzmzGV0tzSqIfWmPhzeqKa1Mux8lBC0rHtc7tC4F1RmXoTJGFc6pPc/jfvl5/QE7FTyToEugEANj6PrEtGGro72uVa7RT0wVzOg1uCx5anLnMW7wQDnjWd6GjUaNklaNItvEbqGDhUPvMJKkg+RC8j8L9px2wcxpaZewdcOpeGWJoTKz1tCo0nVIsHnbUe22atdx20W806XGN7Td4QkVP5y64GlaZ90FWap6iqqSJlxm06YKGW1Vr66aVSlIORdqCWIOyZi0u1GGGhpv5q9UXJq6cUEID/Q3Qt8CL4CTRiDjrQyPddcmUrIymvIaNwajs2R2fMJUq/INhoW1p92d9eDcKfBPTsHkwBAQdPkMjDoz8PLzYvTjXd4cQPLcIdhHvDfAT2Fqj+nG9Sh6iZLStiFue4S6qJKTqJIroRp0UNXQIB/h6xAbnca0TvZ5WX1FFsM77WK8xx28b83hBu9PTuDgQwTuA9C7IwS+HNeBwP8jgb8PBL4Gge9uRuDJEQKTgcBfksAYDQy+BoMnN2Mwxv0jOnC3b+7iHv4t4e6V1sDdHriLT19uHSLvByAFcXsBWtv27kf/AQ=='),
'7Zhtb9owEMc/Td5OdkzoeLmkazWNSlXpF3ASk1h17MwxA/rpd06cAg0IVIJYq0CQ7DufH+53f0XYI1Gxute0zB9UyoRHfnok0kqZplWsIiaE5yOeeuTW830EP8+/O+DFtReVVDNpTgnwm4C/VCxYY3mmsWCNtTJr4azVkheCSuiFcyXNzHkQ9JOci3RK12phV6wMTV7aXpgrzV9hPIWD3WIwgFubGX+1wf7YzsaFiJRQul6HMGS/O5EzO6NbS7MKYh/b4+F3pge62hk4pZVpd6mEoGXF43rfNrCgOuMyVMaowg1qT3m3u6l5/QE/FTyTYEtgLQbO0GWPacNWBwnUJpf+e6YKZvQahix5anI3YtxQQjnjWd6GjUaNkVaNIXuL3QCFhmO6ny/p8F1I/mfBfqVdxDktbRO2bjgVTywxVGbWGxpVugwJNm8zqt1WbTtus4i3stSMDW12eELFD2cueJrWs26jl6quraqkCZfZtFmFjDamJ7eaNSmYci7UEro5TMak3Y0y1ND4rSpLxaWpExeE8EB+I/Qt8AI4aQR9vOnDY4drEylZGU15zY1B6SyZLZ8w1ap8hmJh7Wm3FRCcWgX+0SqY7CkCgs6vgVGnBh5/n00/3tbNHpKnFsEu8d6AH2Nqj+nK9SC9RElp0xC3OUJdquQoVXIhqkGHqoYE+QhfRtjoONN6ss+r6guqGN50Z/Med3hfW8MN708u4OBDAu4D6M0BAZ/PdRDw/yjg74OALyHgm6sJeHJAwGQQ8JcUMEaDgi+h4MnVFIxx/0QH7fatXdzDvyXcvegatNuDdvHxy6194v0AUuhurkVr386t6T8='),
this.addDataEntry(dt + 'table section subsection', 160, 112, 'ER Table 2',
'7VfbbuIwEP2avK5yIenu4yYsfSiVqtIfGBKTWHU8keMu0K/fseNwEUTQUrStVAiSPRePZ845QvGirF7dKmiqeyyY8KI/XpQpRN2t6lXGhPBCnxdeNPbC0KefF04GvIH1+g0oJvU5CWGX8BfEC+ssTzAXrLO2ei2ctV3yWoCkXbpAqWfO49M+r7goprDGF1Ox1ZA/97u0QsVfKR6osXFABnIrPeOvJjlMzGlciAwFKlsnYr757mXOzImulmIt5T707QUb0xRa3d8HhYCm5XN7QxNSgyq5TFFrrF1Q389kv/zCfsgPgpeSbDkVYuRM3ZyY0mw1OGtrcoO+ZVgzrdYUsuSFrlxE0uHhV4yXVZ8WOBig7QzlJncLHS0ceseRjA6QVLgkQ3CIZQWNWdLNNQfxyHINsjTeVGPjBiTYoh+ocjc16/nuEPshdbGpGQ7PQfx25poXhT11F2OJlkRtAzmX5bSrkvhb06OrNiIT0pELQW1E44oOY9LcBjVomG/o1yCX2s4tTumh8Wb+j9iLqdOM9sF2T48JVzpD2WoF3MLGiDlLZtiTFgqbJ+IK67vdpXp8LgnCkyT4dYQDkX85BUYHFHi4o/Ynd2/iwG7TwRAn9nhwBN9zqbHPg9FH0eAU0qZt194gpjlKacYy72fmH2IdncQ6Tq6DdTwg9/A6cg++5f7p5J4Myf1NHPiW+/lyj/+b3G8+3b+7Pezrav2K2u6FeQnePw/wvhjoCzXc4f3FBXzzLgG/A1Dabl/irG/vHe8f'),
'7VfbbuIwEP2avK5yIXT3cROWPpRKVekPDIlJrDqeyHEL9Ot37DiFLETQUrStVAiSPTd75pwjFC9Kq/W1grq8xZwJL/rjRalC1O2qWqdMCC/0ee5FEy8Mffp54XTAG1ivX4NiUp+SELYJzyCeWGt5gIVgrbXRG+GszYpXAiTtkiVKPXcen/ZZyUU+gw0+mRMbDdljt0tKVPyF4oEamwRkILfSc/5iksOxqcaFSFGgsudEzDffXubcVHRnKdZQ7l3XXvCP6RbWvcAZNLq7JQoBdcMX9t4msQJVcJmg1li5oK7Laf9SS/shPwheSLJldBYjZ+Kmx5Rm60EErMmN/5phxbTaUMiK57p0EeMWJb9kvCi7tMCBA01rKF5zt4DSwmF6GN9oD1+FKzIE+wiXUJsl3VxzEPcs0yAL40001m5Agi27gSp3U7Ne7A6xG1Ibm5jh8AzEb2eueJ7bqrvIS7TUamrIuCxm7Sljf2u6d6eNyIRUcimojWhSUjEmzW1Qg4bFKylr5FLbucUJPTTe1P8RezF1mtI+2O7pMeFKpygbrYBb2BgxZ8UMe5JcYf1AXGFdt7sCiE8lQXiUBL8OcCDyz6fAaI8CdzfU/vTmTRzYbToY4kSPBwfwPZUafR6MPooGx5A2bbv2BjHNUEozlkU3M38f6+go1vH4MljHA3IPLyP34Fvun07u4yG5v4kD33I/Xe7xf5P71af7d7fFvq7WL6jtTpjn4P1zD++zgT5Twy3eX1zAV+8S8DsApe321c76em9+fwE='),
this.addEntry(dt + 'table row', function()
{

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.9.6",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.9.7",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/")||
@ -883,18 +883,18 @@ mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstant
mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
mxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle("defaultEdge",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b};
mxStylesheet.prototype.getCellStyle=function(a,b){var c=b;if(null!=a&&0<a.length)for(var d=a.split(";"),c=null!=c&&";"!=a.charAt(0)?mxUtils.clone(c):{},e=0;e<d.length;e++){var f=d[e],g=f.indexOf("=");if(0<=g){var h=f.substring(0,g),f=f.substring(g+1);f==mxConstants.NONE?delete c[h]:mxUtils.isNumeric(f)?c[h]=parseFloat(f):c[h]=f}else if(f=this.styles[f],null!=f)for(h in f)c[h]=f[h]}return c};
function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=c;this.origin=new mxPoint;this.absoluteOffset=new mxPoint}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;mxCellState.prototype.absoluteOffset=null;mxCellState.prototype.visibleSourceState=null;
mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;mxCellState.prototype.unscaledWidth=null;
function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=c;this.origin=new mxPoint;this.absoluteOffset=new mxPoint;this.unscaledOrigin=new mxPoint;this.unscaledBounds=new mxRectangle}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;
mxCellState.prototype.absoluteOffset=null;mxCellState.prototype.visibleSourceState=null;mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;mxCellState.prototype.unscaledOrigin=null;mxCellState.prototype.unscaledBounds=null;mxCellState.prototype.unscaledWidth=null;
mxCellState.prototype.getPerimeterBounds=function(a,b){a=a||0;b=null!=b?b:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil&&"fixed"==this.shape.stencil.aspect){var c=this.shape.stencil.computeAspect(this.style,b.x,b.y,b.width,b.height);b.x=c.x;b.y=c.y;b.width=this.shape.stencil.w0*c.width;b.height=this.shape.stencil.h0*c.height}0!=a&&b.grow(a);return b};
mxCellState.prototype.setAbsoluteTerminalPoint=function(a,b){b?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[0]=a):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(a)):1==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[this.absolutePoints.length-1]=a};
mxCellState.prototype.setCursor=function(a){null!=this.shape&&this.shape.setCursor(a);null!=this.text&&this.text.setCursor(a)};mxCellState.prototype.getVisibleTerminal=function(a){a=this.getVisibleTerminalState(a);return null!=a?a.cell:null};mxCellState.prototype.getVisibleTerminalState=function(a){return a?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(a,b){b?this.visibleSourceState=a:this.visibleTargetState=a};
mxCellState.prototype.getCellBounds=function(){return this.cellBounds};mxCellState.prototype.getPaintBounds=function(){return this.paintBounds};mxCellState.prototype.updateCachedBounds=function(){var a=this.view.translate,b=this.view.scale;this.cellBounds=new mxRectangle(this.x/b-a.x,this.y/b-a.y,this.width/b,this.height/b);this.paintBounds=mxRectangle.fromRectangle(this.cellBounds);null!=this.shape&&this.shape.isPaintBoundsInverted()&&this.paintBounds.rotate90()};
mxCellState.prototype.setState=function(a){this.view=a.view;this.cell=a.cell;this.style=a.style;this.absolutePoints=a.absolutePoints;this.origin=a.origin;this.absoluteOffset=a.absoluteOffset;this.boundingBox=a.boundingBox;this.terminalDistance=a.terminalDistance;this.segments=a.segments;this.length=a.length;this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;this.unscaledWidth=a.unscaledWidth};
mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=
this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;a.unscaledWidth=this.unscaledWidth;return a};mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";
mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};
mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};
mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};
mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.unscaledOrigin&&(a.unscaledOrigin=this.unscaledOrigin.clone());null!=this.unscaledBounds&&(a.unscaledBounds=this.unscaledBounds.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());
null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;a.unscaledWidth=this.unscaledWidth;return a};mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;
mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};
mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};
mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};
mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this.singleSelection&&(b=this.cells,a=[this.getFirstSelectableCell(a)]);for(var c=[],d=0;d<a.length;d++)!this.isSelected(a[d])&&this.graph.isCellSelectable(a[d])&&c.push(a[d]);this.changeSelection(c,b)}};mxGraphSelectionModel.prototype.removeCell=function(a){null!=a&&this.removeCells([a])};
mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c<a.length;c++)this.isSelected(a[c])&&b.push(a[c]);this.changeSelection(null,b)}};mxGraphSelectionModel.prototype.changeSelection=function(a,b){if(null!=a&&0<a.length&&null!=a[0]||null!=b&&0<b.length&&null!=b[0]){var c=new mxSelectionChange(this,a,b);c.execute();var d=new mxUndoableEdit(this,!1);d.add(c);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}};
mxGraphSelectionModel.prototype.cellAdded=function(a){null==a||this.isSelected(a)||this.cells.push(a)};mxGraphSelectionModel.prototype.cellRemoved=function(a){null!=a&&(a=mxUtils.indexOf(this.cells,a),0<=a&&this.cells.splice(a,1))};function mxSelectionChange(a,b,c){this.selectionModel=a;this.added=null!=b?b.slice():null;this.removed=null!=c?c.slice():null}

View file

@ -938,10 +938,10 @@ EditorUi.prototype.sidebarFooterHeight = 34;
EditorUi.prototype.editButtonLink = null;
/**
* Specifies the position of the horizontal split bar. Default is 190 or 110 for
* Specifies the position of the horizontal split bar. Default is 208 or 118 for
* screen widths <= 640px.
*/
EditorUi.prototype.hsplitPosition = (screen.width <= 640) ? 110 : 200;
EditorUi.prototype.hsplitPosition = (screen.width <= 640) ? 118 : 208;
/**
* Specifies if animations are allowed in <executeLayout>. Default is true.

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.9.6",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.9.7",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/")||
@ -883,18 +883,18 @@ mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstant
mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
mxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle("defaultEdge",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b};
mxStylesheet.prototype.getCellStyle=function(a,b){var c=b;if(null!=a&&0<a.length)for(var d=a.split(";"),c=null!=c&&";"!=a.charAt(0)?mxUtils.clone(c):{},e=0;e<d.length;e++){var f=d[e],g=f.indexOf("=");if(0<=g){var h=f.substring(0,g),f=f.substring(g+1);f==mxConstants.NONE?delete c[h]:mxUtils.isNumeric(f)?c[h]=parseFloat(f):c[h]=f}else if(f=this.styles[f],null!=f)for(h in f)c[h]=f[h]}return c};
function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=c;this.origin=new mxPoint;this.absoluteOffset=new mxPoint}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;mxCellState.prototype.absoluteOffset=null;mxCellState.prototype.visibleSourceState=null;
mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;mxCellState.prototype.unscaledWidth=null;
function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=c;this.origin=new mxPoint;this.absoluteOffset=new mxPoint;this.unscaledOrigin=new mxPoint;this.unscaledBounds=new mxRectangle}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;
mxCellState.prototype.absoluteOffset=null;mxCellState.prototype.visibleSourceState=null;mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;mxCellState.prototype.unscaledOrigin=null;mxCellState.prototype.unscaledBounds=null;mxCellState.prototype.unscaledWidth=null;
mxCellState.prototype.getPerimeterBounds=function(a,b){a=a||0;b=null!=b?b:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil&&"fixed"==this.shape.stencil.aspect){var c=this.shape.stencil.computeAspect(this.style,b.x,b.y,b.width,b.height);b.x=c.x;b.y=c.y;b.width=this.shape.stencil.w0*c.width;b.height=this.shape.stencil.h0*c.height}0!=a&&b.grow(a);return b};
mxCellState.prototype.setAbsoluteTerminalPoint=function(a,b){b?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[0]=a):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(a)):1==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[this.absolutePoints.length-1]=a};
mxCellState.prototype.setCursor=function(a){null!=this.shape&&this.shape.setCursor(a);null!=this.text&&this.text.setCursor(a)};mxCellState.prototype.getVisibleTerminal=function(a){a=this.getVisibleTerminalState(a);return null!=a?a.cell:null};mxCellState.prototype.getVisibleTerminalState=function(a){return a?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(a,b){b?this.visibleSourceState=a:this.visibleTargetState=a};
mxCellState.prototype.getCellBounds=function(){return this.cellBounds};mxCellState.prototype.getPaintBounds=function(){return this.paintBounds};mxCellState.prototype.updateCachedBounds=function(){var a=this.view.translate,b=this.view.scale;this.cellBounds=new mxRectangle(this.x/b-a.x,this.y/b-a.y,this.width/b,this.height/b);this.paintBounds=mxRectangle.fromRectangle(this.cellBounds);null!=this.shape&&this.shape.isPaintBoundsInverted()&&this.paintBounds.rotate90()};
mxCellState.prototype.setState=function(a){this.view=a.view;this.cell=a.cell;this.style=a.style;this.absolutePoints=a.absolutePoints;this.origin=a.origin;this.absoluteOffset=a.absoluteOffset;this.boundingBox=a.boundingBox;this.terminalDistance=a.terminalDistance;this.segments=a.segments;this.length=a.length;this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;this.unscaledWidth=a.unscaledWidth};
mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=
this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;a.unscaledWidth=this.unscaledWidth;return a};mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";
mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};
mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};
mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};
mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.unscaledOrigin&&(a.unscaledOrigin=this.unscaledOrigin.clone());null!=this.unscaledBounds&&(a.unscaledBounds=this.unscaledBounds.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());
null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;a.unscaledWidth=this.unscaledWidth;return a};mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;
mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};
mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};
mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};
mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this.singleSelection&&(b=this.cells,a=[this.getFirstSelectableCell(a)]);for(var c=[],d=0;d<a.length;d++)!this.isSelected(a[d])&&this.graph.isCellSelectable(a[d])&&c.push(a[d]);this.changeSelection(c,b)}};mxGraphSelectionModel.prototype.removeCell=function(a){null!=a&&this.removeCells([a])};
mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c<a.length;c++)this.isSelected(a[c])&&b.push(a[c]);this.changeSelection(null,b)}};mxGraphSelectionModel.prototype.changeSelection=function(a,b){if(null!=a&&0<a.length&&null!=a[0]||null!=b&&0<b.length&&null!=b[0]){var c=new mxSelectionChange(this,a,b);c.execute();var d=new mxUndoableEdit(this,!1);d.add(c);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}};
mxGraphSelectionModel.prototype.cellAdded=function(a){null==a||this.isSelected(a)||this.cells.push(a)};mxGraphSelectionModel.prototype.cellRemoved=function(a){null!=a&&(a=mxUtils.indexOf(this.cells,a),0<=a&&this.cells.splice(a,1))};function mxSelectionChange(a,b,c){this.selectionModel=a;this.added=null!=b?b.slice():null;this.removed=null!=c?c.slice():null}

View file

@ -2006,7 +2006,7 @@ null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,c=b.style[mxConstants.STYLE
mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);
mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",
mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;
EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?110:200;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.editButtonLink=null;EditorUi.prototype.hsplitPosition=640>=screen.width?118:208;EditorUi.prototype.allowAnimation=!0;
EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));
var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9==a.which&&b.isEnabled()&&!mxEvent.isAltDown(a)&&(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a)))};

View file

@ -383,7 +383,7 @@ days=ημέρες
months=μήνες
years=χρόνια
restartForChangeRequired=Οι αλλαγές θα εφαρμοστούν, μετά από την ανανέωση της σελίδας.
laneColor=Lanecolor
laneColor=Χρώμα λωρίδας
lastModified=Τελευταία τροποποίηση
layout=Σχεδιασμός
left=Αριστερά
@ -510,7 +510,7 @@ preview=Προεπισκόπηση
previousPage=Προηγούμενη Σελίδα
print=Εκτύπωση
printAllPages=Εκτύπωση όλων των σελίδων
procEng=Proc. Eng.
procEng=Μηχανική Διαδικασία
project=Πρότζεκτ
priority=Προτεραιότητα
properties=Ιδιότητες
@ -544,7 +544,7 @@ required=απαιτείται
reset=Επανεκκίνηση
resetView=Επαναφορά Προβολής
resize=Αλλαγή μεγέθους
resizeLargeImages=Do you want to resize large images to make the application run faster?
resizeLargeImages=Θα θέλατε να αλλάξετε μέγεθος στις εικόνες για να τρέχει πιο γρήγορα η εφαρμογή;
retina=Retina
responsive=Με ανταπόκριση
restore=Επαναφορά
@ -597,7 +597,7 @@ shareLink=Σύνδεσμός για κοινή επεξεργασία
sharp=Αιχμή
show=Προβολή
showStartScreen=Εμφάνιση Οθόνης Έναρξης
sidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.
sidebarTooltip=Κάντε κλικ για επέκταση. Σύρετε και αποθέστε τα σχήματα στο διάγραμμα. Πατήστε Shift για να αλλάξετε την επιλογή. Πατήστε Alt για εισαγωγή και σύνδεση
signs=Σύμβολα
signOut=Αποσύνδεση
simple=Απλό